com.gomjabbar.classes.bytecode
Class ConstantInfo

java.lang.Object
  |
  +--com.gomjabbar.classes.bytecode.ConstantInfo

public class ConstantInfo
extends java.lang.Object


Field Summary
static java.lang.String S_CLASS
           
static java.lang.String S_DOUBLE
           
static java.lang.String S_FIELD
           
static java.lang.String S_FLOAT
           
static java.lang.String S_INTEGER
           
static java.lang.String S_INTERFACE_METHOD
           
static java.lang.String S_LONG
           
static java.lang.String S_METHOD
           
static java.lang.String S_NAME_AND_TYPE
           
static java.lang.String S_STRING
           
static java.lang.String S_UTF8
           
 
Constructor Summary
protected ConstantInfo(PseudoClassFile pcf, byte[] b, long[] start)
           
  ConstantInfo(PseudoClassFile pcf, java.lang.String type, byte[] name_index, byte[] content_index)
          Allowed types : Type Name index Content index S_FIELD [Class] declaring_class [NameAndType] of the field S_METHOD [Class] declaring_class [NameAndType] of the method S_INTERFACE_METHOD [Class] declaring_interface [NameAndType] of the method S_NAME_AND_TYPE [UTF8] name [UTF8] descriptor
where [typeOfConstant] designs a valid index of a ConstantInfo of type typeOfConstant
  ConstantInfo(PseudoClassFile pcf, java.lang.String type, java.lang.Object value)
          Allowed types : Type Class of value S_STRINGjava.lang.String (the UTF8 ConstantInfo entry will be created) S_INTEGERjava.lang.Integer S_LONGjava.lang.Long S_FLOATjava.lang.Float S_DOUBLEjava.lang.Double S_UTF8java.lang.String S_CLASSjava.lang.String (the UTF8 ConstantInfo entry will be created)
 
Method Summary
 java.lang.Object getExplicitValue()
           
protected  int getNumberOfClassPoolEntries()
           
 PseudoClassFile getParent()
           
 java.lang.String getType()
           
 java.lang.Object getValue()
           
 java.lang.Object[] getValue2()
           
 byte[] toBytes()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

S_CLASS

public static final java.lang.String S_CLASS

S_FIELD

public static final java.lang.String S_FIELD

S_METHOD

public static final java.lang.String S_METHOD

S_INTERFACE_METHOD

public static final java.lang.String S_INTERFACE_METHOD

S_STRING

public static final java.lang.String S_STRING

S_INTEGER

public static final java.lang.String S_INTEGER

S_FLOAT

public static final java.lang.String S_FLOAT

S_LONG

public static final java.lang.String S_LONG

S_DOUBLE

public static final java.lang.String S_DOUBLE

S_NAME_AND_TYPE

public static final java.lang.String S_NAME_AND_TYPE

S_UTF8

public static final java.lang.String S_UTF8
Constructor Detail

ConstantInfo

public ConstantInfo(PseudoClassFile pcf,
                    java.lang.String type,
                    byte[] name_index,
                    byte[] content_index)
Allowed types :
Type
Name index Content index
S_FIELD [Class] declaring_class [NameAndType] of the field
S_METHOD [Class] declaring_class [NameAndType] of the method
S_INTERFACE_METHOD [Class] declaring_interface [NameAndType] of the method
S_NAME_AND_TYPE [UTF8] name [UTF8] descriptor
where [typeOfConstant] designs a valid index of a ConstantInfo of type typeOfConstant

ConstantInfo

public ConstantInfo(PseudoClassFile pcf,
                    java.lang.String type,
                    java.lang.Object value)
Allowed types :
Type Class of value
S_STRINGjava.lang.String (the UTF8 ConstantInfo entry will be created)
S_INTEGERjava.lang.Integer
S_LONGjava.lang.Long
S_FLOATjava.lang.Float
S_DOUBLEjava.lang.Double
S_UTF8java.lang.String
S_CLASSjava.lang.String (the UTF8 ConstantInfo entry will be created)

ConstantInfo

protected ConstantInfo(PseudoClassFile pcf,
                       byte[] b,
                       long[] start)
Method Detail

getNumberOfClassPoolEntries

protected int getNumberOfClassPoolEntries()

getParent

public PseudoClassFile getParent()

getExplicitValue

public java.lang.Object getExplicitValue()

getValue2

public java.lang.Object[] getValue2()

getValue

public java.lang.Object getValue()

toBytes

public byte[] toBytes()

getType

public java.lang.String getType()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object