The Fragment object is a specification of a probe's logic. It contains the Java source code that will be executed.
The Fragment object is required. It contains the Code object, and all data items that are referenced by the source code in the Code object.
A probe can contain more than one Fragment object, but no two Fragment objects can have the same type.
The Fragment object includes the following property:
| type | Required. For method probes, it must be entry, catch, or exit. For callsite probes, it must be beforeCall or afterCall. You cannot mix method fragments and callsite fragments in a single probe. |
<fragment type="entry">
<data . . . />
<code>
. . .
</code>
</fragment>
Contained by
The Probe object
Related concepts
Method probes versus callsite probes
Related information
A basic sample probe