org.apache.bcel.classfile
Class Constant
java.lang.Object
org.apache.bcel.classfile.Constant
- Cloneable, Node, Serializable
public abstract class Constant
extends java.lang.Object
implements Cloneable, Node, Serializable
Abstract superclass for classes to represent the different constant types
in the constant pool of a class file. The classes keep closely to
the JVM specification.
Version:
- M. Dahm
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
v
- Visitor object
clone
public Object clone()
throws CloneNotSupportedException
copy
public Constant copy()
- deep copy of this constant
dump
public void dump(DataOutputStream file)
throws IOException
getTag
public final byte getTag()
- Tag of constant, i.e., its type. No setTag() method to avoid
confusion.
toString
public String toString()
- String representation.