Class AttEnclosingMethod

java.lang.Object
com.android.dx.cf.attrib.BaseAttribute
com.android.dx.cf.attrib.AttEnclosingMethod
All Implemented Interfaces:
Attribute

public final class AttEnclosingMethod extends BaseAttribute
Attribute class for standards-track EnclosingMethod attributes.
  • Field Details

    • ATTRIBUTE_NAME

      public static final String ATTRIBUTE_NAME
      non-null; attribute name for attributes of this type
      See Also:
  • Constructor Details

    • AttEnclosingMethod

      public AttEnclosingMethod(CstType type, CstNat method)
      Constructs an instance.
      Parameters:
      type - non-null; the innermost enclosing class
      method - null-ok; the name-and-type of the innermost enclosing method, if any
  • Method Details

    • byteLength

      public int byteLength()
      Get the total length of the attribute in bytes, including the header. Since the header is always six bytes, the result of this method is always at least 6.
      Returns:
      >= 6; the total length, in bytes
    • getEnclosingClass

      public CstType getEnclosingClass()
      Gets the innermost enclosing class.
      Returns:
      non-null; the innermost enclosing class
    • getMethod

      public CstNat getMethod()
      Gets the name-and-type of the innermost enclosing method, if any.
      Returns:
      null-ok; the name-and-type of the innermost enclosing method, if any