|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jprofiler.api.agent.interceptor.InterceptionMethod
public class InterceptionMethod
Defines a single method that should be intercepted by an interceptor. You can define a method in a concrete class or a wildcard interception that intercepts all methods based on the method name an signature only. For wildcard interceptions, make sure to try to intercept uncommon method signatures only in order to reduce the instrumentation overhead. For example, intercepting 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-typeand 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
Interceptor
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
java.lang.String |
getClassName()
Returns the class name. |
java.lang.String |
getMethodName()
Returns the method name. |
java.lang.String |
getMethodSignature()
Returns the method signature |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 aboveMethod Detail |
---|
public java.lang.String getClassName()
public java.lang.String getMethodName()
public java.lang.String getMethodSignature()
|
JProfiler API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |