org.compass.core.util.asm.optimizer
Class Constant

java.lang.Object
  extended by org.compass.core.util.asm.optimizer.Constant

 class Constant
extends Object

A constant pool item.

Author:
Eric Bruneton

Field Summary
(package private)  double doubleVal
          Value of this item, for a double item.
(package private)  float floatVal
          Value of this item, for a float item.
(package private)  int hashCode
          The hash code value of this constant pool item.
(package private)  int intVal
          Value of this item, for an integer item.
(package private)  long longVal
          Value of this item, for a long item.
(package private)  String strVal1
          First part of the value of this item, for items that do not hold a primitive value.
(package private)  String strVal2
          Second part of the value of this item, for items that do not hold a primitive value.
(package private)  String strVal3
          Third part of the value of this item, for items that do not hold a primitive value.
(package private)  char type
          Type of this constant pool item.
 
Constructor Summary
Constant()
           
Constant(Constant i)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
(package private)  void set(char type, String strVal1, String strVal2, String strVal3)
          Sets this item to an item that do not hold a primitive value.
(package private)  void set(double doubleVal)
          Sets this item to a double item.
(package private)  void set(float floatVal)
          Sets this item to a float item.
(package private)  void set(int intVal)
          Sets this item to an integer item.
(package private)  void set(long longVal)
          Sets this item to a long item.
(package private)  void write(ClassWriter cw)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

char type
Type of this constant pool item. A single class is used to represent all constant pool item types, in order to minimize the bytecode size of this package. The value of this field is I, J, F, D, S, s, C, T, G, M, or N (for Constant Integer, Long, Float, Double, STR, UTF8, Class, NameType, Fieldref, Methodref, or InterfaceMethodref constant pool items respectively).


intVal

int intVal
Value of this item, for an integer item.


longVal

long longVal
Value of this item, for a long item.


floatVal

float floatVal
Value of this item, for a float item.


doubleVal

double doubleVal
Value of this item, for a double item.


strVal1

String strVal1
First part of the value of this item, for items that do not hold a primitive value.


strVal2

String strVal2
Second part of the value of this item, for items that do not hold a primitive value.


strVal3

String strVal3
Third part of the value of this item, for items that do not hold a primitive value.


hashCode

int hashCode
The hash code value of this constant pool item.

Constructor Detail

Constant

Constant()

Constant

Constant(Constant i)
Method Detail

set

void set(int intVal)
Sets this item to an integer item.

Parameters:
intVal - the value of this item.

set

void set(long longVal)
Sets this item to a long item.

Parameters:
longVal - the value of this item.

set

void set(float floatVal)
Sets this item to a float item.

Parameters:
floatVal - the value of this item.

set

void set(double doubleVal)
Sets this item to a double item.

Parameters:
doubleVal - the value of this item.

set

void set(char type,
         String strVal1,
         String strVal2,
         String strVal3)
Sets this item to an item that do not hold a primitive value.

Parameters:
type - the type of this item.
strVal1 - first part of the value of this item.
strVal2 - second part of the value of this item.
strVal3 - third part of the value of this item.

write

void write(ClassWriter cw)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright (c) 2004-2008 The Compass Project.