The fragment at class scope specifies the data and initialization requirements of a probe, if any.
The fragment at class scope is optional. It can be used to include static data members, static helper functions, or any other Java construct in the probe class. For example, you can perform one-time initialization for a probe by creating a static initializer that runs when the probe's class is loaded.
The contents of the fragment at class scope are placed in the generated source code for the probe class at class scope. That is, the contents will appear inside the generated probe class, but outside all methods. The variables declared in the fragment at class scope will be visible to all fragments in the probe.
This kind of fragment lets you insert code into the probe class that is generated by Probekit, which is the class that your other probe fragments are compiled into. It does not apply to instrumented (probed) classes. To insert a new static field in probed classes, use the staticField specification. To insert code in a probed class that runs when the class is loaded, use the staticInitializer fragment type.
A probe can have only one fragment at class scope.
To enter a fragment at class scope, select Probe in the editor's tree pane, and enter data for the fragment in the editing pane.