Package org.apache.bcel.classfile
Class InnerClass
java.lang.Object
org.apache.bcel.classfile.InnerClass
This class represents a inner class attribute, i.e., 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) 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()voiddump(DataOutputStream file) Dump inner class attribute to file stream in binary format.intintintintvoidsetInnerAccessFlags(int innerAccessFlags) voidsetInnerClassIndex(int innerClassIndex) voidsetInnerNameIndex(int innerNameIndex) voidsetOuterClassIndex(int outerClassIndex) toString()toString(ConstantPool constantPool)
-
Constructor Details
-
InnerClass
Initialize from another object.- Parameters:
c- Source to copy.
-
InnerClass
public InnerClass(int innerClassIndex, int outerClassIndex, int innerNameIndex, int innerAccessFlags) - Parameters:
innerClassIndex- Class index in constant pool of inner classouterClassIndex- Class index in constant pool of outer classinnerNameIndex- Name index in constant pool of inner classinnerAccessFlags- Access flags of inner class
-
-
Method Details
-
accept
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
copy
- Returns:
- deep copy of this object
-
dump
Dump inner class attribute to file stream in binary format.- Parameters:
file- Output file stream- Throws:
IOException- if an I/O error occurs.
-
getInnerAccessFlags
- Returns:
- access flags of inner class.
-
getInnerClassIndex
- Returns:
- class index of inner class.
-
getInnerNameIndex
- Returns:
- name index of inner class.
-
getOuterClassIndex
- Returns:
- class index of outer class.
-
setInnerAccessFlags
- Parameters:
innerAccessFlags- access flags for this inner class
-
setInnerClassIndex
- Parameters:
innerClassIndex- index into the constant pool for this class
-
setInnerNameIndex
- Parameters:
innerNameIndex- index into the constant pool for this class's name
-
setOuterClassIndex
- Parameters:
outerClassIndex- index into the constant pool for the owning class
-
toString
-
toString
- Returns:
- Resolved string representation
-