Package org.openjdk.asmtools.jasm

## Class ConstantPool

- java.lang.Object
- - org.openjdk.asmtools.jasm.ConstantPool

- All Implemented Interfaces:
    `java.lang.Iterable<ConstantPool.ConstCell>`

      public class ConstantPool
      extends java.lang.Object
      implements java.lang.Iterable<ConstantPool.ConstCell>

  ConstantPool ConstantPool is the class responsible for maintaining constants for a given class file.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ConstantPool.ConstCell` | ConstantCell ConstantCell is a type of data that can be in a constant pool.
    `static class` | `ConstantPool.ConstValue` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_Cell` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_CondyPair` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_IndyOrCondyPair` |
    `static class` | `ConstantPool.ConstValue_IndyPair` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_Integer` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_Long` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_Pair` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_String` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.ConstValue_Zero` | ConstValue A (typed) tagged value in the constant pool.
    `static class` | `ConstantPool.CPTagVisitor<R>` | CPVisitor CPVisitor base class defining a visitor for decoding constants.
    `static class` | `ConstantPool.CPVisitor<R>` | CPVisitor CPVisitor base class defining a visitor for decoding constants.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `Environment` | `env` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConstantPool​(Environment env)` | main constructor

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `CheckGlobals()` |
    `void` | `debugStr​(java.lang.String s)` |
    `ConstantPool.ConstCell` | `FindCell​(ConstantPool.ConstValue ref)` |
    `ConstantPool.ConstCell` | `FindCell​(Tables.ConstType tag, java.lang.Integer value)` |
    `ConstantPool.ConstCell` | `FindCell​(Tables.ConstType tag, java.lang.Long value)` |
    `ConstantPool.ConstCell` | `FindCell​(Tables.ConstType tag, java.lang.String value)` |
    `ConstantPool.ConstCell` | `FindCell​(Tables.ConstType tag, ConstantPool.ConstCell value)` |
    `ConstantPool.ConstCell` | `FindCell​(Tables.ConstType tag, ConstantPool.ConstCell left, ConstantPool.ConstCell right)` |
    `ConstantPool.ConstCell` | `FindCellAsciz​(java.lang.String str)` |
    `ConstantPool.ConstCell` | `FindCellClassByName​(java.lang.String name)` |
    `ConstantPool.ConstCell` | `FindCellModuleByName​(java.lang.String name)` |
    `ConstantPool.ConstCell` | `FindCellPackageByName​(java.lang.String name)` |
    `void` | `fixRefsInPool()` |
    `ConstantPool.ConstCell` | `getCell​(int cpx)` |
    `java.util.Iterator<ConstantPool.ConstCell>` | `iterator()` |
    `protected void` | `NumberizePool()` |
    `void` | `printPool()` |
    `void` | `setCell​(int cpx, ConstantPool.ConstCell cell)` |
    `static void` | `setEnableDebug​(boolean newState)` |
    `protected ConstantPool.ConstCell` | `uncheckedGetCell​(int cpx)` |
    `void` | `write​(CheckedDataOutputStream out)` |

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

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

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### env

          public Environment env

  - ### Constructor Detail

    - #### ConstantPool

          public ConstantPool​(Environment env)

      main constructor
      Parameters:
        `env` - The error reporting environment

  - ### Method Detail

    - #### debugStr

          public void debugStr​(java.lang.String s)

    - #### iterator

          public java.util.Iterator<ConstantPool.ConstCell> iterator()

      Specified by:
        `iterator` in interface `java.lang.Iterable<ConstantPool.ConstCell>`

    - #### fixRefsInPool

          public void fixRefsInPool()

    - #### CheckGlobals

          protected void CheckGlobals()

    - #### printPool

          public void printPool()

    - #### uncheckedGetCell

          protected ConstantPool.ConstCell uncheckedGetCell​(int cpx)

    - #### getCell

          public ConstantPool.ConstCell getCell​(int cpx)

    - #### setCell

          public void setCell​(int cpx,
                              ConstantPool.ConstCell cell)

    - #### NumberizePool

          protected void NumberizePool()

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(ConstantPool.ConstValue ref)

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(Tables.ConstType tag,
                                                 java.lang.String value)

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(Tables.ConstType tag,
                                                 java.lang.Integer value)

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(Tables.ConstType tag,
                                                 java.lang.Long value)

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(Tables.ConstType tag,
                                                 ConstantPool.ConstCell value)

    - #### FindCell

          public ConstantPool.ConstCell FindCell​(Tables.ConstType tag,
                                                 ConstantPool.ConstCell left,
                                                 ConstantPool.ConstCell right)

    - #### FindCellAsciz

          public ConstantPool.ConstCell FindCellAsciz​(java.lang.String str)

    - #### FindCellClassByName

          public ConstantPool.ConstCell FindCellClassByName​(java.lang.String name)

    - #### FindCellModuleByName

          public ConstantPool.ConstCell FindCellModuleByName​(java.lang.String name)

    - #### FindCellPackageByName

          public ConstantPool.ConstCell FindCellPackageByName​(java.lang.String name)

    - #### write

          public void write​(CheckedDataOutputStream out)
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### setEnableDebug

          public static void setEnableDebug​(boolean newState)