1
package org.apache.lucene.util;
4
* Licensed to the Apache Software Foundation (ASF) under one or more
5
* contributor license agreements. See the NOTICE file distributed with
6
* this work for additional information regarding copyright ownership.
7
* The ASF licenses this file to You under the Apache License, Version 2.0
8
* (the "License"); you may not use this file except in compliance with
9
* the License. You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
21
* This interface is used to reflect contents of {@link AttributeSource} or {@link AttributeImpl}.
23
public interface AttributeReflector {
26
* This method gets called for every property in an {@link AttributeImpl}/{@link AttributeSource}
27
* passing the class name of the {@link Attribute}, a key and the actual value.
28
* E.g., an invocation of {@link org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl#reflectWith}
29
* would call this method once using {@code org.apache.lucene.analysis.tokenattributes.CharTermAttribute.class}
30
* as attribute class, {@code "term"} as key and the actual value as a String.
32
public void reflect(Class<? extends Attribute> attClass, String key, Object value);