Class StdMember

java.lang.Object
com.android.dx.cf.iface.StdMember
All Implemented Interfaces:
HasAttribute, Member
Direct Known Subclasses:
StdField, StdMethod

public abstract class StdMember extends Object implements Member
Standard implementation of Member, which directly stores all the associated data.
  • Constructor Details

    • StdMember

      public StdMember(CstType definingClass, int accessFlags, CstNat nat, AttributeList attributes)
      Constructs an instance.
      Parameters:
      definingClass - non-null; the defining class
      accessFlags - access flags
      nat - non-null; member name and type (descriptor)
      attributes - non-null; list of associated attributes
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDefiningClass

      public final CstType getDefiningClass()
      Get the defining class.
      Specified by:
      getDefiningClass in interface Member
      Returns:
      non-null; the defining class
    • getAccessFlags

      public final int getAccessFlags()
      Get the field access_flags.
      Specified by:
      getAccessFlags in interface Member
      Returns:
      the access flags
    • getNat

      public final 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.
      Specified by:
      getNat in interface Member
      Returns:
      non-null; the name and type
    • getName

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

      public final CstString getDescriptor()
      Get the field descriptor_index of the member. This is just a convenient shorthand for getNat().getDescriptor().
      Specified by:
      getDescriptor in interface Member
      Returns:
      non-null; the descriptor
    • getAttributes

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