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.ClassGen.ConstantPoolGen
Constructor Summary | |
ConstantPoolGen(Constant[] c)
Initialize with given array of constants. |
|
ConstantPoolGen(ConstantPool cp)
Initialize with given constant pool. |
|
ConstantPoolGen()
Create empty constant pool. |
Method Summary | |
int | addArrayClass(Type type)
Add a reference to an array class (e.g. |
int | addClass(java.lang.String str)
Add a new Class reference to the ConstantPool, if it is not already in there. |
int | addConstant(Constant c)
Add a given constant (without checking for double entries). |
int | addDouble(double n)
Add a new double constant to the ConstantPool, if it is not already in there. |
int | addFieldref(java.lang.String class_name,
java.lang.String field_name,
java.lang.String signature)
Add a new Fieldref constant to the ConstantPool, if it is not already in there. |
int | addFloat(float n)
Add a new Float constant to the ConstantPool, if it is not already in there. |
int | addInteger(int n)
Add a new Integer constant to the ConstantPool, if it is not already in there. |
int | addInterfaceMethodref(java.lang.String class_name,
java.lang.String method_name,
java.lang.String signature)
Add a new InterfaceMethodref constant to the ConstantPool, if it is not already in there. |
int | addLong(long n)
Add a new long constant to the ConstantPool, if it is not already in there. |
int | addMethodref(java.lang.String class_name,
java.lang.String method_name,
java.lang.String signature)
Add a new Methodref constant to the ConstantPool, if it is not already in there. |
int | addNameAndType(java.lang.String name,
java.lang.String signature)
Add a new NameAndType constant to the ConstantPool if it is not already in there. |
int | addString(java.lang.String str)
Add a new String constant to the ConstantPool, if it is not already in there. |
int | addUnicode(java.lang.String n)
Add a new Unicode constant to the ConstantPool, if it is not already in there. |
int | addUtf8(java.lang.String n)
Add a new Utf8 constant to the ConstantPool, if it is not already in there. |
Constant | getConstant(int i)
|
ConstantPool | getConstantPool()
|
ConstantPool | getFinalConstantPool()
|
int | getSize()
|
int | lookupClass(java.lang.String str)
Look for ConstantClass in ConstantPool named `str'. |
int | lookupConstant(Constant c)
Look up constant in ConstantPool. |
int | lookupDouble(double n)
Look for ConstantDouble in ConstantPool. |
int | lookupFieldref(java.lang.String class_name,
java.lang.String field_name,
java.lang.String signature)
Look for ConstantFieldref in ConstantPool. |
int | lookupFloat(float n)
Look for ConstantFloat in ConstantPool. |
int | lookupInteger(int n)
Look for ConstantInteger in ConstantPool. |
int | lookupInterfaceMethodref(java.lang.String class_name,
java.lang.String method_name,
java.lang.String signature)
Look for ConstantInterfaceMethodref in ConstantPool. |
int | lookupLong(long n)
Look for ConstantLong in ConstantPool. |
int | lookupMethodref(java.lang.String class_name,
java.lang.String method_name,
java.lang.String signature)
Look for ConstantMethodref in ConstantPool. |
int | lookupNameAndType(java.lang.String name,
java.lang.String signature)
Look for ConstantNameAndType in ConstantPool. |
int | lookupString(java.lang.String str)
Look for ConstantString in ConstantPool containing String `str'. |
int | lookupUnicode(java.lang.String n)
Look for ConstantUnicode in ConstantPool. |
int | lookupUtf8(java.lang.String n)
Look for ConstantUtf8 in ConstantPool. |
void | setConstant(int i,
Constant c)
Use with care! |
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 ConstantPoolGen(Constant[] c)
c
- array of given constants, new ones will be appendedpublic ConstantPoolGen(ConstantPool cp)
public ConstantPoolGen()
Method Detail |
public final int lookupString(java.lang.String str)
str
- String to search forpublic final int addString(java.lang.String str)
str
- String to addpublic final int lookupClass(java.lang.String str)
str
- String to search forpublic final int addClass(java.lang.String str)
str
- Class to addpublic final int addArrayClass(Type type)
type
- type of array classpublic final int lookupInteger(int n)
n
- integer number to look forpublic final int addInteger(int n)
n
- integer number to addpublic final int lookupFloat(float n)
n
- Float number to look forpublic final int addFloat(float n)
n
- Float number to addpublic final int lookupUnicode(java.lang.String n)
n
- Unicode string to look forpublic final int addUnicode(java.lang.String n)
n
- Unicode string to addpublic final int lookupUtf8(java.lang.String n)
n
- Utf8 string to look forpublic final int addUtf8(java.lang.String n)
n
- Utf8 string to addpublic final int lookupLong(long n)
n
- Long number to look forpublic final int addLong(long n)
n
- Long number to addpublic final int lookupDouble(double n)
n
- Double number to look forpublic final int addDouble(double n)
n
- Double number to addpublic final int lookupNameAndType(java.lang.String name, java.lang.String signature)
name
- of variable/method
signature
- of variable/methodpublic final int addNameAndType(java.lang.String name, java.lang.String signature)
n
- NameAndType string to addpublic final int lookupMethodref(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)
class_name
- Where to find method
method_name
- Guess what
signature
- return and argument typespublic final int addMethodref(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)
n
- Methodref string to addpublic final int lookupInterfaceMethodref(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)
class_name
- Where to find method
method_name
- Guess what
signature
- return and argument typespublic final int addInterfaceMethodref(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)
n
- InterfaceMethodref string to addpublic final int lookupFieldref(java.lang.String class_name, java.lang.String field_name, java.lang.String signature)
class_name
- Where to find method
field_name
- Guess what
signature
- return and argument typespublic final int addFieldref(java.lang.String class_name, java.lang.String field_name, java.lang.String signature)
n
- Fieldref string to addpublic final int addConstant(Constant c)
c
- Constant to addpublic final int lookupConstant(Constant c)
c
- constant to look uppublic Constant getConstant(int i)
i
- index in constant poolpublic void setConstant(int i, Constant c)
i
- index in constant pool
c
- new constant pool entry at index ipublic ConstantPool getConstantPool()
public int getSize()
public ConstantPool getFinalConstantPool()
public final java.lang.String toString()
Overview | Package | Class | Tree | Deprecated | Index | Help | |||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |