@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface SplitInterception
String
or Payload
.
You can get information from the intercepted method like parameter values or the instance by declaring parameters annotated with
the annotations from the com.jprofiler.api.probe.injected.parameter package. You can also declare a parameter of type ProbeContext
to
open or close control objects or check if the probe is currently being recorded.
If you return a Payload
to specify control objects or custom event types, you must declare a parameter of type ProbeContext
and create the returned object with
ProbeContext.createPayload(String, Object, Enum)
.
If you don't want to create a split for the current invocation, the probe method can return null
.
Modifier and Type | Required Element and Description |
---|---|
MethodSpec |
method
Specifies the method that should be intercepted.
|
Modifier and Type | Optional Element and Description |
---|---|
boolean |
exceptionPayloads
If payloads should also be recorded if the method throws an exception.
|
boolean |
payloads
If payloads should be created in addition to the call tree split.
|
boolean |
reentrant
Indicates if your interception is reentrant.
|
public abstract MethodSpec method
public abstract boolean payloads
public abstract boolean reentrant
false
, the probe method will not be called for recursive invocations of the intercepted method and only one split will be created.
If true
, splits will be nested, but only one payload will be created for the outermost call.