Class NameAndType


  • public class NameAndType
    extends Object
    Represents a Name and Type in the constant pool.
    • Constructor Detail

      • NameAndType

        public NameAndType​(int nameIndex,
                           int descriptorIndex)
        Creates a name-and-type pair from its two constant-pool indices.
        Parameters:
        nameIndex - CONSTANT_Utf8 index of the member name
        descriptorIndex - CONSTANT_Utf8 index of the descriptor
    • 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