Package net.uptheinter.interceptify
Class EntryPoint
java.lang.Object
net.uptheinter.interceptify.EntryPoint
This is the entrypoint for setting up interception. In most cases, your application's
main function should create a StartupConfig implementation and then immediately call
entryPoint(StartupConfig, String[])
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
agentmain
(String args, Instrumentation inst) Placeholder function for future runtime Java Agent registration.static void
entryPoint
(StartupConfig cfg, String[] args) This is the entrypoint to Interceptify.static void
premain
(String args, Instrumentation inst) This function should be called by the JVM by setting this class up as a Java Agent.
-
Method Details
-
entryPoint
This is the entrypoint to Interceptify. You generally want to call this immediately from yourmain()
function.- Parameters:
cfg
- an implementation of StartupConfigargs
- These arguments will be passed to the target application's main.
-
premain
This function should be called by the JVM by setting this class up as a Java Agent. See-javaagent
for information.This functionality is currently reserved for future use. Consequently, you are required to initialise this library as a Java Agent. This is primarily to avoid any complaints/problems when this functionality is leveraged in a future version and someone wonders why things don't work because they didn't use
-javaagent
on an older version.- Parameters:
args
- args from the JVM via-javaagent
inst
- an instance ofInstrumentation
, incidentally, also passed by the JVM.
-
agentmain
Placeholder function for future runtime Java Agent registration.- Parameters:
args
- args from the JVMinst
- anInstrumentation
instance from the JVM
-