Class FieldEntry


  • public class FieldEntry
    extends MemberEntry
    A field entry of a class file, parsed from bytes or built for dynamic creation.
    • Constructor Detail

      • FieldEntry

        public FieldEntry()
        Constructs an empty FieldEntry for dynamic creation.
      • FieldEntry

        public FieldEntry​(ClassFile classFile)
        Constructs a FieldEntry by parsing from the class file.
        Parameters:
        classFile - the ClassFile instance being parsed
    • Method Detail

      • setName

        public void setName​(String newName)
        Renames the field, adding the new name Utf8 to the constant pool and refreshing the key.
        Overrides:
        setName in class MemberEntry
        Parameters:
        newName - the new field name
      • accept

        public void accept​(AbstractClassVisitor visitor)
        Dispatches the visitor to this field.
        Parameters:
        visitor - the visitor to apply