|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.transjvm.jvm.ConstantPool
public class ConstantPool
Field Summary | |
---|---|
int |
uniqueID
An unique identifier for a ConstantPool. |
Constructor Summary | |
---|---|
ConstantPool()
|
Method Summary | |
---|---|
int |
getClassRef(java.lang.String name)
Returns an index for the named class. |
int |
getClassRef(UTF name)
Returns an index for the named class. |
int |
getDouble(double d)
Returns an index for the double d |
int |
getFieldRef(int classRef,
java.lang.String name,
UTF descriptor)
Returns an index for the specified field. |
int |
getFloat(float f)
Returns an index for the float f |
int |
getInteger(int i)
Returns an index for the integer i |
int |
getInterfaceMethodRef(int classRef,
java.lang.String name,
UTF descriptor)
Returns an index for the specified interface method. |
int |
getLong(long l)
Returns an index for the long l |
int |
getMethodRef(int classRef,
java.lang.String name,
UTF descriptor)
Returns an index for the specified method. |
int |
getString(java.lang.String s)
Returns an index for the String s |
int |
getUtf(java.lang.String s)
Returns an UTF index for the String s |
int |
getUtf(UTF utf)
Returns an index for the UTF utf |
int |
size()
The size (in bytes not entries) of this ConstantPool |
void |
writeTo(byte[] bytes,
int offset)
Writes this ConstantPool to a byte array starting at offset. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int uniqueID
cp1.uniqueID == cp2.uniqueID
if and only if
cp1 == cp2
.
Primarily a cheap way for Objects to keep tags on which ConstantPool(s) they have been written
to without unintentional object retentions or WeakReferences.
Constructor Detail |
---|
public ConstantPool()
Method Detail |
---|
public void writeTo(byte[] bytes, int offset)
bytes
- The array to write to.offset
- Offset from start of array to write to.
java.lang.ArrayIndexOutOfBoundsException
- if size() + offset > bytes.length
public int size()
public int getUtf(java.lang.String s)
public int getUtf(UTF utf)
public int getString(java.lang.String s)
public int getInteger(int i)
public int getLong(long l)
public int getFloat(float f)
public int getDouble(double d)
public int getClassRef(java.lang.String name)
public int getClassRef(UTF name)
public int getFieldRef(int classRef, java.lang.String name, UTF descriptor)
public int getMethodRef(int classRef, java.lang.String name, UTF descriptor)
public int getInterfaceMethodRef(int classRef, java.lang.String name, UTF descriptor)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |