|
||||||||||
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.ClassConstant
A ClassConstant record from the constant pool.
Constructor Summary | |
ClassConstant(AsciiConstant name)
Constructs a new class constant. |
|
ClassConstant(java.lang.String name)
Constructs a new class 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 associated literal: this constant type has none. |
java.lang.String |
getName()
Returns the fully qualified name of the class that is referred to by this ClassConstant. |
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 |
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 at.dms.classfile.PooledConstant |
getIndex, getSlotsUsed, setIndex |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ClassConstant(java.lang.String name)
name
- The qualified name of the class.public ClassConstant(AsciiConstant name)
name
- The qualified name of the class.Method Detail |
public java.lang.String getName()
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 constant that is already in the constant pool.
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 contain all data.out
- The file where to write this object info.java.io.IOException
- An io problem has occured.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |