|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.enhancer.classfile.ConstantPool
Constant Pool implementation - this represents the constant pool of a class in a class file.
Field Summary | |
private java.util.Hashtable |
classTable
|
private java.util.Hashtable |
doubleTable
|
private java.util.Vector |
fieldRefTable
|
private java.util.Hashtable |
floatTable
|
private boolean |
hashed
|
private java.util.Vector |
ifaceMethodRefTable
|
private java.util.Hashtable |
intTable
|
private java.util.Hashtable |
longTable
|
private java.util.Vector |
methodRefTable
|
private java.util.Vector |
nameAndTypeTable
|
private java.util.Vector |
pool
|
private java.util.Hashtable |
stringTable
|
private java.util.Hashtable |
unicodeTable
|
private java.util.Hashtable |
utfTable
|
Constructor Summary | |
(package private) |
ConstantPool()
|
(package private) |
ConstantPool(java.io.DataInputStream input)
|
Method Summary | |
ConstClass |
addClass(java.lang.String className)
Find or create a class constant in the pool |
ConstDouble |
addDouble(double d)
Find or create a double constant in the pool |
ConstFieldRef |
addFieldRef(java.lang.String className,
java.lang.String fieldName,
java.lang.String type)
Find or create a field constant in the pool |
ConstFloat |
addFloat(float f)
Find or create a float constant in the pool |
ConstInteger |
addInteger(int i)
Find or create an integer constant in the pool |
ConstInterfaceMethodRef |
addInterfaceMethodRef(java.lang.String className,
java.lang.String methodName,
java.lang.String type)
Find or create an interface method constant in the pool |
ConstLong |
addLong(long l)
Find or create a long constant in the pool |
ConstMethodRef |
addMethodRef(java.lang.String className,
java.lang.String methodName,
java.lang.String type)
Find or create a method constant in the pool |
ConstNameAndType |
addNameAndType(java.lang.String name,
java.lang.String type)
Find or create a name/type constant in the pool |
ConstString |
addString(java.lang.String s)
Find or create a string constant in the pool |
ConstUnicode |
addUnicode(java.lang.String s)
Find or create a unicode constant in the pool Obsolete? |
ConstUtf8 |
addUtf8(java.lang.String s)
Find or create a utf8 constant in the pool |
ConstBasic |
constantAt(int index)
Return the constant in the pool at the specified entry index |
private void |
hashConstants()
|
private void |
internConstant(ConstBasic c)
|
int |
nEntries()
Return the number of pool entries. |
(package private) void |
print(java.io.PrintStream out,
int indent)
|
private int |
readConstant(java.io.DataInputStream input)
|
private void |
recordConstant(ConstBasic c)
|
private void |
resolvePool()
|
private ConstBasicMemberRef |
searchTable(java.util.Vector table,
java.lang.String cname,
java.lang.String mname,
java.lang.String sig)
|
(package private) void |
summarize(java.io.PrintStream out,
int indent)
|
(package private) void |
write(java.io.DataOutputStream buff)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Vector pool
private boolean hashed
private java.util.Hashtable utfTable
private java.util.Hashtable unicodeTable
private java.util.Hashtable stringTable
private java.util.Hashtable classTable
private java.util.Hashtable intTable
private java.util.Hashtable floatTable
private java.util.Hashtable longTable
private java.util.Hashtable doubleTable
private java.util.Vector methodRefTable
private java.util.Vector fieldRefTable
private java.util.Vector ifaceMethodRefTable
private java.util.Vector nameAndTypeTable
Constructor Detail |
ConstantPool()
ConstantPool(java.io.DataInputStream input) throws java.io.IOException
Method Detail |
public int nEntries()
public ConstBasic constantAt(int index)
public ConstClass addClass(java.lang.String className)
public ConstFieldRef addFieldRef(java.lang.String className, java.lang.String fieldName, java.lang.String type)
public ConstMethodRef addMethodRef(java.lang.String className, java.lang.String methodName, java.lang.String type)
public ConstInterfaceMethodRef addInterfaceMethodRef(java.lang.String className, java.lang.String methodName, java.lang.String type)
public ConstString addString(java.lang.String s)
public ConstInteger addInteger(int i)
public ConstFloat addFloat(float f)
public ConstLong addLong(long l)
public ConstDouble addDouble(double d)
public ConstNameAndType addNameAndType(java.lang.String name, java.lang.String type)
public ConstUtf8 addUtf8(java.lang.String s)
public ConstUnicode addUnicode(java.lang.String s)
void print(java.io.PrintStream out, int indent)
void summarize(java.io.PrintStream out, int indent)
void write(java.io.DataOutputStream buff) throws java.io.IOException
java.io.IOException
private void resolvePool()
private void hashConstants()
private int readConstant(java.io.DataInputStream input) throws java.io.IOException
java.io.IOException
private void internConstant(ConstBasic c)
private void recordConstant(ConstBasic c)
private ConstBasicMemberRef searchTable(java.util.Vector table, java.lang.String cname, java.lang.String mname, java.lang.String sig)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |