|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.PooledConstant
this is an abstraction to contain all the constant items that can be created.
| Field Summary | |
private short |
index
An index to this constants position in the constant pool. |
private boolean |
isIndexSet
Flag indicates whether the index field has been explicitly set. |
| Constructor Summary | |
PooledConstant()
Constructs a new pooled constant. |
|
| Method Summary | |
abstract boolean |
equals(Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
short |
getIndex()
|
(package private) abstract Object |
getLiteral()
Returns the associated literal |
(package private) int |
getSlotsUsed()
Returns the number of slots in the constant pool used by this entry This number is normally 1. |
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)
|
String |
toString()
|
(package private) abstract void |
write(ConstantPool cp,
DataOutput out)
Write this class into the the file (out) getting data position from the constant pool |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private boolean isIndexSet
private short index
isIndexSet| Constructor Detail |
public PooledConstant()
| Method Detail |
int getSlotsUsed()
abstract Object getLiteral()
public abstract int hashCode()
hashCode in class Objectpublic abstract boolean equals(Object o)
equals in class Objectpublic final short getIndex()
public final void setIndex(short index)
public String toString()
toString in class Objectabstract void resolveConstants(ConstantPool cp)
cp - the constant pool for this classabstract void resolveConstants(PooledConstant pc)
pc - the already in pooled constant
abstract void write(ConstantPool cp,
DataOutput out)
throws IOException
cp - the constant pool that contain all dataout - the file where to write this object info
IOException - an io problem has occured
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||