|
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.NameAndTypeConstant
This constant represent a name and a type in the contant pool
| Field Summary | |
private AsciiConstant |
name
|
private AsciiConstant |
type
|
| Fields inherited from class org.multijava.util.classfile.PooledConstant |
|
| Constructor Summary | |
NameAndTypeConstant(String name,
String type)
Constructs a name/type constant pool entry. |
|
NameAndTypeConstant(AsciiConstant name,
AsciiConstant type)
Constructs a name/type constant pool entry. |
|
| Method Summary | |
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()
Returns the name of this constant |
String |
getType()
Returns the the type of this 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 |
void |
setName(String name)
Sets the name of this constant |
(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, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private AsciiConstant name
private AsciiConstant type
| Constructor Detail |
public NameAndTypeConstant(String name,
String type)
name - the name of the symboltype - the signature of the symbol
public NameAndTypeConstant(AsciiConstant name,
AsciiConstant type)
name - the name of the symboltype - the signature of the symbol| Method Detail |
public String getName()
public void setName(String name)
public String getType()
Object getLiteral()
public 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 | ||||||||||