|
||||||||||
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.NameAndTypeConstant
This constant represents a name and a type in the contant pool. Name/type entries are used to specify the type associated with a symbol name.
Constructor Summary | |
NameAndTypeConstant(AsciiConstant name,
AsciiConstant type)
Constructs a name/type constant pool entry. |
|
NameAndTypeConstant(java.lang.String name,
java.lang.String type)
Constructs a name/type constant pool entry. |
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 name of this constant. |
java.lang.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(java.lang.String name)
Sets the name of this constant. |
(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 NameAndTypeConstant(java.lang.String name, java.lang.String type)
name
- the name of the symboltype
- the signature of the symbolpublic NameAndTypeConstant(AsciiConstant name, AsciiConstant type)
name
- the name of the symboltype
- the signature of the symbolMethod Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.String getType()
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 already in pooled constant
ASSERT pc.getClass() == this.getClass()void resolveConstants(ConstantPool cp)
resolveConstants
in class PooledConstant
cp
- the constant pool for this classvoid write(ConstantPool cp, java.io.DataOutput out) throws java.io.IOException
write
in class PooledConstant
cp
- the constant pool that contain all dataout
- the file where to write this object infojava.io.IOException
- An io problem has occured.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |