fr.umlv.corosol.classfile.constant
Interface JConstantFieldref

All Superinterfaces:
JClassFileItem, JConstant, JObject
All Known Implementing Classes:
DefaultJConstantFieldref

public interface JConstantFieldref
extends JConstant

A JConstantFieldref object represents a CONSTANT_Fieldref_info entry of a constant pool.

A CONSTANT_Fieldref_info entry is used to represent a field. Among its items there are two index into the constant pool. The first index is an index to a CONSTANT_Class_info entry representing the class or interface type that contains the declaration of the field. The second index is an index to a CONSTANT_NameAndType_info entry that indicates the name and descriptor of the field.

Author:
Christophe Deleray
See Also:
JConstantPool

Field Summary
 
Fields inherited from interface fr.umlv.corosol.classfile.constant.JConstant
CONSTANT_CLASS, CONSTANT_DOUBLE, CONSTANT_FIELDREF, CONSTANT_FLOAT, CONSTANT_INTEGER, CONSTANT_INTERFACE_METHODREF, CONSTANT_LONG, CONSTANT_METHODREF, CONSTANT_NAME_AND_TYPE, CONSTANT_STRING, CONSTANT_UTF8
 
Method Summary
 int getClassIndex()
          Returns the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name.
 java.lang.String getClassName()
          Returns the fully qualified class or interface name.
 java.lang.String getDescriptor()
          Returns a field descriptor.
 java.lang.String getName()
          Returns a field name.
 int getNameAndTypeIndex()
          Returns the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field.
 JField getResolvedField()
           
 boolean isResolved()
           
 void setClassIndex(int classIndex)
          Sets the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name.
 void setNameAndTypeIndex(int nameAndTypeIndex)
          Sets the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field.
 void setResolvedField(JField field)
           
 
Methods inherited from interface fr.umlv.corosol.classfile.constant.JConstant
getLength, getTag, toString
 
Methods inherited from interface fr.umlv.corosol.classfile.JClassFileItem
getConstantPool, readItem, setConstantPool, writeItem
 

Method Detail

getClassName

java.lang.String getClassName()
Returns the fully qualified class or interface name.

Returns:
a fully qualified class or interface name

getName

java.lang.String getName()
Returns a field name.

Returns:
a field name

getDescriptor

java.lang.String getDescriptor()
Returns a field descriptor.

Returns:
a field descriptor

getClassIndex

int getClassIndex()
Returns the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name.


getNameAndTypeIndex

int getNameAndTypeIndex()
Returns the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field.


setClassIndex

void setClassIndex(int classIndex)
Sets the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name.

Parameters:
classIndex - an index of a constant pool entry representing the name of the declaring class or interface of a field

setNameAndTypeIndex

void setNameAndTypeIndex(int nameAndTypeIndex)
Sets the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field.

Parameters:
nameAndTypeIndex - an index of a constant pool entry representing the name and the descriptor of a field

getResolvedField

JField getResolvedField()

setResolvedField

void setResolvedField(JField field)

isResolved

boolean isResolved()