|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.bcel.classfile.Constant
public abstract class Constant
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.
| Field Summary | |
|---|---|
private static BCELComparator |
_cmp
|
protected byte |
tag
|
| Constructor Summary | |
|---|---|
Constant(byte tag)
|
|
| Method Summary | |
|---|---|
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. |
java.lang.Object |
clone()
|
Constant |
copy()
|
abstract void |
dump(java.io.DataOutputStream file)
|
boolean |
equals(java.lang.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(java.io.DataInputStream file)
Read one constant from the given file, the type depends on a tag byte. |
static void |
setComparator(BCELComparator comparator)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static BCELComparator _cmp
protected byte tag
| Constructor Detail |
|---|
Constant(byte tag)
| Method Detail |
|---|
public abstract void accept(Visitor v)
accept in interface Nodev - Visitor object
public abstract void dump(java.io.DataOutputStream file)
throws java.io.IOException
java.io.IOExceptionpublic final byte getTag()
public java.lang.String toString()
toString in class java.lang.Objectpublic Constant copy()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
static final Constant readConstant(java.io.DataInputStream file)
throws java.io.IOException,
ClassFormatException
file - Input stream
java.io.IOException
ClassFormatExceptionpublic static BCELComparator getComparator()
public static void setComparator(BCELComparator comparator)
comparator - Comparison strategy objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||