public class ConstantPool extends Object
Modifier and Type | Class and Description |
---|---|
class |
ConstantPool.Constant
Constant
Base class of all constant entries
|
static class |
ConstantPool.SUBTAG
SUBTAG
A Tag descriptor of form method-handle constants
|
static class |
ConstantPool.TAG
TAG
A Tag descriptor of constants in the constant pool
|
Modifier and Type | Field and Description |
---|---|
ArrayList<ConstantPool.Constant> |
pool
The actual pool of Constants
|
Constructor and Description |
---|
ConstantPool(ClassData cd) |
ConstantPool(ClassData cd,
int size) |
Modifier and Type | Method and Description |
---|---|
String |
ConstantStrValue(int cpx)
ConstantStrValue
Safely gets the string value of any Constant at any CP index.
|
String |
decodeClassDescriptor(int cpx)
decodeClassDescriptor
Pulls the class name out of a string (at the CP index).
|
String |
getClassName(org.openjdk.asmtools.jdis.ConstantPool.CPX classConst)
getClassName
Safely gets a Java class name from a ConstantClass from a CPX constant pool object.
|
String |
getClassName(org.openjdk.asmtools.jdis.ConstantPool.CPX2 classConst)
getClassName
Safely gets a Java class name from a ConstantClass from a CPX2 constant pool
object.
|
String |
getClassName(int cpx)
getClassName
Safely gets a Java class name from a ConstantClass from the CP at a given index.
|
ConstantPool.Constant |
getConst(int cpx)
getConst
Public getter - Safely gets a Constant from the CP at a given index.
|
String |
getModule(int cpx)
getModule
Public string val - Safely gets the string-rep of a ConstantModule from the CP at a
given index.
|
String |
getName(int cpx)
getTypeName
Safely gets a Java name from a ConstantUTF8 from the CP at a given index.
|
String |
getPackage(int cpx)
getPackage
Public string val - Safely gets the string-rep of a ConstantPackage from the CP at a
given index.
|
String |
getPrintedTAG(ConstantPool.TAG tag) |
String |
getShortClassName(int cpx,
String pkgPrefix)
getShortClassName
shortens a class name (if the class is in the given package).
|
String |
getShortClassName(String className,
String pkgPrefix)
getShortClassName
shortens a class name (if the class is in the given package).
|
String |
getString(int cpx)
getString
Public string val - Safely gets the string-rep of a ConstantUTF8 from the CP at a
given index.
|
void |
print(PrintWriter out)
prints the entire constant pool.
|
void |
printlnClassId(PrintWriter out,
int cpx)
prints a constant value, with the print format based on the print options.
|
void |
printlnClassId(PrintWriter out,
int cpx,
boolean addComma) |
void |
setPrintTAG(boolean value) |
String |
StringTag(int cpx)
StringTag
Public string val - Safely gets the string-rep of a Constant from the CP at a given
index.
|
String |
StringValue(int cpx)
StringValue
Safely gets the string value of any Constant at any CP index.
|
public ArrayList<ConstantPool.Constant> pool
public ConstantPool(ClassData cd)
public ConstantPool(ClassData cd, int size)
public void setPrintTAG(boolean value)
public String getPrintedTAG(ConstantPool.TAG tag)
public ConstantPool.Constant getConst(int cpx)
public String StringTag(int cpx)
public String getString(int cpx)
public String getModule(int cpx)
public String getPackage(int cpx)
public String getName(int cpx)
public String getClassName(int cpx)
public String getClassName(org.openjdk.asmtools.jdis.ConstantPool.CPX2 classConst)
public String getClassName(org.openjdk.asmtools.jdis.ConstantPool.CPX classConst)
public String getShortClassName(String className, String pkgPrefix)
public String getShortClassName(int cpx, String pkgPrefix)
public String decodeClassDescriptor(int cpx)
public String StringValue(int cpx)
public String ConstantStrValue(int cpx)
public void print(PrintWriter out) throws IOException
IOException
public void printlnClassId(PrintWriter out, int cpx) throws IOException
IOException
public void printlnClassId(PrintWriter out, int cpx, boolean addComma) throws IOException
IOException
Copyright © 2021. All Rights Reserved.