|
||||||||||
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.ReferenceConstant
VMS 4.4.2: This class implements field/method/interface method reference constants.
Constructor Summary | |
ReferenceConstant(byte tag,
ClassConstant clazz,
NameAndTypeConstant nametype)
Constructs a reference constant. |
|
ReferenceConstant(byte tag,
java.lang.String name,
java.lang.String type)
Constructs a new reference constant. |
|
ReferenceConstant(byte tag,
java.lang.String owner,
java.lang.String name,
java.lang.String type)
Constructs a new reference constant. |
Method Summary | |
boolean |
equals(java.lang.Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
java.lang.String |
getClassName()
Returns the name of this constant |
(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 name of this constant |
java.lang.String |
getTypeName()
Returns the name 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 |
setTypeName(java.lang.String name)
Returns 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 ReferenceConstant(byte tag, java.lang.String name, java.lang.String type)
tag
- the constant type tagname
- the qualified name of the referenced objecttype
- the signature of the referenced objectpublic ReferenceConstant(byte tag, java.lang.String owner, java.lang.String name, java.lang.String type)
tag
- the constant type tagowner
- the qualified name of the class conatining the referencename
- the qualified name of the referenced objecttype
- the signature of the referenced objectpublic ReferenceConstant(byte tag, ClassConstant clazz, NameAndTypeConstant nametype)
tag
- the constant type tagclazz
- the class that defines the referenced objectnametype
- the simple name and signature of the referenced objectMethod Detail |
java.lang.Object getLiteral()
getLiteral
in class PooledConstant
public java.lang.String getName()
public java.lang.String getClassName()
public java.lang.String getTypeName()
public void setTypeName(java.lang.String name)
public java.lang.String getType()
public final int hashCode()
hashCode
in class PooledConstant
public final boolean equals(java.lang.Object o)
equals
in class PooledConstant
void resolveConstants(ConstantPool cp)
resolveConstants
in class PooledConstant
cp
- the constant pool for this classfinal void resolveConstants(PooledConstant pc)
resolveConstants
in class PooledConstant
pc
- the already in pooled constant
ASSERT pc.getClass() == this.getClass()void 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 |