Package org.springframework.aot.agent
Class RuntimeHintsAgent
java.lang.Object
org.springframework.aot.agent.RuntimeHintsAgent
Java Agent that records method invocations related to
RuntimeHints
metadata.
This agent uses class transformers
that modify bytecode to intercept and record method invocations at runtime.
By default, this agent only instruments code in the org.springframework
package.
Instrumented packages can be configured by passing an argument string to the -javaagent
option, as a comma-separated list of packages to instrument prefixed with "+"
and packages to ignore prefixed with "-"
:
-javaagent:/path/to/spring-core-test.jar=+org.springframework,-io.spring,+org.example")
- Since:
- 6.0
- Author:
- Brian Clozel
- See Also:
-
InvocationsRecorderClassTransformer
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isLoaded()
Static accessor for detecting whether the agent is loaded in the current JVM.static void
premain
(String agentArgs, Instrumentation inst)
-
Method Details
-
premain
-
isLoaded
public static boolean isLoaded()Static accessor for detecting whether the agent is loaded in the current JVM.- Returns:
- whether the agent is active for the current JVM
-