The staticInitializer probe fragment type lets you insert new code into the class initializer of every probed class. If the class does not have a class initializer, one will be created.
The staticInitializer fragment code is executed before any of the original code in the class initializer of the probed class. If the probe uses the staticField object, the new static field will be default-constructed before the staticInitializer fragment code executes.
<fragment type="staticInitializer"> <data type="className" name="cn"/> <code> System.out.println("[Class " + cn + " is being loaded.]"); </code> </fragment>
Parent topic: Probekit element reference
Related reference
The Fragment probe object
The Data probe object
Related information
staticField and staticInitializer example