Class ConstantPool

  • All Implemented Interfaces:
    Node

    public class ConstantPool
    extends Object
    implements Node
    • Constructor Detail

      • ConstantPool

        public ConstantPool()
      • ConstantPool

        public ConstantPool​(Constant[] constants)
    • Method Detail

      • getSize

        public int getSize()
      • getConstant

        public Constant getConstant​(int index,
                                    byte tag)
      • getConstant

        public Constant getConstant​(int index)
      • constantToString

        public String constantToString​(int index,
                                       byte tag)
      • constantToString

        public String constantToString​(int index)
      • getConstantPool

        public Constant[] getConstantPool()
      • getConstantUtf8

        public ConstantUtf8 getConstantUtf8​(int index)
      • getConstantModule

        public ConstantModule getConstantModule​(int index)
      • getConstantPackage

        public ConstantPackage getConstantPackage​(int index)
      • getConstantString_CONSTANTClass

        public String getConstantString_CONSTANTClass​(int index)
      • getLength

        public int getLength()
      • lookupInteger

        public int lookupInteger​(int n)
      • lookupUtf8

        public int lookupUtf8​(String string)
      • lookupClass

        public int lookupClass​(String classname)
      • addUtf8

        public int addUtf8​(String n)
      • addInteger

        public int addInteger​(int n)
      • addArrayClass

        public int addArrayClass​(ArrayType type)
      • addClass

        public int addClass​(ObjectType type)
      • addClass

        public int addClass​(String classname)
      • addFieldref

        public int addFieldref​(String class_name,
                               String field_name,
                               String signature)
      • lookupFieldref

        public int lookupFieldref​(String searchClassname,
                                  String searchFieldname,
                                  String searchSignature)
      • addNameAndType

        public int addNameAndType​(String name,
                                  String signature)
      • lookupNameAndType

        public int lookupNameAndType​(String searchName,
                                     String searchTypeSignature)
      • addFloat

        public int addFloat​(float f)
      • lookupFloat

        public int lookupFloat​(float f)
      • addDouble

        public int addDouble​(double d)
      • lookupDouble

        public int lookupDouble​(double d)
      • addLong

        public int addLong​(long l)
      • lookupString

        public int lookupString​(String s)
      • addString

        public int addString​(String str)
      • lookupLong

        public int lookupLong​(long l)
      • addMethodHandle

        public int addMethodHandle​(byte referenceKind,
                                   int referenceIndex)
      • addMethodType

        public int addMethodType​(int descriptorIndex)
      • addMethodref

        public int addMethodref​(String class_name,
                                String method_name,
                                String signature)
      • addInvokeDynamic

        public int addInvokeDynamic​(int bootstrapMethodIndex,
                                    int constantNameAndTypeIndex)
      • addInterfaceMethodref

        public int addInterfaceMethodref​(String class_name,
                                         String method_name,
                                         String signature)
      • lookupInterfaceMethodref

        public int lookupInterfaceMethodref​(String searchClassname,
                                            String searchMethodName,
                                            String searchSignature)
      • lookupMethodref

        public int lookupMethodref​(String searchClassname,
                                   String searchMethodName,
                                   String searchSignature)
      • getFinalConstantPool

        public ConstantPool getFinalConstantPool()
      • getModuleName

        public String getModuleName​(int moduleIndex)
      • getPackageName

        public String getPackageName​(int packageIndex)