The caller must pass in a Class<? extends Attribute> value.
Returns the instance of the passed in Attribute contained in this AttributeSource
Signature for Java 1.5:
CopyC#
public <T extends Attribute> T getAttribute(Class<T>)
Attribute. It is recommended to always use {@link #addAttribute} even in consumers
of TokenStreams, because you cannot know if a specific TokenStream really uses
a specific Attribute. {@link #addAttribute} will automatically make the attribute
available. If you want to only use the attribute, if it is available (to optimize
consuming), use {@link #hasAttribute}.
Namespace: Lucene.Net.UtilAssembly: Lucene.Net (in Lucene.Net.dll) Version: 2.9.4.1
Syntax
C# |
---|
public virtual Attribute GetAttribute( Type attClass ) |
Visual Basic |
---|
Public Overridable Function GetAttribute ( _ attClass As Type _ ) As Attribute |
Visual C++ |
---|
public: virtual Attribute^ GetAttribute( Type^ attClass ) |
Parameters
- attClass
- Type: System..::..Type
[Missing <param name="attClass"/> documentation for "M:Lucene.Net.Util.AttributeSource.GetAttribute(System.Type)"]
Return Value
[Missing <returns> documentation for "M:Lucene.Net.Util.AttributeSource.GetAttribute(System.Type)"]