Package org.jacoco.agent.rt.internal
Class PreMain
java.lang.Object
org.jacoco.agent.rt.internal.PreMain
The agent which is referred as the
Premain-Class. The agent
configuration is provided with the agent parameters in the command line.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IRuntimecreateRuntime(Instrumentation inst) private static Objectstatic voidpremain(String options, Instrumentation inst) This method is called by the JVM to initialize Java agents.private static booleanredefineJavaBaseModule(Instrumentation instrumentation) Opensjava.basemodule forInjectedClassRuntimewhen executed on Java 9 JREs or higher.
-
Constructor Details
-
PreMain
private PreMain()
-
-
Method Details
-
premain
This method is called by the JVM to initialize Java agents.- Parameters:
options- agent optionsinst- instrumentation callback provided by the JVM- Throws:
Exception- in case initialization fails
-
createRuntime
- Throws:
Exception
-
redefineJavaBaseModule
Opensjava.basemodule forInjectedClassRuntimewhen executed on Java 9 JREs or higher.- Returns:
truewhen running on Java 9 or higher,falseotherwise- Throws:
Exception- if unable to open
-
getModule
- Returns:
cls.getModule()- Throws:
Exception
-