Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--DE.fub.inf.JVM.JavaClass.ConstantPool
Constructor Summary | |
ConstantPool(Constant[] constant_pool)
|
Method Summary | |
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.String | constantToString(Constant c)
Resolve constant to a string representation. |
java.lang.String | constantToString(int index,
byte tag)
Retrieve constant at `index' from constant pool and resolve it to a string representation. |
ConstantPool | copy()
|
void | dump(java.io.DataOutputStream file)
Dump constant pool to file stream in binary format. |
Constant | getConstant(int index)
Get constant from constant pool. |
Constant | getConstant(int index,
byte tag)
Get constant from constant pool and check whether it has the expected type. |
Constant[] | getConstantPool()
|
java.lang.String | getConstantString(int index,
byte tag)
Get string from constant pool and bypass the indirection of `ConstantClass' and `ConstantString' objects. |
int | getLength()
|
void | setConstant(int index,
Constant constant)
|
void | setConstantPool(Constant[] constant_pool)
|
java.lang.String | toString()
|
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public ConstantPool(Constant[] constant_pool)
constant_pool
- Array of constantsMethod Detail |
public void accept(Visitor v)
v
- Visitor objectpublic java.lang.String constantToString(Constant c) throws java.lang.ClassFormatError
constant
- Constant to be printedpublic java.lang.String constantToString(int index, byte tag) throws java.lang.ClassFormatError
index
- of constant in constant pool
tag
- expected typepublic void dump(java.io.DataOutputStream file) throws java.io.IOException
file
- Output file streampublic final Constant getConstant(int index)
index
- Index in constant poolpublic final Constant getConstant(int index, byte tag) throws java.lang.ClassFormatError
index
- Index in constant pool
tag
- Tag of expected constant, i.e. its typepublic final Constant[] getConstantPool()
public final java.lang.String getConstantString(int index, byte tag) throws java.lang.ClassFormatError
index
- Index in constant pool
tag
- Tag of expected constant, either ConstantClass or ConstantStringpublic final int getLength()
public final void setConstant(int index, Constant constant)
constant
- Constant to setpublic final void setConstantPool(Constant[] constant_pool)
constant_pool
- public final java.lang.String toString()
public ConstantPool copy()
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |