Package org.apache.lucene.util
Class AttributeFactory.StaticImplementationAttributeFactory<A extends AttributeImpl>
- java.lang.Object
-
- org.apache.lucene.util.AttributeFactory
-
- org.apache.lucene.util.AttributeFactory.StaticImplementationAttributeFactory<A>
-
- Enclosing class:
- AttributeFactory
public abstract static class AttributeFactory.StaticImplementationAttributeFactory<A extends AttributeImpl> extends AttributeFactory
Expert: AttributeFactory returning an instance of the givenclazzfor the attributes it implements. For all other attributes it calls the given delegate factory as fallback. This class can be used to prefer a specificAttributeImplwhich combines multiple attributes over separate classes.- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeFactory
AttributeFactory.StaticImplementationAttributeFactory<A extends AttributeImpl>
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.util.AttributeFactory
DEFAULT_ATTRIBUTE_FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedStaticImplementationAttributeFactory(AttributeFactory delegate, Class<A> clazz)Expert: Creates an AttributeFactory returningclazzas instance for the attributes it implements and for all other attributes calls the given delegate factory.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AttributeImplcreateAttributeInstance(Class<? extends Attribute> attClass)Returns anAttributeImplfor the suppliedAttributeinterface class.protected abstract AcreateInstance()Creates an instance ofA.booleanequals(Object other)inthashCode()-
Methods inherited from class org.apache.lucene.util.AttributeFactory
getStaticImplementation
-
-
-
-
Constructor Detail
-
StaticImplementationAttributeFactory
protected StaticImplementationAttributeFactory(AttributeFactory delegate, Class<A> clazz)
Expert: Creates an AttributeFactory returningclazzas instance for the attributes it implements and for all other attributes calls the given delegate factory.
-
-
Method Detail
-
createAttributeInstance
public final AttributeImpl createAttributeInstance(Class<? extends Attribute> attClass)
Description copied from class:AttributeFactoryReturns anAttributeImplfor the suppliedAttributeinterface class.- Specified by:
createAttributeInstancein classAttributeFactory
-
createInstance
protected abstract A createInstance()
Creates an instance ofA.
-
-