Methods Summary |
---|
public java.lang.String | getFieldClassName()Gets the name of the class defining the field
return fieldClassName;
|
public java.lang.String | getFieldName()Get the name of the field
return fieldName;
|
public java.lang.String | getFieldType()Get the type of the field
return fieldType;
|
public void | read(java.io.DataInputStream cpStream)read a constant pool entry from a class stream.
classIndex = cpStream.readUnsignedShort();
nameAndTypeIndex = cpStream.readUnsignedShort();
|
public void | resolve(ConstantPool constantPool)Resolve this constant pool entry with respect to its dependents in
the constant pool.
ClassCPInfo fieldClass
= (ClassCPInfo) constantPool.getEntry(classIndex);
fieldClass.resolve(constantPool);
fieldClassName = fieldClass.getClassName();
NameAndTypeCPInfo nt
= (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
nt.resolve(constantPool);
fieldName = nt.getName();
fieldType = nt.getType();
super.resolve(constantPool);
|
public java.lang.String | toString()Print a readable version of the constant pool entry.
String value;
if (isResolved()) {
value = "Field : Class = " + fieldClassName + ", name = "
+ fieldName + ", type = " + fieldType;
} else {
value = "Field : Class index = " + classIndex
+ ", name and type index = " + nameAndTypeIndex;
}
return value;
|