jef.dna.constantInfo
Interface ConstField

All Superinterfaces:
java.lang.Cloneable, ConstantInfo
All Known Subinterfaces:
ConstInterfaceMethod, ConstMethod
All Known Implementing Classes:
ConstantField, ConstantInterfaceMethod, ConstantMethod

public interface ConstField
extends ConstantInfo

This interface has to be implemented by those classes representing a CONSTANT_Field_info structure. The CONSTANT_Field_info structure is used to represent fields.

Concrete classes implementing this interface have to tag with the @RefersToCpInfo annotation their private fields representing the following information:

1. class_index 2. name_and_type_index

Author:
Francesco Russo frusso@dev.java.net

Method Summary
 int getClassIndex()
          The value of the class_index item must be a valid index into the constant_pool table.
 int getNameAndTypeIndex()
          The value of the name_and_type_index item must be a valid index into the constant_pool table.
 void setClassIndex(int index)
          The value of the class_index item must be a valid index into the constant_pool table.
 void setNameAndTypeIndex(int index)
          The value of the name_and_type_index item must be a valid index into the constant_pool table.
 
Methods inherited from interface jef.dna.constantInfo.ConstantInfo
clone, fromStream, getCpt, getTag, getType, setCpt, setTag, toStream, updateRefs, validate
 

Method Detail

getClassIndex

int getClassIndex()
The value of the class_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the class or interface type that contains the declaration of the field.

Returns:
int The CONSTANT_Class_info index into the constant pool table

setClassIndex

void setClassIndex(int index)
The value of the class_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Class_info structure representing the class or interface type that contains the declaration of the field.

Parameters:
index - The CONSTANT_Class_info index into the constant pool table

getNameAndTypeIndex

int getNameAndTypeIndex()
The value of the name_and_type_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_NameAndType_info. structure. This constant_pool entry indicates the name and descriptor of the field itself.

Returns:
int The CONSTANT_NameAndType_info index into the constant pool table

setNameAndTypeIndex

void setNameAndTypeIndex(int index)
The value of the name_and_type_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_NameAndType_info. structure. This constant_pool entry indicates the name and descriptor of the field itself.

Parameters:
index - The CONSTANT_NameAndType_info index into the constant pool table