Class EntryPoint

java.lang.Object
net.uptheinter.interceptify.EntryPoint

public final class EntryPoint extends Object
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 Details

    • entryPoint

      public static void entryPoint(StartupConfig cfg, String[] args)
      This is the entrypoint to Interceptify. You generally want to call this immediately from your main() function.
      Parameters:
      cfg - an implementation of StartupConfig
      args - These arguments will be passed to the target application's main.
    • premain

      public static void premain(String args, Instrumentation inst)
      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 of Instrumentation, incidentally, also passed by the JVM.
    • agentmain

      public static void agentmain(String args, Instrumentation inst)
      Placeholder function for future runtime Java Agent registration.
      Parameters:
      args - args from the JVM
      inst - an Instrumentation instance from the JVM