|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.PooledConstant
org.multijava.util.classfile.AsciiConstant
This is a class to create Ascii Constant entries.
| Field Summary | |
private java.lang.String |
value
|
| Fields inherited from class org.multijava.util.classfile.PooledConstant |
|
| Constructor Summary | |
AsciiConstant(java.lang.String value)
Constructs a new ASCII (UTF8) pooled constant |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
|
boolean |
equals(java.lang.Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
(package private) java.lang.Object |
getLiteral()
Returns the value of the constant. |
(package private) java.lang.String |
getValue()
Returns the value of the constant. |
int |
hashCode()
hashCode (a fast comparison) CONVENTION: return XXXXXXXXXXXX << 4 + Y with Y = ident of the type of the pooled constant |
(package private) void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
(package private) void |
resolveConstants(PooledConstant pc)
Check location of constant value on constant pool |
(package private) void |
setValue(java.lang.String value)
Returns the value of the constant. |
java.lang.String |
toString()
|
(package private) 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 org.multijava.util.classfile.PooledConstant |
getIndex, getSlotsUsed, setIndex |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String value
| Constructor Detail |
public AsciiConstant(java.lang.String value)
value - the value of the ascii constant| Method Detail |
java.lang.String getValue()
void setValue(java.lang.String value)
java.lang.Object getLiteral()
public java.lang.String toString()
toString in class PooledConstant
public int compareTo(java.lang.Object o)
throws java.lang.ClassCastException
java.lang.ClassCastExceptionpublic final int hashCode()
hashCode in class PooledConstantpublic final boolean equals(java.lang.Object o)
equals in class PooledConstantfinal void resolveConstants(PooledConstant pc)
pc - the already in pooled constant
ASSERT pc.getClass() == this.getClass()void resolveConstants(ConstantPool cp)
cp - the constant pool for this class
void write(ConstantPool _cp,
java.io.DataOutput out)
throws java.io.IOException
_cp - the constant pool that contain all dataout - the file where to write this object info
java.io.IOException - an io problem has occured
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||