Interface Member

All Superinterfaces:
HasAttribute
All Known Subinterfaces:
Field, Method
All Known Implementing Classes:
ConcreteMethod, StdField, StdMember, StdMethod

public interface Member extends HasAttribute
Interface representing members of class files (that is, fields and methods).
  • Method Details

    • getDefiningClass

      CstType getDefiningClass()
      Get the defining class.
      Returns:
      non-null; the defining class
    • getAccessFlags

      int getAccessFlags()
      Get the field access_flags.
      Returns:
      the access flags
    • getName

      CstString getName()
      Get the field name_index of the member. This is just a convenient shorthand for getNat().getName().
      Returns:
      non-null; the name
    • getDescriptor

      CstString getDescriptor()
      Get the field descriptor_index of the member. This is just a convenient shorthand for getNat().getDescriptor().
      Returns:
      non-null; the descriptor
    • getNat

      CstNat getNat()
      Get the name and type associated with this member. This is a combination of the fields name_index and descriptor_index in the original classfile, interpreted via the constant pool.
      Returns:
      non-null; the name and type
    • getAttributes

      AttributeList getAttributes()
      Get the field attributes (along with attributes_count).
      Specified by:
      getAttributes in interface HasAttribute
      Returns:
      non-null; the constant pool