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

# Class CPConstant

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.CPConstant

Direct Known Subclasses:
  `CPConstantNumber`, `CPString`

public abstract class CPConstant extends ConstantPoolEntry
Abstract superclass for constant pool constant entries such as numbers or Strings

- ## 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
  Description
  `CPConstant(byte tag, Object value, int globalIndex)`
  Create a new CPConstant

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `protected Object`
  `getValue()`
  `int`
  `hashCode()`

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

  `doWrite, getGlobalIndex, getTag, writeBody`

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

  `getNestedClassFileEntries, objectHashCode, resolve, toString, write`

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

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

- ## Constructor Details

  - ### CPConstant

    public CPConstant(byte tag, Object value, int globalIndex)
    Create a new CPConstant
    Parameters:
      `tag` - TODO
      `value` - TODO
      `globalIndex` - index in CpBands
    Throws:
      `NullPointerException` - if value is null

- ## Method Details

  - ### equals

    public boolean equals(Object obj)
    Specified by:
      `equals` in class `ConstantPoolEntry`

  - ### getValue

    protected Object getValue()

  - ### hashCode

    public int hashCode()
    Specified by:
      `hashCode` in class `ConstantPoolEntry`