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.


Variable Index

 o data
 o type

Constructor Index

 o ConstantPoolEntry(Object, byte)
construct an entry in the constant pool.

Method Index

 o getConstantPoolEntry(byte, DataInputStream)
This factory method creates a contant pool entry.
 o getInt()
This method returns this entry as an integer.
 o getString()
This method returns this entry as a String.
 o getType()
This method returns the type of this entry.
 o getTypeAsString()
This method returns the type of the current constant pool entry as a String which is helpfull for displaying the entry information.
 o isClass()
This method returns true if the type of this entry is a class.
 o isDouble()
This method returns true if the type of this entry is a class.
 o isField()
This method returns true if the type of this entry is a class.
 o isFloat()
This method returns true if the type of this entry is a class.
 o isInteger()
This method returns true if the type of this entry is a class.
 o isInterfaceMethod()
This method returns true if the type of this entry is a class.
 o isLong()
This method returns true if the type of this entry is a class.
 o isMethod()
This method returns true if the type of this entry is a class.
 o isNameAndType()
This method returns true if the type of this entry is a class.
 o isString()
This method returns true if the type of this entry is a class.
 o isUTF8()
This method returns true when the entry is of UTF8 type.
 o save(DataOutputStream)
This method was created by a SmartGuide.
 o toString()
This method returns the value of the current field as a string.

Variables

 o type
 private byte type
 o data
 private Object data

Constructors

 o ConstantPoolEntry
 public ConstantPoolEntry(Object data,
                          byte type)
construct an entry in the constant pool.

Methods

 o 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
 o getInt
 public int getInt()
This method returns this entry as an integer.

Returns:
int
 o getString
 public String getString()
This method returns this entry as a String.

Returns:
String
 o getType
 public byte getType()
This method returns the type of this entry.

Returns:
byte
 o 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
 o isClass
 public boolean isClass()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isDouble
 public boolean isDouble()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isField
 public boolean isField()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isFloat
 public boolean isFloat()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isInteger
 public boolean isInteger()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isInterfaceMethod
 public boolean isInterfaceMethod()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isLong
 public boolean isLong()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isMethod
 public boolean isMethod()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isNameAndType
 public boolean isNameAndType()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isString
 public boolean isString()
This method returns true if the type of this entry is a class.

Returns:
boolean
 o isUTF8
 public boolean isUTF8()
This method returns true when the entry is of UTF8 type.

Returns:
boolean
 o 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.
 o 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