public @interface After
The After annotation instructs DiSL to insert the snippet body after the marked region. The snippet will be invoked after a normal exit of the region or after an exit caused by an exception.
note: This is only general contract. It depends on particular marker how the contract will be implemented.
usage:
There are multiple optional parameters the annotation takes. Browse them for more details on usage.
This annotation should be used only with static methods that does not return any value or throw any exception.
The method might be specified with arguments of following types.
StaticContext (or
derived)
, DynamicContext
, ClassContext
and
ArgumentProcessContext
. There's no restriction on order or number of these
arguments.
Modifier and Type | Required Element and Description |
---|---|
java.lang.Class<? extends Marker> |
marker
Marker class defines a region where the snippet is applied.
|
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
args
Argument for the marker (as string).
|
boolean |
dynamicBypass
You can in general disable dynamic bypass on snippets, that are not using
any other class.
|
java.lang.Class<? extends java.lang.Object> |
guard
The guard class defining if the snippet will be inlined in particular
region or not.
|
int |
order
Defines ordering of the snippets.
|
java.lang.String |
scope
Scope of the methods, where the snippet is applied.
|
public abstract java.lang.Class<? extends Marker> marker
Marker class defines a region where the snippet is applied.
Implementation details
public abstract java.lang.String args
Argument for the marker (as string).
Default value means none.
public abstract java.lang.String scope
Scope of the methods, where the snippet is applied.
Default value means everything.
Implementation details
public abstract java.lang.Class<? extends java.lang.Object> guard
The guard class defining if the snippet will be inlined in particular region or not.
Default value means none.
public abstract int order
Defines ordering of the snippets. Smaller number indicates that snippet will be inlined closer to the instrumented code.
Default is 100.
public abstract boolean dynamicBypass
You can in general disable dynamic bypass on snippets, that are not using any other class. (Advanced option)
note: Usage of dynamic bypass is determined by the underlying instrumentation framework.