Class CustomAttribute<T extends CustomAttribute<T>>
java.lang.Object
java.lang.classfile.CustomAttribute<T>
- Type Parameters:
T
- the custom attribute type
- All Implemented Interfaces:
Attribute<T>
,ClassElement
,ClassFileElement
,CodeElement
,FieldElement
,MethodElement
public abstract non-sealed class CustomAttribute<T extends CustomAttribute<T>>
extends Object
implements Attribute<T>, CodeElement, ClassElement, MethodElement, FieldElement
Models a non-standard attribute of a classfile. Clients should extend
this class to provide an implementation class for non-standard attributes,
and provide an
AttributeMapper
to mediate between the classfile
format and the CustomAttribute representation.- Since:
- 24
-
Constructor Summary
ModifierConstructorDescriptionprotected
CustomAttribute
(AttributeMapper<T> mapper) Construct a CustomAttribute. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributeMapper
<T> Returns theAttributeMapper
associated with this attribute.Returns the name of the attribute.
-
Constructor Details
-
CustomAttribute
Construct a CustomAttribute.- Parameters:
mapper
- the attribute mapper
-
-
Method Details
-
attributeMapper
Description copied from interface:Attribute
Returns theAttributeMapper
associated with this attribute.- Specified by:
attributeMapper
in interfaceAttribute<T extends CustomAttribute<T>>
- Returns:
- the
AttributeMapper
associated with this attribute
-
attributeName
Description copied from interface:Attribute
Returns the name of the attribute.- Specified by:
attributeName
in interfaceAttribute<T extends CustomAttribute<T>>
- Returns:
- the name of the attribute
-