class file. API models for
user-defined attributes should extend this class. A user-defined attribute
should also have an AttributeMapper defined, which will be returned
by attributeMapper, and registered to the ClassFile.AttributeMapperOption so the user-defined attributes can be read.
Accessor methods on user-defined attributes read from class files
may throw IllegalArgumentException if the attribute model is lazily
evaluated, and the evaluation encounters malformed class file format
for the attribute.
java.lang.classfile.attribute
| Modifier and Type | Field and Description |
|---|---|
| private final AttributeMapper |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public final AttributeMapper | attributeMapper()
Implements java. Returns the |
| public Utf8Entry | attributeName()
Implements java. Returns the name of the attribute. |
| public String |
| mapper | back to summary |
|---|---|
| private final AttributeMapper<T> mapper | |
| CustomAttribute | back to summary |
|---|---|
| protected CustomAttribute(AttributeMapper<T> mapper) Constructor for subclasses to call.
| |
| attributeMapper | back to summary |
|---|---|
| public final AttributeMapper Implements java. Doc from java. Returns the
| |
| attributeName | back to summary |
|---|---|
| public Utf8Entry attributeName() Implements java. Doc from java. Returns the name of the attribute. The string value of the name is equivalent to the
value of
If this attribute is read from a Implementation Specification The default implementation returns a
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |