org.apache.bcel.classfile
Class ConstantClass
- Cloneable, ConstantObject, Node, Serializable
public final class ConstantClass
This class is derived from the abstract
Constant class
and represents a reference to a (external) class.
$Id: ConstantClass.java 386056 2006-03-15 11:31:56Z tcurdt $
accept , clone , copy , dump , equals , getComparator , getTag , hashCode , readConstant , setComparator , toString |
name_index
private int name_index
ConstantClass
(package private) ConstantClass(DataInputStream file)
throws IOException
Initialize instance from file data.
ConstantClass
public ConstantClass(int name_index)
name_index
- Name index in constant pool. Should refer to a
ConstantUtf8.
ConstantClass
public ConstantClass(ConstantClass c)
Initialize from another object.
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.
- accept in interface Node
- accept in interface Constant
dump
public final void dump(DataOutputStream file)
throws IOException
Dump constant class to file stream in binary format.
- dump in interface Constant
file
- Output file stream
getNameIndex
public final int getNameIndex()
- Name index in constant pool of class name.
setNameIndex
public final void setNameIndex(int name_index)
name_index
- the name index in the constant pool of this Constant Class