|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.classfile.PooledConstant
this is an abstraction to contain all the constant items that can be created.
Constructor Summary | |
PooledConstant()
Constructs a new pooled constant. |
Method Summary | |
abstract boolean |
equals(java.lang.Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
short |
getIndex()
|
(package private) abstract java.lang.Object |
getLiteral()
Returns the associated literal |
(package private) int |
getSlotsUsed()
Returns the number of slots in the constant pool used by this entry. |
abstract int |
hashCode()
hashCode (a fast comparison) CONVENTION: return XXXXXXXXXXXX << 4 + Y with Y = ident of the type of the pooled constant |
(package private) abstract void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool. |
(package private) abstract void |
resolveConstants(PooledConstant pc)
Check location of constant value on constant pool. |
void |
setIndex(short index)
|
(package private) abstract void |
write(ConstantPool cp,
java.io.DataOutput out)
Write this class into the the file (out) getting data position from the constant pool. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public PooledConstant()
uniq
- A string that identifies this constant.Method Detail |
int getSlotsUsed()
abstract java.lang.Object getLiteral()
public abstract int hashCode()
hashCode
in class java.lang.Object
public abstract boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final short getIndex()
public final void setIndex(short index)
abstract void resolveConstants(ConstantPool cp)
cp
- The constant pool for this class.abstract void resolveConstants(PooledConstant pc)
pc
- The already in pooled constant.abstract void write(ConstantPool cp, java.io.DataOutput out) throws java.io.IOException
cp
- The constant pool that contain all data.out
- The file where to write this object infojava.io.IOException
- An io problem has occured.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |