public class InterceptionMethod
extends java.lang.Object
getName()
as a wildcard
interception leads to many unwanted instrumentations.
The method signature is written in JVM format. This format is also used by JNI and is of the form:
(argument-type*)return-type
and uses the JVM's representation of type signatures for both argument type and return type. The following table
shows all type signatures:
Type | Signature |
---|---|
Z | boolean |
B | byte |
C | char |
S | short |
I | int |
J | long |
F | float |
D | double |
L fully-qualified-class ; | fully-qualified-class |
[ type | type[] |
The fully qualified class references have to be written with '/' package separators instead of the usual '.' package separators. There must be no spaces in a type signature.
For example, the Java method:
long someMethod (int n, String s, int[] arr);
has the following type signature:
(ILjava/lang/String;[I)J
InterceptorProbe
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
methodSignature |
Constructor and Description |
---|
InterceptionMethod(java.lang.String methodName,
java.lang.String methodSignature)
Constructor for a wildcard method interception.
|
InterceptionMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSignature)
Constructor for a method interception of a concrete class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.String |
getClassName()
Returns the class name.
|
java.lang.String |
getMethodName()
Returns the method name.
|
java.lang.String |
getMethodSignature()
Returns the method signature
|
int |
hashCode() |
InterceptionMethod |
init(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSignature) |
java.lang.String |
toString() |
public InterceptionMethod(java.lang.String className, java.lang.String methodName, java.lang.String methodSignature)
className
- the fully qualified name of the class that contains the intercepted method. Can be written
with '/' or '.' package separators. If null
, this constructor is equivalent to InterceptionMethod(String, String)
.methodName
- the name of the intercepted methodmethodSignature
- the signature of the intercepted method in the JVM format explained abovepublic InterceptionMethod(java.lang.String methodName, java.lang.String methodSignature)
methodName
- the name of the intercepted methodmethodSignature
- the signature of the intercepted method in the JVM format explained abovepublic java.lang.String getClassName()
public java.lang.String getMethodName()
public java.lang.String getMethodSignature()
public InterceptionMethod init(java.lang.String className, java.lang.String methodName, java.lang.String methodSignature)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object