Class InnerClassEntry


  • public class InnerClassEntry
    extends Object
    Represents an entry in the InnerClasses attribute.
    • Constructor Detail

      • InnerClassEntry

        public InnerClassEntry​(ConstPool constPool,
                               int innerClassInfoIndex,
                               int outerClassInfoIndex,
                               int innerNameIndex,
                               int innerClassAccessFlags)
        Constructs an inner class entry.
        Parameters:
        constPool - the constant pool for resolving references
        innerClassInfoIndex - constant pool index of the inner class
        outerClassInfoIndex - constant pool index of the outer class, or 0 if none
        innerNameIndex - constant pool index of the simple name, or 0 if anonymous
        innerClassAccessFlags - access flags for the inner class
    • Method Detail

      • getInnerClassInfoIndex

        public int getInnerClassInfoIndex()
        Returns:
        the inner class info index
      • getOuterClassInfoIndex

        public int getOuterClassInfoIndex()
        Returns:
        the outer class info index
      • getInnerClassAccessFlags

        public int getInnerClassAccessFlags()
        Returns:
        the inner class access flags
      • getInnerNameIndex

        public int getInnerNameIndex()
        Returns:
        the inner name index
      • setInnerNameIndex

        public void setInnerNameIndex​(int innerNameIndex)
        Repoints the simple name of the inner class.
        Parameters:
        innerNameIndex - constant pool index of the new simple name, or 0 to make it anonymous
      • getOuterClassName

        public String getOuterClassName()
        Resolves the enclosing class name, with dots for slashes.
        Returns:
        the dotted name, null when there is no outer class, or "Unknown" if the pool entry is not a class ref
      • getInnerClassName

        public String getInnerClassName()
        Resolves the inner class name, with dots for slashes.
        Returns:
        the dotted name, or "Unknown" if the pool entry is not a class ref