Class InnerClass
java.lang.Object
org.apache.bcel.classfile.InnerClass
This class represents a inner class attribute, that is, the class indices of the inner and outer classes, the name and
the attributes of the inner class.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInnerClass(int innerClassIndex, int outerClassIndex, int innerNameIndex, int innerAccessFlags) Constructs an InnerClass.Initialize from another object. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()Creates a deep copy of this object.voiddump(DataOutputStream file) Dumps inner class attribute to file stream in binary format.intGets the access flags of inner class.intGets the class index of inner class.intGets the name index of inner class.intGets the class index of outer class.voidsetInnerAccessFlags(int innerAccessFlags) Sets the access flags for this inner class.voidsetInnerClassIndex(int innerClassIndex) Sets the index into the constant pool for this class.voidsetInnerNameIndex(int innerNameIndex) Sets the index into the constant pool for this class's name.voidsetOuterClassIndex(int outerClassIndex) Sets the index into the constant pool for the owning class.toString()Gets the string representation.toString(ConstantPool constantPool) Gets the resolved string representation.
-
Constructor Details
-
InnerClass
-
InnerClass
public InnerClass(int innerClassIndex, int outerClassIndex, int innerNameIndex, int innerAccessFlags) Constructs an InnerClass.- Parameters:
innerClassIndex- Class index in constant pool of inner class.outerClassIndex- Class index in constant pool of outer class.innerNameIndex- Name index in constant pool of inner class.innerAccessFlags- Access flags of inner class.
-
-
Method Details
-
accept
-
copy
-
dump
Dumps inner class attribute to file stream in binary format.- Parameters:
file- Output file stream.- Throws:
IOException- if an I/O error occurs.
-
getInnerAccessFlags
Gets the access flags of inner class.- Returns:
- access flags of inner class.
-
getInnerClassIndex
Gets the class index of inner class.- Returns:
- class index of inner class.
-
getInnerNameIndex
Gets the name index of inner class.- Returns:
- name index of inner class.
-
getOuterClassIndex
Gets the class index of outer class.- Returns:
- class index of outer class.
-
setInnerAccessFlags
Sets the access flags for this inner class.- Parameters:
innerAccessFlags- access flags for this inner class.
-
setInnerClassIndex
Sets the index into the constant pool for this class.- Parameters:
innerClassIndex- index into the constant pool for this class.
-
setInnerNameIndex
Sets the index into the constant pool for this class's name.- Parameters:
innerNameIndex- index into the constant pool for this class's name.
-
setOuterClassIndex
Sets the index into the constant pool for the owning class.- Parameters:
outerClassIndex- index into the constant pool for the owning class.
-
toString
-
toString
Gets the resolved string representation.- Parameters:
constantPool- the constant pool.- Returns:
- Resolved string representation.
-