Module org.glavo.classfile
Package org.glavo.classfile
Class CustomAttribute<T extends CustomAttribute<T>>
java.lang.Object
org.glavo.classfile.CustomAttribute<T>
- Type Parameters:
T- the custom attribute type
- All Implemented Interfaces:
Attribute<T>,ClassElement,ClassFileElement,CodeElement,FieldElement,MethodElement,WritableElement<T>
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:
- 22
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCustomAttribute(AttributeMapper<T> mapper) Construct a CustomAttribute. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributeMapper<T> Returns theAttributeMapperassociated with this attribute.final StringReturns the name of the attribute.toString()final voidWrites the element to the specified writer
-
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
-
writeTo
Description copied from interface:WritableElementWrites the element to the specified writer- Specified by:
writeToin interfaceWritableElement<T extends CustomAttribute<T>>- Parameters:
buf- the writer
-
toString
-