All Packages Class Hierarchy This Package Previous Next Index
Class shai.vmutils.ConstantPoolEntry
java.lang.Object
|
+----shai.vmutils.ConstantPoolEntry
- public class ConstantPoolEntry
- extends Object
- implements Constants
each instance of this class represents an entry in the constant pool.
-
data
-
-
type
-
-
ConstantPoolEntry(Object, byte)
- construct an entry in the constant pool.
-
getConstantPoolEntry(byte, DataInputStream)
- This factory method creates a contant pool entry.
-
getInt()
- This method returns this entry as an integer.
-
getString()
- This method returns this entry as a String.
-
getType()
- This method returns the type of this entry.
-
getTypeAsString()
- This method returns the type of the current constant pool entry as a String
which is helpfull for displaying the entry information.
-
isClass()
- This method returns true if the type of this entry is a class.
-
isDouble()
- This method returns true if the type of this entry is a class.
-
isField()
- This method returns true if the type of this entry is a class.
-
isFloat()
- This method returns true if the type of this entry is a class.
-
isInteger()
- This method returns true if the type of this entry is a class.
-
isInterfaceMethod()
- This method returns true if the type of this entry is a class.
-
isLong()
- This method returns true if the type of this entry is a class.
-
isMethod()
- This method returns true if the type of this entry is a class.
-
isNameAndType()
- This method returns true if the type of this entry is a class.
-
isString()
- This method returns true if the type of this entry is a class.
-
isUTF8()
- This method returns true when the entry is of UTF8 type.
-
save(DataOutputStream)
- This method was created by a SmartGuide.
-
toString()
- This method returns the value of the current field as a string.
type
private byte type
data
private Object data
ConstantPoolEntry
public ConstantPoolEntry(Object data,
byte type)
- construct an entry in the constant pool.
getConstantPoolEntry
public static ConstantPoolEntry getConstantPoolEntry(byte type,
DataInputStream stream) throws ClassFormatError, IOException
- This factory method creates a contant pool entry.
It was built for use while iterating through the class file header.
- Parameters:
- type - byte
- stream - DataInputStream
- Returns:
- shai.vmutils.ConstantPoolEntry
getInt
public int getInt()
- This method returns this entry as an integer.
- Returns:
- int
getString
public String getString()
- This method returns this entry as a String.
- Returns:
- String
getType
public byte getType()
- This method returns the type of this entry.
- Returns:
- byte
getTypeAsString
public String getTypeAsString()
- This method returns the type of the current constant pool entry as a String
which is helpfull for displaying the entry information.
- Returns:
- java.lang.String
isClass
public boolean isClass()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isDouble
public boolean isDouble()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isField
public boolean isField()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isFloat
public boolean isFloat()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isInteger
public boolean isInteger()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isInterfaceMethod
public boolean isInterfaceMethod()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isLong
public boolean isLong()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isMethod
public boolean isMethod()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isNameAndType
public boolean isNameAndType()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isString
public boolean isString()
- This method returns true if the type of this entry is a class.
- Returns:
- boolean
isUTF8
public boolean isUTF8()
- This method returns true when the entry is of UTF8 type.
- Returns:
- boolean
save
public void save(DataOutputStream outputStream) throws IOException
- This method was created by a SmartGuide.
- Parameters:
- outputStream - java.io.DataOutputStream
- Throws: IOException
- The exception description.
toString
public String toString()
- This method returns the value of the current field as a string. It is quite usless without
the type which is expressed in the getType as string method.
- Returns:
- java.lang.String
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index