Class FieldRef
- java.lang.Object
-
- com.tonic.parser.constpool.structure.FieldRef
-
public class FieldRef extends Object
The index pair of a CONSTANT_Fieldref entry - owning class and name-and-type.
-
-
Constructor Summary
Constructors Constructor Description FieldRef(int classIndex, int nameAndTypeIndex)Creates a field reference from its two constant pool indices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetClassIndex()intgetNameAndTypeIndex()voidsetClassIndex(int classIndex)Repoints the reference at another owning class entry.voidsetNameAndTypeIndex(int nameAndTypeIndex)Repoints the reference at another name-and-type entry.StringtoString()
-
-
-
Method Detail
-
getClassIndex
public int getClassIndex()
- Returns:
- the class index
-
getNameAndTypeIndex
public int getNameAndTypeIndex()
- Returns:
- the name and type index
-
setClassIndex
public void setClassIndex(int classIndex)
Repoints the reference at another owning class entry.- Parameters:
classIndex- the constant pool index of the CONSTANT_Class entry
-
setNameAndTypeIndex
public void setNameAndTypeIndex(int nameAndTypeIndex)
Repoints the reference at another name-and-type entry.- Parameters:
nameAndTypeIndex- the constant pool index of the CONSTANT_NameAndType entry
-
-