Package com.tonic.parser.attribute.table
Class InnerClassEntry
- java.lang.Object
-
- com.tonic.parser.attribute.table.InnerClassEntry
-
public class InnerClassEntry extends Object
Represents an entry in the InnerClasses attribute.
-
-
Constructor Summary
Constructors Constructor Description InnerClassEntry(ConstPool constPool, int innerClassInfoIndex, int outerClassInfoIndex, int innerNameIndex, int innerClassAccessFlags)Constructs an inner class entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetInnerClassAccessFlags()intgetInnerClassInfoIndex()StringgetInnerClassName()Resolves the inner class name, with dots for slashes.intgetInnerNameIndex()intgetOuterClassInfoIndex()StringgetOuterClassName()Resolves the enclosing class name, with dots for slashes.voidsetInnerNameIndex(int innerNameIndex)Repoints the simple name of the inner class.StringtoString()
-
-
-
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 referencesinnerClassInfoIndex- constant pool index of the inner classouterClassInfoIndex- constant pool index of the outer class, or 0 if noneinnerNameIndex- constant pool index of the simple name, or 0 if anonymousinnerClassAccessFlags- 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
-
-