--> The staticInitializer probe fragment type

The staticInitializer probe fragment type

The staticInitializer probe fragment type lets you insert new code into the class initializer of every class that has at least one method instrumented by the probe. If the class does not have a class initializer, one will be created.

The code for a fragment of the type staticInitializer runs before any of the original code in the class initializer of the probed class. If the probe includes a specification of a static field, the new static field will be initialized using the default constructor of the static field's type before the staticInitializer fragment code runs.

The following data items are available to the staticInitializer fragment:
  • className
  • staticField
  • classSourceFile
  • methodNames
  • methodLineTables

Related reference
Probe fragments
Probe static fields
Related information
A staticField and staticInitializer probe example