Class CPNameAndType


  • public class CPNameAndType
    extends ConstantPoolEntry
    Name and Type pair constant pool entry.
    • Field Detail

      • descriptor

        CPUTF8 descriptor
      • descriptorIndex

        transient int descriptorIndex
      • nameIndex

        transient int nameIndex
      • hashCodeComputed

        private boolean hashCodeComputed
      • cachedHashCode

        private int cachedHashCode
    • Constructor Detail

      • CPNameAndType

        public CPNameAndType​(CPUTF8 name,
                             CPUTF8 descriptor,
                             int globalIndex)
        Constructs a new CPNameAndType.
        Parameters:
        name - TODO
        descriptor - TODO
        globalIndex - index in CpBands
        Throws:
        java.lang.NullPointerException - if name or descriptor is null
    • Method Detail

      • generateHashCode

        private void generateHashCode()
      • invokeInterfaceCount

        public int invokeInterfaceCount()
        Answers the invokeinterface count argument when the receiver is treated as an invokeinterface target. This value is not meaningful if the receiver is not an invokeinterface target.
        Returns:
        count
      • writeBody

        protected void writeBody​(java.io.DataOutputStream dos)
                          throws java.io.IOException
        Specified by:
        writeBody in class ConstantPoolEntry
        Throws:
        java.io.IOException