|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.SignatureConverter
public class SignatureConverter
Convert part or all of a Java type signature into something closer to what types look like in the source code. Both field and method signatures may be processed by this class. For a field signature, just call parseNext() once. For a method signature, parseNext() must be called multiple times, and the parens around the arguments must be skipped manually (by calling the skip() method).
Constructor Summary | |
---|---|
SignatureConverter(java.lang.String signature)
Constructor. |
Method Summary | |
---|---|
static java.lang.String |
convert(java.lang.String signature)
Convenience method for converting a single signature component to human-readable form. |
static java.lang.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 java.lang.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 java.lang.String |
convertMethodSignature(MethodDescriptor methodDescriptor)
Convenience method for generating a method signature in human readable form. |
static java.lang.String |
convertMethodSignature(org.apache.bcel.generic.MethodGen methodGen)
Convenience method for generating a method signature in human readable form. |
static java.lang.String |
convertMethodSignature(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig)
Convenience method for generating a method signature in human readable form. |
static java.lang.String |
convertMethodSignature(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
java.lang.String pkgName)
Convenience method for generating a method signature in human readable form. |
static java.lang.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. |
java.lang.String |
parseNext()
Parse a single type out of the signature, starting at the beginning of the remaining part of the signature. |
static java.lang.String |
shorten(java.lang.String pkgName,
java.lang.String typeName)
|
void |
skip()
Skip the first character of the remaining part of the signature. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SignatureConverter(java.lang.String signature)
signature
- the field or method signature to convertMethod Detail |
---|
public char getFirst()
public void skip()
public java.lang.String parseNext()
public static java.lang.String convertMethodSignature(org.apache.bcel.classfile.JavaClass javaClass, org.apache.bcel.classfile.Method method)
javaClass
- the classmethod
- the methodpublic static java.lang.String convertMethodSignature(org.apache.bcel.generic.MethodGen methodGen)
methodGen
- the method to produce a method signature forpublic static java.lang.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 java.lang.String convertMethodSignature(java.lang.String className, java.lang.String methodName, java.lang.String methodSig)
className
- name of the class containing the methodmethodName
- the name of the methodmethodSig
- the signature of the methodpublic static java.lang.String convertMethodSignature(XMethod xmethod)
xmethod
- an XMethod
public static java.lang.String convertMethodSignature(MethodDescriptor methodDescriptor)
methodDescriptor
- a MethodDescriptor
public static java.lang.String convertMethodSignature(java.lang.String className, java.lang.String methodName, java.lang.String methodSig, java.lang.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 java.lang.String convert(java.lang.String signature)
signature
- the signaturepublic static java.lang.String shorten(java.lang.String pkgName, java.lang.String typeName)
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |