Class EnclosingMethodAttrInfo

  • All Implemented Interfaces:
    ClassConstants

    public class EnclosingMethodAttrInfo
    extends AttrInfo
    Representation of an attribute.
    • Constructor Detail

      • EnclosingMethodAttrInfo

        protected EnclosingMethodAttrInfo​(ClassFile cf,
                                          int attrNameIndex,
                                          int attrLength)
        Instantiates a new Enclosing method attr info.
        Parameters:
        cf - the cf
        attrNameIndex - the attr name index
        attrLength - the attr length
    • Method Detail

      • getAttrName

        protected java.lang.String getAttrName()
        Return the String name of the attribute; over-ride this in sub-classes.
        Overrides:
        getAttrName in class AttrInfo
        Returns:
        the attr name
      • getClassIndex

        protected int getClassIndex()
        Return the class index.
        Returns:
        the class index
      • setClassIndex

        protected void setClassIndex​(int index)
        Return the class index.
        Parameters:
        index - the index
      • getNameAndTypeIndex

        protected int getNameAndTypeIndex()
        Return the name-and-type index.
        Returns:
        the name and type index
      • setNameAndTypeIndex

        protected void setNameAndTypeIndex​(int index)
        Set the name-and-type index.
        Parameters:
        index - the index
      • markUtf8RefsInInfo

        protected void markUtf8RefsInInfo​(ConstantPool pool)
        Check for Utf8 references in the 'info' data to the constant pool and mark them; over-ride this in sub-classes.
        Overrides:
        markUtf8RefsInInfo in class AttrInfo
        Parameters:
        pool - the pool
      • readInfo

        protected void readInfo​(java.io.DataInput din)
                         throws java.io.IOException
        Read the 'info' data following the u1tag byte.
        Overrides:
        readInfo in class AttrInfo
        Parameters:
        din - the din
        Throws:
        java.io.IOException - the io exception
      • writeInfo

        public void writeInfo​(java.io.DataOutput dout)
                       throws java.io.IOException
        Write the 'info' data following the u1tag byte.
        Overrides:
        writeInfo in class AttrInfo
        Parameters:
        dout - the dout
        Throws:
        java.io.IOException - the io exception
      • dump

        public void dump​(java.io.PrintWriter pw,
                         ClassFile cf,
                         int index)
        Dump the content of the class file to the specified file (used for debugging).
        Parameters:
        pw - the pw
        cf - the cf
        index - the index