Class AgentBuilder.InjectionStrategy.UsingInstrumentation

    • Field Detail

      • instrumentation

        private final java.lang.instrument.Instrumentation instrumentation
        The instrumentation instance to use.
      • folder

        private final java.io.File folder
        The folder to store jar files being used for bootstrap injection.
    • Constructor Detail

      • UsingInstrumentation

        public UsingInstrumentation​(java.lang.instrument.Instrumentation instrumentation,
                                    java.io.File folder)
        Creates a new bootstrap injection strategy.
        Parameters:
        instrumentation - The instrumentation instance to use.
        folder - The folder to store jar files being used for bootstrap injection.
    • Method Detail

      • resolve

        public ClassInjector resolve​(java.lang.ClassLoader classLoader,
                                     java.security.ProtectionDomain protectionDomain)
        Resolves the class injector to use for a given class loader and protection domain.
        Specified by:
        resolve in interface AgentBuilder.InjectionStrategy
        Parameters:
        classLoader - The class loader to use.
        protectionDomain - The protection domain to use.
        Returns:
        The class injector to use.