Const (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.tomcat.util.bcel, class: Const

# Class Const

java.lang.Object
org.apache.tomcat.util.bcel.Const

public final class Const extends Object
Constants for the project, mostly defined in the JVM specification.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final short`
  `ACC_ABSTRACT`
  One of the access flags for methods or classes: 1024.
  `static final short`
  `ACC_ANNOTATION`
  One of the access flags for classes: 8192.
  `static final short`
  `ACC_FINAL`
  One of the access flags for fields, methods, or classes: 16.
  `static final short`
  `ACC_INTERFACE`
  One of the access flags for classes: 512.
  `static final byte`
  `CONSTANT_Class`
  Marks a constant pool entry as a Class: 0x7.
  `static final byte`
  `CONSTANT_Double`
  Marks a constant pool entry as type Double: 0x6.
  `static final byte`
  `CONSTANT_Dynamic`
  Marks a constant pool entry as dynamically computed: 0x11.
  `static final byte`
  `CONSTANT_Fieldref`
  Marks a constant pool entry as a Field Reference: 0x9.
  `static final byte`
  `CONSTANT_Float`
  Marks a constant pool entry as type Float: 0x4.
  `static final byte`
  `CONSTANT_Integer`
  Marks a constant pool entry as type Integer: 0x3.
  `static final byte`
  `CONSTANT_InterfaceMethodref`
  Marks a constant pool entry as an Interface Method Reference: 0xb.
  `static final byte`
  `CONSTANT_InvokeDynamic`
  Marks a constant pool entry as an Invoke Dynamic: 0x12.
  `static final byte`
  `CONSTANT_Long`
  Marks a constant pool entry as type Long: 0x5.
  `static final byte`
  `CONSTANT_MethodHandle`
  Marks a constant pool entry as a Method Handle: 0xf.
  `static final byte`
  `CONSTANT_Methodref`
  Marks a constant pool entry as a Method Reference: 0xa.
  `static final byte`
  `CONSTANT_MethodType`
  Marks a constant pool entry as a Method Type: 0x10.
  `static final byte`
  `CONSTANT_Module`
  Marks a constant pool entry as a Module Reference: 0x13.
  `static final byte`
  `CONSTANT_NameAndType`
  Marks a constant pool entry as a name and type: 0xc.
  `static final byte`
  `CONSTANT_Package`
  Marks a constant pool entry as a Package Reference: 0x14.
  `static final byte`
  `CONSTANT_String`
  Marks a constant pool entry as type String: 0x8.
  `static final byte`
  `CONSTANT_Utf8`
  Marks a constant pool entry as type UTF-8: 0x1.
  `static final int`
  `JVM_CLASSFILE_MAGIC`
  Java class file format Magic number: -889275714.
  `static final short`
  `MAJOR_22`
  Major version number of class files for Java 22: 66.
  `static final short`
  `MAJOR_23`
  Major version number of class files for Java 23: 67.
  `static final short`
  `MAJOR_24`
  Major version number of class files for Java 24: 68.
  `static final int`
  `MAX_ARRAY_DIMENSIONS`
  The maximum number of dimensions in an array: 255.
  `static final short`
  `MINOR_22`
  Minor version number of class files for Java 22: 0.
  `static final short`
  `MINOR_23`
  Minor version number of class files for Java 23: 0.
  `static final short`
  `MINOR_24`
  Minor version number of class files for Java 24: 0.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Const()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `getConstantName(int index)`
  Get the CONSTANT_NAMES entry at the given index.

  ### Methods inherited from class Object

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

- ## Field Details

  - ### JVM_CLASSFILE_MAGIC

    public static final int JVM_CLASSFILE_MAGIC
    Java class file format Magic number: -889275714.
    See Also:
      - The ClassFile Structure in The Java Virtual Machine Specification
      - Constant Field Values

  - ### ACC_FINAL

    public static final short ACC_FINAL
    One of the access flags for fields, methods, or classes: 16.
    See Also:
      - Flag definitions for Classes in the Java Virtual Machine Specification (Java SE 9 Edition).
      - Flag definitions for Fields in the Java Virtual Machine Specification (Java SE 9 Edition).
      - Flag definitions for Methods in the Java Virtual Machine Specification (Java SE 9 Edition).
      - Flag definitions for Inner Classes in the Java Virtual Machine Specification (Java SE 9 Edition).
      - Constant Field Values

  - ### ACC_INTERFACE

    public static final short ACC_INTERFACE
    One of the access flags for classes: 512.
    See Also:
      - `ACC_FINAL`
      - Constant Field Values

  - ### ACC_ABSTRACT

    public static final short ACC_ABSTRACT
    One of the access flags for methods or classes: 1024.
    See Also:
      - `ACC_FINAL`
      - Constant Field Values

  - ### ACC_ANNOTATION

    public static final short ACC_ANNOTATION
    One of the access flags for classes: 8192.
    See Also:
      - `ACC_FINAL`
      - Constant Field Values

  - ### CONSTANT_Utf8

    public static final byte CONSTANT_Utf8
    Marks a constant pool entry as type UTF-8: 0x1.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Integer

    public static final byte CONSTANT_Integer
    Marks a constant pool entry as type Integer: 0x3.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Float

    public static final byte CONSTANT_Float
    Marks a constant pool entry as type Float: 0x4.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Long

    public static final byte CONSTANT_Long
    Marks a constant pool entry as type Long: 0x5.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Double

    public static final byte CONSTANT_Double
    Marks a constant pool entry as type Double: 0x6.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Class

    public static final byte CONSTANT_Class
    Marks a constant pool entry as a Class: 0x7.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Fieldref

    public static final byte CONSTANT_Fieldref
    Marks a constant pool entry as a Field Reference: 0x9.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_String

    public static final byte CONSTANT_String
    Marks a constant pool entry as type String: 0x8.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Methodref

    public static final byte CONSTANT_Methodref
    Marks a constant pool entry as a Method Reference: 0xa.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_InterfaceMethodref

    public static final byte CONSTANT_InterfaceMethodref
    Marks a constant pool entry as an Interface Method Reference: 0xb.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_NameAndType

    public static final byte CONSTANT_NameAndType
    Marks a constant pool entry as a name and type: 0xc.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_MethodHandle

    public static final byte CONSTANT_MethodHandle
    Marks a constant pool entry as a Method Handle: 0xf.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_MethodType

    public static final byte CONSTANT_MethodType
    Marks a constant pool entry as a Method Type: 0x10.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Dynamic

    public static final byte CONSTANT_Dynamic
    Marks a constant pool entry as dynamically computed: 0x11.
    See Also:
      - Change request for JEP 309
      - Constant Field Values

  - ### CONSTANT_InvokeDynamic

    public static final byte CONSTANT_InvokeDynamic
    Marks a constant pool entry as an Invoke Dynamic: 0x12.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Module

    public static final byte CONSTANT_Module
    Marks a constant pool entry as a Module Reference: 0x13.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### CONSTANT_Package

    public static final byte CONSTANT_Package
    Marks a constant pool entry as a Package Reference: 0x14.
    See Also:
      - The Constant Pool in The Java Virtual Machine Specification
      - Constant Field Values

  - ### MAX_ARRAY_DIMENSIONS

    public static final int MAX_ARRAY_DIMENSIONS
    The maximum number of dimensions in an array: 255. One of the limitations of the Java Virtual Machine.
    See Also:
      - Field Descriptors in The Java Virtual Machine Specification
      - Constant Field Values

  - ### MINOR_22

    public static final short MINOR_22
    Minor version number of class files for Java 22: 0.
    Since:
      6.10.0
    See Also:
      - `MAJOR_22`
      - Constant Field Values

  - ### MINOR_23

    public static final short MINOR_23
    Minor version number of class files for Java 23: 0.
    Since:
      6.10.0
    See Also:
      - `MAJOR_23`
      - Constant Field Values

  - ### MINOR_24

    public static final short MINOR_24
    Minor version number of class files for Java 24: 0.
    Since:
      6.10.0
    See Also:
      - `MAJOR_24`
      - Constant Field Values

  - ### MAJOR_22

    public static final short MAJOR_22
    Major version number of class files for Java 22: 66.
    Since:
      6.10.0
    See Also:
      - `MINOR_22`
      - Constant Field Values

  - ### MAJOR_23

    public static final short MAJOR_23
    Major version number of class files for Java 23: 67.
    Since:
      6.10.0
    See Also:
      - `MINOR_23`
      - Constant Field Values

  - ### MAJOR_24

    public static final short MAJOR_24
    Major version number of class files for Java 24: 68.
    Since:
      6.10.0
    See Also:
      - `MINOR_24`
      - Constant Field Values

- ## Constructor Details

  - ### Const

    public Const()

- ## Method Details

  - ### getConstantName

    public static String getConstantName(int index)
    Get the CONSTANT_NAMES entry at the given index.
    Parameters:
      `index` - index into `CONSTANT_NAMES`.
    Returns:
      the CONSTANT_NAMES entry at the given index