org.apache.tomcat.util.bcel.classfile

## Class Constant

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

- Direct Known Subclasses:
    ConstantClass, ConstantDouble, ConstantFloat, ConstantInteger, ConstantLong, ConstantUtf8

      public abstract class Constant
      extends Object

  Abstract superclass for classes to represent the different constant types in the constant pool of a class file. The classes keep closely to the JVM specification.
  Author:
    M. Dahm

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected byte` | `tag`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte` | `getTag()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### tag

          protected final byte tag

  - ### Method Detail

    - #### getTag

          public final byte getTag()

      Returns:
        Tag of constant, i.e., its type. No setTag() method to avoid confusion.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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