jef.dna.constantInfo
Interface ConstNameAndType

All Superinterfaces:
java.lang.Cloneable, ConstantInfo
All Known Implementing Classes:
ConstantNameAndType

public interface ConstNameAndType
extends ConstantInfo

This interface has to be implemented by those classes representing a CONSTANT_NameAndType_info structure. The CONSTANT_NameAndType_info structure is used to represent a field or method, without indicating which class or interface type it belongs to.

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

1. name_index 2. descriptor_index

Author:
Francesco Russo frusso@cs.unibo.it

Method Summary
 int getDescriptorIndex()
          The value of the descriptor_index item must be a valid index into the constant_pool table.
 int getNameIndex()
          The value of the name_index item must be a valid index into the constant_pool table.
 void setDescriptorIndex(int index)
          The value of the descriptor_index item must be a valid index into the constant_pool table.
 void setNameIndex(int index)
          The value of the name_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

getNameIndex

int getNameIndex()
The value of the name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing either a valid field or method name stored as a simple name or as the special method name .

Returns:
int The index of the CONSTANT_Utf8_info structure

setNameIndex

void setNameIndex(int index)
The value of the name_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing either a valid field or method name stored as a simple name or as the special method name .

Parameters:
index - The index of the CONSTANT_Utf8_info structure

getDescriptorIndex

int getDescriptorIndex()
The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing a valid field or method descriptor.

Returns:
int The index of the CONSTANT_Utf8_info structure

setDescriptorIndex

void setDescriptorIndex(int index)
The value of the descriptor_index item must be a valid index into the constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info structure representing a valid field or method descriptor.

Parameters:
index - The index of the CONSTANT_Utf8_info structure