bcel API: Class InnerClass

org.apache.bcel.classfile
Class InnerClass

java.lang.Object
  |
  +--org.apache.bcel.classfile.InnerClass
All Implemented Interfaces:
java.lang.Cloneable, Node

public final class InnerClass
extends java.lang.Object
implements java.lang.Cloneable, Node

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.

Version:
$Id: InnerClass.java,v 1.1.1.1 2001/10/29 20:00:01 jvanzyl Exp $
Author:
M. Dahm
See Also:
InnerClasses

Constructor Summary
InnerClass(InnerClass c)
          Initialize from another object.
InnerClass(int inner_class_index, int outer_class_index, int inner_name_index, int inner_access_flags)
           
 
Method Summary
 void accept(Visitor v)
          Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
 InnerClass copy()
           
 void dump(java.io.DataOutputStream file)
          Dump inner class attribute to file stream in binary format.
 int getInnerAccessFlags()
           
 int getInnerClassIndex()
           
 int getInnerNameIndex()
           
 int getOuterClassIndex()
           
 void setInnerAccessFlags(int inner_access_flags)
           
 void setInnerClassIndex(int inner_class_index)
           
 void setInnerNameIndex(int inner_name_index)
           
 void setOuterClassIndex(int outer_class_index)
           
 java.lang.String toString()
           
 java.lang.String toString(ConstantPool constant_pool)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InnerClass

public InnerClass(InnerClass c)
Initialize from another object.

InnerClass

public InnerClass(int inner_class_index,
                  int outer_class_index,
                  int inner_name_index,
                  int inner_access_flags)
Parameters:
inner_class_index - Class index in constant pool of inner class
outer_class_index - Class index in constant pool of outer class
inner_name_index - Name index in constant pool of inner class
inner_access_flags - Access flags of inner class
Method Detail

accept

public void accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
Specified by:
accept in interface Node
Parameters:
v - Visitor object

dump

public final void dump(java.io.DataOutputStream file)
                throws java.io.IOException
Dump inner class attribute to file stream in binary format.
Parameters:
file - Output file stream

getInnerAccessFlags

public final int getInnerAccessFlags()
Returns:
access flags of inner class.

getInnerClassIndex

public final int getInnerClassIndex()
Returns:
class index of inner class.

getInnerNameIndex

public final int getInnerNameIndex()
Returns:
name index of inner class.

getOuterClassIndex

public final int getOuterClassIndex()
Returns:
class index of outer class.

setInnerAccessFlags

public final void setInnerAccessFlags(int inner_access_flags)
Parameters:
inner_access_flags. -  

setInnerClassIndex

public final void setInnerClassIndex(int inner_class_index)
Parameters:
inner_class_index. -  

setInnerNameIndex

public final void setInnerNameIndex(int inner_name_index)
Parameters:
inner_name_index. -  

setOuterClassIndex

public final void setOuterClassIndex(int outer_class_index)
Parameters:
outer_class_index. -  

toString

public final java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
String representation.

toString

public final java.lang.String toString(ConstantPool constant_pool)
Returns:
Resolved string representation

copy

public InnerClass copy()
Returns:
deep copy of this object