Class NameAndType
- java.lang.Object
-
- com.tonic.parser.constpool.structure.NameAndType
-
public class NameAndType extends Object
Represents a Name and Type in the constant pool.
-
-
Constructor Summary
Constructors Constructor Description NameAndType(int nameIndex, int descriptorIndex)Creates a name-and-type pair from its two constant-pool indices.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDescriptorIndex()intgetNameIndex()voidsetDescriptorIndex(int descriptorIndex)Repoints the pair at a different descriptor.voidsetNameIndex(int nameIndex)Repoints the pair at a different member name.StringtoString()
-
-
-
Method Detail
-
getNameIndex
public int getNameIndex()
- Returns:
- the name index
-
getDescriptorIndex
public int getDescriptorIndex()
- Returns:
- the descriptor index
-
setNameIndex
public void setNameIndex(int nameIndex)
Repoints the pair at a different member name.- Parameters:
nameIndex- the new CONSTANT_Utf8 index
-
setDescriptorIndex
public void setDescriptorIndex(int descriptorIndex)
Repoints the pair at a different descriptor.- Parameters:
descriptorIndex- the new CONSTANT_Utf8 index
-
-