previous      content      next
Callback method parameter annotation @Params

Callback parameter annotated with @Params allows to access all method parameters.

In which callbacks can be used

Parameter annotated with @Params can be used in any callback.

Declaration type

Parameter annotated with @Params must be declared as java.lang.Object[].

Description

Parameter annotated with @Params will be assigned with a newly created array with length equal to the number of method parameters. First parameter is stored in the array at index 0, second parameter - at index 1 etc. If instrumented method has no parameters, parameter annotated with @Params will be assigned with an empty array.

Parameters of reference types will be stored as is. Parameters of primitive types will be stored boxed.

Note, that each time a callback with parameter annotated with @Params is invoked, a new array is created. For performance considerations, use @Param(<number>) instead whenever possible.

previous      content      next