|
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.ClassConstant
This is used to create a Class constant pool item
| Field Summary | |
private AsciiConstant |
name
|
| Fields inherited from class org.multijava.util.classfile.PooledConstant |
|
| Constructor Summary | |
ClassConstant(String name)
Constructs a new class constant. |
|
ClassConstant(AsciiConstant name)
Constructs a new class 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 associated literal: this constant type has none |
String |
getName()
|
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 |
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 AsciiConstant name
| Constructor Detail |
public ClassConstant(String name)
name - the qualified name of the classpublic ClassConstant(AsciiConstant name)
name - the qualified name of the class| Method Detail |
public String getName()
Object getLiteral()
public String toString()
toString in class PooledConstant
public int compareTo(Object o)
throws ClassCastException
compareTo in interface ComparableClassCastExceptionpublic 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
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||