An AttributeSource contains a list of different {@link AttributeImpl}s, and methods to add and get them. There can only be a single instance of an attribute in the same AttributeSource instance. This is ensured by passing in the actual type of the Attribute (Class<Attribute>) to the {@link #AddAttribute(Class)}, which then checks if an instance of that type is already present. If yes, it returns the instance, otherwise it creates a new instance and returns it.

The AttributeSource..::..AttributeFactory type exposes the following members.

Constructors

  NameDescription
Protected methodAttributeSource..::..AttributeFactory
Initializes a new instance of the AttributeSource..::..AttributeFactory class

Methods

  NameDescription
Public methodCreateAttributeInstance
returns an {@link AttributeImpl} for the supplied {@link Attribute} interface class.

Signature for Java 1.5:

CopyC#
public AttributeImpl createAttributeInstance(Class%lt;? extends Attribute> attClass)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)

Fields

  NameDescription
Public fieldStatic memberDEFAULT_ATTRIBUTE_FACTORY
This is the default factory that creates {@link AttributeImpl}s using the class name of the supplied {@link Attribute} interface class by appending
CopyC#
Impl
to it.

See Also