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 Details

    • flags

      AccessFlags flags()
      Returns the access flags.
      Returns:
      the access 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

      Utf8Entry fieldName()
      Returns the name of this field.
      Returns:
      the name of this field
    • fieldType

      Utf8Entry fieldType()
      Returns the field descriptor of this field.
      Returns:
      the field descriptor of this field
    • fieldTypeSymbol

      default ClassDesc fieldTypeSymbol()
      Returns the field descriptor of this field, as a symbolic descriptor.
      Returns:
      the field descriptor of this field, as a symbolic descriptor