The caller must pass in a Class<? extends Attribute> value. This method first checks if an instance of that class is already in this AttributeSource and returns it. Otherwise a new instance is created, added to this AttributeSource and returned. Signature for Java 1.5:
CopyC#
public <T extends Attribute> T addAttribute(Class<T>)

Namespace: Lucene.Net.Util
Assembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1

Syntax

C#
public virtual Attribute AddAttribute(
	Type attClass
)
Visual Basic
Public Overridable Function AddAttribute ( _
	attClass As Type _
) As Attribute
Visual C++
public:
virtual Attribute^ AddAttribute(
	Type^ attClass
)

Parameters

attClass
Type: System..::..Type

[Missing <param name="attClass"/> documentation for "M:Lucene.Net.Util.AttributeSource.AddAttribute(System.Type)"]

Return Value

[Missing <returns> documentation for "M:Lucene.Net.Util.AttributeSource.AddAttribute(System.Type)"]

See Also