public class BcelUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
NOT_PRESENT |
Constructor and Description |
---|
BcelUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
findMethodIndex(org.apache.bcel.classfile.ConstantPool pool,
java.lang.String className,
java.lang.String methodName,
java.lang.String methodSignature)
Returns the index in the constant pool of the method with the
given name and signature or -1 if not found.
|
static java.lang.String |
getClassNameAt(org.apache.bcel.classfile.ConstantPool constantPool,
int classIndex) |
static java.lang.String |
getConstantString(org.apache.bcel.classfile.ConstantPool constantPool,
org.apache.bcel.generic.CPInstruction instruction)
Returns the constant UTF8 String the given instruction is pointing to.
|
static java.lang.String |
getConstantStringAt(org.apache.bcel.classfile.ConstantPool constantPool,
int index)
Returns the constant UTF8 String at the specified index
|
static java.lang.String |
getName(org.apache.bcel.classfile.ConstantPool constantPool,
org.apache.bcel.classfile.ConstantCP constantCP) |
static org.apache.bcel.classfile.ConstantNameAndType |
getNameAndType(org.apache.bcel.classfile.ConstantPool constantPool,
org.apache.bcel.classfile.ConstantCP constantCP) |
static java.lang.String |
getSignature(org.apache.bcel.classfile.ConstantPool constantPool,
org.apache.bcel.classfile.ConstantCP constantCP) |
static java.lang.String |
getSignatureFrom(org.apache.bcel.classfile.FieldOrMethod fieldOrMethod) |
public static final int NOT_PRESENT
public static int findMethodIndex(org.apache.bcel.classfile.ConstantPool pool, java.lang.String className, java.lang.String methodName, java.lang.String methodSignature)
pool
- The current constant pool.className
- The name of the class that implements the method.methodName
- The pure method name.methodSignature
- The internal representation of all method parameters and return type.public static java.lang.String getClassNameAt(org.apache.bcel.classfile.ConstantPool constantPool, int classIndex)
public static java.lang.String getSignature(org.apache.bcel.classfile.ConstantPool constantPool, org.apache.bcel.classfile.ConstantCP constantCP)
public static java.lang.String getSignatureFrom(org.apache.bcel.classfile.FieldOrMethod fieldOrMethod)
public static org.apache.bcel.classfile.ConstantNameAndType getNameAndType(org.apache.bcel.classfile.ConstantPool constantPool, org.apache.bcel.classfile.ConstantCP constantCP)
public static java.lang.String getName(org.apache.bcel.classfile.ConstantPool constantPool, org.apache.bcel.classfile.ConstantCP constantCP)
public static java.lang.String getConstantStringAt(org.apache.bcel.classfile.ConstantPool constantPool, int index)
index
- The index in the constant pool at which the string must be foundpublic static java.lang.String getConstantString(org.apache.bcel.classfile.ConstantPool constantPool, org.apache.bcel.generic.CPInstruction instruction)
constantPool
- The pool from which to get the string.instruction
- The instruction pointing to a string in the constant pool.