Interface ExperimentalInstrumentationModule
public interface ExperimentalInstrumentationModule
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThis class is internal and is hence not for public use. -
Method Summary
Modifier and TypeMethodDescriptionSome instrumentations need to invoke classes which are present both in the agent classloader and the instrumented application classloader.Allows instrumentation modules to choose whether the helper classes should be injected into the same class loader as the instrumented library, or into an isolated class loader.Some instrumentation need to access JPMS modules that are not accessible by default, this method provides a way to access those classes like the "--add-opens" JVM command.default voidregisterVirtualFields(BiConsumer<String, String> virtualFieldRegistrar) Register virtual field.
-
Method Details
-
registerVirtualFields
Register virtual field. First argument for the consumer is dot class name of the type where the field is added and the second argument is the dot class name of the field type. -
agentPackagesToHide
Some instrumentations need to invoke classes which are present both in the agent classloader and the instrumented application classloader. By default, the classloader of the instrumentation would link those against the class provided by the agent. This setting allows to hide packages, so that matching classes are instead used from the application classloader.- Returns:
- the list of packages (without trailing dots)
-
jpmsModulesToOpen
Some instrumentation need to access JPMS modules that are not accessible by default, this method provides a way to access those classes like the "--add-opens" JVM command.- Returns:
- map of module to open as key, list of packages as value.
-
helperClassStrategy
Allows instrumentation modules to choose whether the helper classes should be injected into the same class loader as the instrumented library, or into an isolated class loader.
-