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,v 1.3 2002/03/11 16:16:35 mdahm Exp $
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)