|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--at.dms.classfile.PooledConstant | +--at.dms.classfile.AsciiConstant
An UTF8 constant in the constant pool of the class file. The name of this class is historically wrong, since Java supports the Unicode UCS2 character set, not just ASCII.
Constructor Summary | |
AsciiConstant(java.lang.String value)
Constructs a new UTF8 pooled constant. |
Method Summary | |
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. |
(package private) void |
write(ConstantPool _cp,
java.io.DataOutput out)
Writes this constant to a class file. |
Methods inherited from class at.dms.classfile.PooledConstant |
getIndex, getSlotsUsed, setIndex |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public AsciiConstant(java.lang.String value)
value
- The value of the constant.Method Detail |
java.lang.String getValue()
void setValue(java.lang.String value)
java.lang.Object getLiteral()
getLiteral
in class PooledConstant
public final int hashCode()
hashCode
in class PooledConstant
public final boolean equals(java.lang.Object o)
equals
in class PooledConstant
final void resolveConstants(PooledConstant pc)
resolveConstants
in class PooledConstant
pc
- The pooled constant.
ASSERT pc.getClass() == this.getClass()void resolveConstants(ConstantPool cp)
resolveConstants
in class PooledConstant
cp
- The constant pool for this class.void write(ConstantPool _cp, java.io.DataOutput out) throws java.io.IOException
write
in class PooledConstant
cp
- The constant pool that this constant is in.out
- Where to write this constant.java.io.IOException
- an io problem has occured
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |