|
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.ReferenceConstant
VMS 4.4.2: This class implements field/method/interface method reference constants.
| Field Summary | |
private ClassConstant |
clazz
|
private NameAndTypeConstant |
nametype
|
private byte |
tag
|
| Fields inherited from class org.multijava.util.classfile.PooledConstant |
|
| Constructor Summary | |
ReferenceConstant(byte tag,
String name,
String type)
Constructs a new reference constant. |
|
ReferenceConstant(byte tag,
String owner,
String name,
String type)
Constructs a new reference constant. |
|
ReferenceConstant(byte tag,
ClassConstant clazz,
NameAndTypeConstant nametype)
Constructs a reference constant. |
|
| Method Summary | |
boolean |
equals(Object o)
equals (an exact comparison) ASSERT: this.hashCode == o.hashCode ===> cast |
String |
getClassName()
Returns the name of this constant |
(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 name of this constant |
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(String name)
Returns 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 byte tag
private ClassConstant clazz
private NameAndTypeConstant nametype
| Constructor Detail |
public ReferenceConstant(byte tag,
String name,
String type)
tag - the constant type tagname - the qualified name of the referenced objecttype - the signature of the referenced object
public ReferenceConstant(byte tag,
String owner,
String name,
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 object
public 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 object| Method Detail |
Object getLiteral()
public String getName()
public String getClassName()
public String getTypeName()
public void setTypeName(String name)
public String getType()
public final int hashCode()
hashCode in class PooledConstantpublic final boolean equals(Object o)
equals in class PooledConstantvoid resolveConstants(ConstantPool cp)
cp - the constant pool for this classfinal void resolveConstants(PooledConstant pc)
pc - the already in pooled constant
ASSERT pc.getClass() == this.getClass()
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 | ||||||||||