org.apache.bcel.classfile
public abstract class Constant extends Object implements Cloneable, Node, Serializable
Modifier and Type | Field and Description |
---|---|
private static BCELComparator |
_cmp |
protected byte |
tag |
Constructor and Description |
---|
Constant(byte tag) |
Modifier and Type | Method and Description |
---|---|
abstract void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
Object |
clone() |
Constant |
copy() |
abstract void |
dump(DataOutputStream file) |
boolean |
equals(Object obj)
Return value as defined by given BCELComparator strategy.
|
static BCELComparator |
getComparator() |
byte |
getTag() |
int |
hashCode()
Return value as defined by given BCELComparator strategy.
|
(package private) static Constant |
readConstant(DataInputStream file)
Read one constant from the given file, the type depends on a tag byte.
|
static void |
setComparator(BCELComparator comparator) |
String |
toString() |
private static BCELComparator _cmp
protected byte tag
public abstract void accept(Visitor v)
public abstract void dump(DataOutputStream file) throws IOException
IOException
public final byte getTag()
public String toString()
public Constant copy()
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
static final Constant readConstant(DataInputStream file) throws IOException, ClassFormatException
file
- Input streamIOException
ClassFormatException
public static BCELComparator getComparator()
public static void setComparator(BCELComparator comparator)
comparator
- Comparison strategy objectpublic boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class Object
Object.hashCode()