Interface FieldModel
- All Superinterfaces:
AttributedElement
,ClassElement
,ClassFileElement
,CompoundElement<FieldElement>
,Iterable<FieldElement>
public sealed interface FieldModel
extends CompoundElement<FieldElement>, AttributedElement, ClassElement
Models a field. The contents of the field can be traversed via
a streaming view, or via random access (e.g.,
flags()
), or by freely mixing the two.- Since:
- 24
-
Method Summary
Modifier and TypeMethodDescriptionReturns the name of this field.Returns the field descriptor of this field.default ClassDesc
Returns the field descriptor of this field, as a symbolic descriptor.flags()
Returns the access flags.parent()
Returns the class model this field is a member of, if known.Methods declared in interface java.lang.classfile.AttributedElement
attributes, findAttribute, findAttributes
Methods declared in interface java.lang.classfile.CompoundElement
elementList, elementStream, forEach, iterator, toDebugString
Methods declared in interface java.lang.Iterable
spliterator
-
Method Details
-
flags
-
parent
Optional<ClassModel> parent()Returns the class model this field is a member of, if known.- Returns:
- the class model this field is a member of, if known
-
fieldName
-
fieldType
Utf8Entry fieldType()Returns the field descriptor of this field.- Returns:
- the field descriptor of this field
-
fieldTypeSymbol
Returns the field descriptor of this field, as a symbolic descriptor.- Returns:
- the field descriptor of this field, as a symbolic descriptor
-