Annotation Interface MethodSpec
public @interface MethodSpec
Specification of the intercepted method.
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionThe fully qualified class name of the method.The name of the method.String[]
The array of all parameter types that the method declares.The return type that the method declares. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Iffalse
, only the method contained inclassName()
will be instrumented.
-
Element Details
-
className
String classNameThe fully qualified class name of the method. Can be an empty string if you would like to instrument all methods with the given name and signature. Packages are separated with dots, inner classes with '$'.- Returns:
- the class name
-
methodName
String methodNameThe name of the method. If you would like to instrument a constructor, use<init>
.- Returns:
- the method name
-
parameterTypes
String[] parameterTypesThe array of all parameter types that the method declares. The types must be fully qualified. Packages are separated with dots, inner classes with '$'. Arrays are specified with a trailing '[]'.- Returns:
- the array of the declared types of all parameters
-
returnType
String returnTypeThe return type that the method declares. The type must be fully qualified. Packages are separated with dots, inner classes with '$'. Arrays are specified with a trailing '[]'.- Returns:
- the return type
-
-
-
subtypes
boolean subtypesIffalse
, only the method contained inclassName()
will be instrumented. Iftrue
, the matching methods inclassName()
and all its subtypes will be instrumented.- Returns:
- if methods from subtypes should be instrumented, too
- Default:
- false
-