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
ConstructorsModifierConstructorDescriptionprotectedCustomAttribute(AttributeMapper<T> mapper) Construct a CustomAttribute. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributeMapper<T> Returns theAttributeMapperassociated 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:AttributeReturns theAttributeMapperassociated with this attribute.- Specified by:
attributeMapperin interfaceAttribute<T extends CustomAttribute<T>>- Returns:
- the
AttributeMapperassociated with this attribute
-
attributeName
Description copied from interface:AttributeReturns the name of the attribute.- Specified by:
attributeNamein interfaceAttribute<T extends CustomAttribute<T>>- Returns:
- the name of the attribute
-