public class SignatureConverter extends Object
| Constructor and Description |
|---|
SignatureConverter(String signature)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
convert(String signature)
Convenience method for converting a single signature component to
human-readable form.
|
static String |
convertMethodSignature(org.apache.bcel.generic.InvokeInstruction inv,
org.apache.bcel.generic.ConstantPoolGen cpg)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.classfile.Method method)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(MethodDescriptor methodDescriptor)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(org.apache.bcel.generic.MethodGen methodGen)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(String className,
String methodName,
String methodSig)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(String className,
String methodName,
String methodSig,
String pkgName)
Convenience method for generating a method signature in human readable
form.
|
static String |
convertMethodSignature(XMethod xmethod)
Convenience method for generating a method signature in human readable
form.
|
char |
getFirst()
Get the first character of the remaining part of the signature.
|
String |
parseNext()
Parse a single type out of the signature, starting at the beginning of
the remaining part of the signature.
|
static String |
shorten(String pkgName,
String typeName) |
void |
skip()
Skip the first character of the remaining part of the signature.
|
public SignatureConverter(String signature)
signature - the field or method signature to convertpublic char getFirst()
public void skip()
public String parseNext()
public static String convertMethodSignature(org.apache.bcel.classfile.JavaClass javaClass, org.apache.bcel.classfile.Method method)
javaClass - the classmethod - the methodpublic static String convertMethodSignature(org.apache.bcel.generic.MethodGen methodGen)
methodGen - the method to produce a method signature forpublic static String convertMethodSignature(org.apache.bcel.generic.InvokeInstruction inv, org.apache.bcel.generic.ConstantPoolGen cpg)
inv - an InvokeInstructioncpg - the ConstantPoolGen for the class the instruction belongs topublic static String convertMethodSignature(String className, String methodName, String methodSig)
className - name of the class containing the methodmethodName - the name of the methodmethodSig - the signature of the methodpublic static String convertMethodSignature(XMethod xmethod)
xmethod - an XMethodpublic static String convertMethodSignature(MethodDescriptor methodDescriptor)
methodDescriptor - a MethodDescriptorpublic static String convertMethodSignature(String className, String methodName, String methodSig, String pkgName)
className - name of the class containing the methodmethodName - the name of the methodmethodSig - the signature of the methodpkgName - the name of the package the method is in (used to shorten
class names)public static String convert(String signature)
signature - the signatureCopyright © 2003–2015. All rights reserved.