|
JML | ||||||||||
| 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 String |
value
|
| Fields inherited from class org.multijava.util.classfile.PooledConstant |
|
| Constructor Summary | |
AsciiConstant(String value)
Constructs a new ASCII (UTF8) pooled constant |
|
| Method Summary | |
int |
compareTo(Object o)
|
boolean |
equals(Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
(package private) Object |
getLiteral()
Returns the value of the constant. |
(package private) 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(String value)
Returns the value of the constant. |
String |
toString()
|
(package private) 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 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 String value
| Constructor Detail |
public AsciiConstant(String value)
value - the value of the ascii constant| Method Detail |
String getValue()
void setValue(String value)
Object getLiteral()
public String toString()
toString in class PooledConstant
public int compareTo(Object o)
throws ClassCastException
ClassCastExceptionpublic final int hashCode()
hashCode in class PooledConstantpublic final boolean equals(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,
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
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||