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, isInterface
api, 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, visitTypeVariable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAnnotation, getDeclaration, getExceptionsAsString, hasAnnotation, hasNoArguments, hasNoReturnValue, hasOneArgument, hasReturnValue, isPrivateMethod, isPublicMethod, isRootMethod, matchClassName, matchMethodName
protected 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()
MethodInfo
description
.
Does not contain any generic information.getSignature
in interface MethodInfo
public java.lang.String getCleanSignature()
MethodInfo
getCleanSignature
in interface MethodInfo
public java.lang.String getAsmMethodSignature()
public java.lang.String getMethodName()
MethodInfo
getMethodName
in interface MethodInfo
public int getArgumentsCount()
MethodInfo
getArgumentsCount
in interface MethodInfo
public TypeInfoImpl getArgument(int ndx)
MethodInfo
getArgument
in interface MethodInfo
public int getArgumentOffset(int index)
MethodInfo
getArgumentOffset
in interface MethodInfo
public int getAllArgumentsSize()
MethodInfo
long
.getAllArgumentsSize
in interface MethodInfo
public TypeInfo getReturnType()
MethodInfo
type information
.getReturnType
in interface MethodInfo
public int getAccessFlags()
MethodInfo
getAccessFlags
in interface MethodInfo
public java.lang.String getClassname()
MethodInfo
org/jodd/Jodd
getClassname
in interface MethodInfo
public java.lang.String getDescription()
MethodInfo
getDescription
in interface MethodInfo
MethodInfo.getSignature()
public AnnotationInfo[] getAnnotations()
MethodInfo
getAnnotations
in interface MethodInfo
public java.lang.String getDeclaredClassName()
MethodInfo
classname
for top-level methods.getDeclaredClassName
in interface MethodInfo
public void setDeclaredClassName(java.lang.String declaredClassName)
public boolean isTopLevelMethod()
MethodInfo
true
if method is declared in top-level class.isTopLevelMethod
in interface MethodInfo
public ClassInfo getClassInfo()
MethodInfo
class informations
.getClassInfo
in interface MethodInfo
public java.lang.String[] getExceptions()
MethodInfo
null
if no exception is declared.getExceptions
in interface MethodInfo
public SignatureVisitor visitParameterType()
SignatureVisitor
visitParameterType
in class TraceSignatureVisitor
public SignatureVisitor visitReturnType()
SignatureVisitor
visitReturnType
in class TraceSignatureVisitor
public SignatureVisitor visitArrayType()
SignatureVisitor
visitArrayType
in class TraceSignatureVisitor
public void visitBaseType(char descriptor)
SignatureVisitor
visitBaseType
in class TraceSignatureVisitor
descriptor
- the descriptor of the primitive type, or 'V' for void
.public void visitClassType(java.lang.String name)
SignatureVisitor
visitClassType
in class TraceSignatureVisitor
name
- the internal name of the class or interface.protected void startType()
startType
in class TraceSignatureVisitor
protected void endType()
endType
in class TraceSignatureVisitor
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2003-present Jodd Team