Interface FieldModel
- All Superinterfaces:
- AttributedElement,- ClassElement,- ClassFileElement,- CompoundElement<FieldElement>,- Iterable<FieldElement>
public sealed interface FieldModel
extends CompoundElement<FieldElement>, AttributedElement, ClassElement
Models a field.  A field can be viewed as a composition of 
FieldElements, or by random access via accessor
 methods if only specific parts of the field is needed.
 
 Fields can be obtained from ClassModel.fields(), or in the traversal
 of member elements of a class.
 
 ClassBuilder.withField(String, ClassDesc, Consumer) is the main way
 to construct fields.  ClassBuilder.transformField(java.lang.classfile.FieldModel, java.lang.classfile.FieldTransform) allows creating a
 new field by selectively processing the original field elements and directing
 the results to a field builder.
 
All field attributes are accessible as member elements.
- See Java Virtual Machine Specification:
- 
4.5 Fields
- Since:
- 24
- See Also:
- 
Method SummaryMethods declared in interface java.lang.classfile.AttributedElementattributes, findAttribute, findAttributesMethods declared in interface java.lang.classfile.CompoundElementelementList, elementStream, forEach, iterator, toDebugStringMethods declared in interface java.lang.Iterablespliterator
- 
Method Details- 
flags
- 
parentOptional<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
- 
fieldTypeUtf8Entry fieldType()Returns the field descriptor string of this field.- Returns:
- the field descriptor string of this field
 
- 
fieldTypeSymbolReturns the field type, as a symbolic descriptor.- Returns:
- the field type, as a symbolic descriptor
 
 
-