public class MethodSignatureVisitor extends TraceSignatureVisitor implements MethodInfo
TraceSignatureVisitor from ASM library.
MethodSignature = ( visitFormalTypeParameter visitClassBound? visitInterfaceBound* )* ( visitParameterType* visitReturnType visitExceptionType* )
| Modifier and Type | Field and Description |
|---|---|
protected int |
access |
protected AnnotationInfo[] |
annotations |
protected java.util.List<TypeInfoImpl> |
arguments |
protected int |
argumentsCount |
protected FastIntBuffer |
argumentsOffset |
protected int |
argumentsWords |
protected java.lang.String |
asmMethodSignature |
protected java.lang.String |
classname |
protected java.lang.String |
declaredClassName |
protected java.util.Map<java.lang.String,java.lang.String> |
declaredTypeGeneric |
protected java.lang.String |
description |
protected java.lang.String[] |
exceptionsArray |
protected java.util.Map<java.lang.String,java.lang.String> |
generics |
protected boolean |
isFinal |
protected boolean |
isStatic |
protected java.lang.String |
methodName |
protected TypeInfo |
returnType |
protected java.lang.String |
signature |
protected ClassInfo |
targetClassInfo |
argumentStack, declaration, isInterfaceapi, EXTENDS, INSTANCEOF, SUPER| Constructor and Description |
|---|
MethodSignatureVisitor(java.lang.String methodName,
int access,
java.lang.String classname,
java.lang.String description,
java.lang.String[] exceptions,
java.lang.String signature,
java.util.Map<java.lang.String,java.lang.String> declaredTypeGenerics,
ClassInfo targetClassInfo) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
endType() |
int |
getAccessFlags()
Returns methods access flags.
|
int |
getAllArgumentsSize()
Returns the size of all arguments on stack.
|
AnnotationInfo[] |
getAnnotations()
Returns annotation information, if there is any.
|
TypeInfoImpl |
getArgument(int ndx)
Returns methods argument (1-indexed).
|
int |
getArgumentOffset(int index)
Returns bytecode offset of an argument in local variables.
|
int |
getArgumentsCount()
Returns the number of methods arguments.
|
java.lang.String |
getAsmMethodSignature() |
ClassInfo |
getClassInfo()
Returns target
class informations. |
java.lang.String |
getClassname()
Returns bytecode-like class name, where packages are separated by a slash.
|
java.lang.String |
getCleanSignature()
Returns a "clean" signature, that is ready for the comparison.
|
java.lang.String |
getDeclaredClassName()
Returns declared class name for inner methods or
classname for top-level methods. |
java.lang.String |
getDescription()
Returns bytecode-like method description.
|
java.lang.String[] |
getExceptions()
Returns array of exceptions or
null if no exception is declared. |
java.lang.String |
getMethodName()
Returns method name.
|
TypeInfo |
getReturnType()
Returns return
type information. |
java.lang.String |
getSignature()
Returns java-like method signature of
description. |
boolean |
isTopLevelMethod()
Returns
true if method is declared in top-level class. |
void |
setDeclaredClassName(java.lang.String declaredClassName) |
protected void |
startType() |
java.lang.String |
toString() |
SignatureVisitor |
visitArrayType()
Visits a signature corresponding to an array type.
|
void |
visitBaseType(char descriptor)
Visits a signature corresponding to a primitive type.
|
void |
visitClassType(java.lang.String name)
Starts the visit of a signature corresponding to a class or interface type.
|
SignatureVisitor |
visitParameterType()
Visits the type of a method parameter.
|
SignatureVisitor |
visitReturnType()
Visits the return type of the method.
|
getDeclaration, visitClassBound, visitEnd, visitExceptionType, visitFormalTypeParameter, visitInnerClassType, visitInterface, visitInterfaceBound, visitSuperclass, visitTypeArgument, visitTypeArgument, visitTypeVariableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAnnotation, getDeclaration, getExceptionsAsString, hasAnnotation, hasNoArguments, hasNoReturnValue, hasOneArgument, hasReturnValue, isPrivateMethod, isPublicMethod, isRootMethod, matchClassName, matchMethodNameprotected final java.lang.String classname
protected final java.lang.String methodName
protected final java.lang.String[] exceptionsArray
protected final boolean isStatic
protected final boolean isFinal
protected final ClassInfo targetClassInfo
protected final FastIntBuffer argumentsOffset
protected final java.util.List<TypeInfoImpl> arguments
protected final int access
protected final java.lang.String description
protected TypeInfo returnType
protected java.lang.String signature
protected int argumentsCount
protected int argumentsWords
protected java.lang.String asmMethodSignature
protected AnnotationInfo[] annotations
protected java.lang.String declaredClassName
protected final java.util.Map<java.lang.String,java.lang.String> generics
protected final java.util.Map<java.lang.String,java.lang.String> declaredTypeGeneric
public MethodSignatureVisitor(java.lang.String methodName,
int access,
java.lang.String classname,
java.lang.String description,
java.lang.String[] exceptions,
java.lang.String signature,
java.util.Map<java.lang.String,java.lang.String> declaredTypeGenerics,
ClassInfo targetClassInfo)
public java.lang.String getSignature()
MethodInfodescription.
Does not contain any generic information.getSignature in interface MethodInfopublic java.lang.String getCleanSignature()
MethodInfogetCleanSignature in interface MethodInfopublic java.lang.String getAsmMethodSignature()
public java.lang.String getMethodName()
MethodInfogetMethodName in interface MethodInfopublic int getArgumentsCount()
MethodInfogetArgumentsCount in interface MethodInfopublic TypeInfoImpl getArgument(int ndx)
MethodInfogetArgument in interface MethodInfopublic int getArgumentOffset(int index)
MethodInfogetArgumentOffset in interface MethodInfopublic int getAllArgumentsSize()
MethodInfolong.getAllArgumentsSize in interface MethodInfopublic TypeInfo getReturnType()
MethodInfotype information.getReturnType in interface MethodInfopublic int getAccessFlags()
MethodInfogetAccessFlags in interface MethodInfopublic java.lang.String getClassname()
MethodInfoorg/jodd/JoddgetClassname in interface MethodInfopublic java.lang.String getDescription()
MethodInfogetDescription in interface MethodInfoMethodInfo.getSignature()public AnnotationInfo[] getAnnotations()
MethodInfogetAnnotations in interface MethodInfopublic java.lang.String getDeclaredClassName()
MethodInfoclassname for top-level methods.getDeclaredClassName in interface MethodInfopublic void setDeclaredClassName(java.lang.String declaredClassName)
public boolean isTopLevelMethod()
MethodInfotrue if method is declared in top-level class.isTopLevelMethod in interface MethodInfopublic ClassInfo getClassInfo()
MethodInfoclass informations.getClassInfo in interface MethodInfopublic java.lang.String[] getExceptions()
MethodInfonull if no exception is declared.getExceptions in interface MethodInfopublic SignatureVisitor visitParameterType()
SignatureVisitorvisitParameterType in class TraceSignatureVisitorpublic SignatureVisitor visitReturnType()
SignatureVisitorvisitReturnType in class TraceSignatureVisitorpublic SignatureVisitor visitArrayType()
SignatureVisitorvisitArrayType in class TraceSignatureVisitorpublic void visitBaseType(char descriptor)
SignatureVisitorvisitBaseType in class TraceSignatureVisitordescriptor - the descriptor of the primitive type, or 'V' for void .public void visitClassType(java.lang.String name)
SignatureVisitorvisitClassType in class TraceSignatureVisitorname - the internal name of the class or interface.protected void startType()
startType in class TraceSignatureVisitorprotected void endType()
endType in class TraceSignatureVisitorpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2003-present Jodd Team