org.apache.commons.compress.harmony.unpack200.bytecode

## Class CPNameAndType

- java.lang.Object
- - org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry
  - - org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry
    - - org.apache.commons.compress.harmony.unpack200.bytecode.CPNameAndType

-     public class CPNameAndType
      extends ConstantPoolEntry

  Name and Type pair constant pool entry.

- - ### Field Summary

    - ### Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry

      `CP_Class, CP_Double, CP_Fieldref, CP_Float, CP_Integer, CP_InterfaceMethodref, CP_Long, CP_Methodref, CP_NameAndType, CP_String, CP_UTF8, globalIndex`

    - ### Fields inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry

      `NONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CPNameAndType(CPUTF8 name, CPUTF8 descriptor, int globalIndex)` Create a new CPNameAndType

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `protected ClassFileEntry[]` | `getNestedClassFileEntries()`
    `int` | `hashCode()`
    `int` | `invokeInterfaceCount()` Answers the invokeinterface count argument when the receiver is treated as an invokeinterface target.
    `protected void` | `resolve(ClassConstantPool pool)` Allows the constant pool entries to resolve their nested entries.
    `String` | `toString()`
    `protected void` | `writeBody(DataOutputStream dos)`

    - ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ConstantPoolEntry

      `doWrite, getGlobalIndex, getTag`

    - ### Methods inherited from class org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry

      `objectHashCode, write`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### CPNameAndType

          public CPNameAndType(CPUTF8 name,
                               CPUTF8 descriptor,
                               int globalIndex)

      Create a new CPNameAndType
      Parameters:
        `name` - TODO
        `descriptor` - TODO
        `globalIndex` - - index in CpBands
      Throws:
        `NullPointerException` - if name or descriptor is null

  - ### Method Detail

    - #### getNestedClassFileEntries

          protected ClassFileEntry[] getNestedClassFileEntries()

      Overrides:
        `getNestedClassFileEntries` in class `ClassFileEntry`

    - #### resolve

          protected void resolve(ClassConstantPool pool)

      Description copied from class: `ClassFileEntry`
      Allows the constant pool entries to resolve their nested entries.
      Overrides:
        `resolve` in class `ClassFileEntry`
      Parameters:
        `pool` - TODO

    - #### writeBody

          protected void writeBody(DataOutputStream dos)
                            throws IOException

      Specified by:
        `writeBody` in class `ConstantPoolEntry`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Specified by:
        `toString` in class `ClassFileEntry`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in class `ConstantPoolEntry`

    - #### equals

          public boolean equals(Object obj)

      Specified by:
        `equals` in class `ConstantPoolEntry`

    - #### 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

Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.