Fields Summary |
---|
short | indexIndex of this item in the constant pool. |
int | typeType 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 one of the constants defined in the
{@link ClassWriter ClassWriter} class. |
int | intValValue of this item, for a {@link ClassWriter#INT INT} item. |
long | longValValue of this item, for a {@link ClassWriter#LONG LONG} item. |
float | floatValValue of this item, for a {@link ClassWriter#FLOAT FLOAT} item. |
double | doubleValValue of this item, for a {@link ClassWriter#DOUBLE DOUBLE} item. |
String | strVal1First part of the value of this item, for items that do not hold a
primitive value. |
String | strVal2Second part of the value of this item, for items that do not hold a
primitive value. |
String | strVal3Third part of the value of this item, for items that do not hold a
primitive value. |
int | hashCodeThe hash code value of this constant pool item. |
Item | nextLink to another constant pool item, used for collision lists in the
constant pool's hash table. |
Methods Summary |
---|
boolean | isEqualTo(oracle.toplink.libraries.asm.Item i)Indicates if the given item is equal to this one.
if (i.type == type) {
switch (type) {
case ClassWriter.INT:
return i.intVal == intVal;
case ClassWriter.LONG:
return i.longVal == longVal;
case ClassWriter.FLOAT:
return i.floatVal == floatVal;
case ClassWriter.DOUBLE:
return i.doubleVal == doubleVal;
case ClassWriter.UTF8:
case ClassWriter.STR:
case ClassWriter.CLASS:
return i.strVal1.equals(strVal1);
case ClassWriter.NAME_TYPE:
return i.strVal1.equals(strVal1) &&
i.strVal2.equals(strVal2);
//case ClassWriter.FIELD:
//case ClassWriter.METH:
//case ClassWriter.IMETH:
default:
return i.strVal1.equals(strVal1) &&
i.strVal2.equals(strVal2) &&
i.strVal3.equals(strVal3);
}
}
return false;
|
void | set(int intVal)Sets this item to an {@link ClassWriter#INT INT} item.
this.type = ClassWriter.INT;
this.intVal = intVal;
this.hashCode = 0x7FFFFFFF & (type + intVal);
|
void | set(long longVal)Sets this item to a {@link ClassWriter#LONG LONG} item.
this.type = ClassWriter.LONG;
this.longVal = longVal;
this.hashCode = 0x7FFFFFFF & (type + (int)longVal);
|
void | set(float floatVal)Sets this item to a {@link ClassWriter#FLOAT FLOAT} item.
this.type = ClassWriter.FLOAT;
this.floatVal = floatVal;
this.hashCode = 0x7FFFFFFF & (type + (int)floatVal);
|
void | set(double doubleVal)Sets this item to a {@link ClassWriter#DOUBLE DOUBLE} item.
this.type = ClassWriter.DOUBLE;
this.doubleVal = doubleVal;
this.hashCode = 0x7FFFFFFF & (type + (int)doubleVal);
|
void | set(int type, java.lang.String strVal1, java.lang.String strVal2, java.lang.String strVal3)Sets this item to an item that do not hold a primitive value.
this.type = type;
this.strVal1 = strVal1;
this.strVal2 = strVal2;
this.strVal3 = strVal3;
switch (type) {
case ClassWriter.UTF8:
case ClassWriter.STR:
case ClassWriter.CLASS:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode());
return;
case ClassWriter.NAME_TYPE:
hashCode = 0x7FFFFFFF & (type + strVal1.hashCode()*strVal2.hashCode());
return;
//case ClassWriter.FIELD:
//case ClassWriter.METH:
//case ClassWriter.IMETH:
default:
hashCode = 0x7FFFFFFF & (type +
strVal1.hashCode()*strVal2.hashCode()*strVal3.hashCode());
}
|