Apache Tomcat 7.0.42

## org.apache.tomcat.util.bcel.classfile
Class ConstantCP

    java.lang.Object
      org.apache.tomcat.util.bcel.classfile.Constant
          org.apache.tomcat.util.bcel.classfile.ConstantCP

All Implemented Interfaces:
  Serializable, Cloneable

Direct Known Subclasses:
  ConstantFieldref, ConstantInterfaceMethodref, ConstantMethodref

    public abstract class ConstantCP

extends Constant

Abstract super class for Fieldref and Methodref constants.

Version:
  $Id: ConstantCP.java 1377533 2012-08-26 22:22:59Z markt $
Author:
  M. Dahm
See Also:
  `ConstantFieldref`, `ConstantMethodref`, `ConstantInterfaceMethodref`, Serialized Form

Field Summary
`protected int` `class_index` References to the constants containing the class and the field signature
`protected int` `name_and_type_index` References to the constants containing the class and the field signature

Fields inherited from class org.apache.tomcat.util.bcel.classfile.Constant
`tag`

Constructor Summary
`protected` `ConstantCP(byte tag, int class_index, int name_and_type_index)`

Method Summary
`int` `getClassIndex()`
`int` `getNameAndTypeIndex()`
`String` `toString()`

Methods inherited from class org.apache.tomcat.util.bcel.classfile.Constant
`clone, equals, getTag, hashCode`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### class_index

    protected int class_index

  References to the constants containing the class and the field signature

### name_and_type_index

    protected int name_and_type_index

  References to the constants containing the class and the field signature

Constructor Detail

### ConstantCP

    protected ConstantCP(byte tag,
                         int class_index,
                         int name_and_type_index)

Parameters:
  `class_index` - Reference to the class containing the field
  `name_and_type_index` - and the field signature

Method Detail

### getClassIndex

    public final int getClassIndex()

  Returns:
    Reference (index) to class this field or method belongs to.

### getNameAndTypeIndex

    public final int getNameAndTypeIndex()

  Returns:
    Reference (index) to signature of the field.

### toString

    public final String toString()

  Overrides:
    `toString` in class `Constant`
  Returns:
    String representation.

Apache Tomcat 7.0.42

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.