Interface HelperResourceBuilder
public interface HelperResourceBuilder
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Registers a resource to be injected in the user's class loader.void
Registers a resource to be injected in the user's class loader.default void
registerForAllClassLoaders
(String resourcePath) Registers a resource to be injected into all class loaders in the instrumented application.void
registerForAllClassLoaders
(String applicationResourcePath, String agentResourcePath) Registers a resource to be injected into all class loaders in the instrumented application.
-
Method Details
-
register
Registers a resource to be injected in the user's class loader.This is a convenience method for
register(resourcePath, resourcePath)
. -
register
Registers a resource to be injected in the user's class loader.agentResourcePath
can be the same asapplicationResourcePath
, but it is often desirable to use a slightly different path foragentResourcePath
, so that multiple versions of an instrumentation (each injecting their own version of the resource) can co-exist inside the agent jar file.- Parameters:
applicationResourcePath
- the path in the user's class loader at which to inject the resourceagentResourcePath
- the path in the agent class loader from which to get the content for the resource
-
registerForAllClassLoaders
Registers a resource to be injected into all class loaders in the instrumented application.This is a convenience method for
registerForAllClassLoaders(resourcePath, resourcePath)
. -
registerForAllClassLoaders
Registers a resource to be injected into all class loaders in the instrumented application.agentResourcePath
can be the same asapplicationResourcePath
, but it is often desirable to use a slightly different path foragentResourcePath
, so that multiple versions of an instrumentation (each injecting their own version of the resource) can co-exist inside the agent jar file.- Parameters:
applicationResourcePath
- the path in the user's class loader at which to inject the resourceagentResourcePath
- the path in the agent class loader from which to get the content for the resource
-