Package net.neoforged.fml.startup
Class DevAgent
java.lang.Object
net.neoforged.fml.startup.DevAgent
Our javaagent which we attach to the JVM to be able to add opens/exports to modules when the receiving modules
aren't defined at boot time, and we can't use JVM CLI args. It's also useful for JUnit scenarios, where adding
JVM arguments for IDEs is very annoying.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidagentmain(String arguments, Instrumentation instrumentation) This method is called when the agent was dynamically attached.static InstrumentationInvoked only fromInstrumentationHelper.static voidpremain(String arguments, Instrumentation instrumentation) This method is called when the agent was added to the JVMs command line arguments.
-
Field Details
-
instrumentation
-
-
Constructor Details
-
DevAgent
private DevAgent()
-
-
Method Details
-
getInstrumentation
Invoked only fromInstrumentationHelper. Needs to be public because it makes it easier for reflection to access it. -
premain
This method is called when the agent was added to the JVMs command line arguments. -
agentmain
This method is called when the agent was dynamically attached.
-