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 given `clazz` for the attributes it implements. For all other attributes it calls the given delegate factory as fallback. This class can be used to prefer a specific `AttributeImpl` which 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
    Constructor and Description
    `AttributeFactory.StaticImplementationAttributeFactory(AttributeFactory delegate, Class<A> clazz)` Expert: Creates an AttributeFactory returning `clazz` as instance for the attributes it implements and for all other attributes calls the given delegate factory.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `AttributeImpl` | `createAttributeInstance(Class<? extends Attribute> attClass)` Returns an `AttributeImpl` for the supplied `Attribute` interface class.
    `protected abstract A` | `createInstance()` Creates an instance of `A`.
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`

    - ### Methods inherited from class org.apache.lucene.util.AttributeFactory

      `getStaticImplementation`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AttributeFactory.StaticImplementationAttributeFactory

          public AttributeFactory.StaticImplementationAttributeFactory(AttributeFactory delegate,
                                                               Class<A> clazz)

      Expert: Creates an AttributeFactory returning `clazz` as 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: `AttributeFactory`
      Returns an `AttributeImpl` for the supplied `Attribute` interface class.
      Specified by:
        `createAttributeInstance` in class `AttributeFactory`

    - #### createInstance

          protected abstract A createInstance()

      Creates an instance of `A`.

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.