Package net.bytebuddy.dynamic.loading
Class ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm
- java.lang.Object
-
- net.bytebuddy.dynamic.loading.ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm
-
- All Implemented Interfaces:
ClassInjector.UsingInstrumentation.Dispatcher
- Enclosing interface:
- ClassInjector.UsingInstrumentation.Dispatcher
@Enhance public static class ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm extends java.lang.Object implements ClassInjector.UsingInstrumentation.Dispatcher
A dispatcher for a VM that is capable of appending to the boot and system class loader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingInstrumentation.Dispatcher
ClassInjector.UsingInstrumentation.Dispatcher.CreationAction, ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm, ClassInjector.UsingInstrumentation.Dispatcher.ForLegacyVm
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
appendToBootstrapClassLoaderSearch
TheInstrumentation#appendToBootstrapClassLoaderSearch
method.private java.lang.reflect.Method
appendToSystemClassLoaderSearch
TheInstrumentation#appendToSystemClassLoaderSearch
method.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava6CapableVm(java.lang.reflect.Method appendToBootstrapClassLoaderSearch, java.lang.reflect.Method appendToSystemClassLoaderSearch)
Creates a new dispatcher for a Java 6 compatible VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendToBootstrapClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the bootstrap class loader.void
appendToSystemClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the system class loader.boolean
isAlive()
Returnstrue
if this dispatcher is alive.
-
-
-
Field Detail
-
appendToBootstrapClassLoaderSearch
private final java.lang.reflect.Method appendToBootstrapClassLoaderSearch
TheInstrumentation#appendToBootstrapClassLoaderSearch
method.
-
appendToSystemClassLoaderSearch
private final java.lang.reflect.Method appendToSystemClassLoaderSearch
TheInstrumentation#appendToSystemClassLoaderSearch
method.
-
-
Constructor Detail
-
ForJava6CapableVm
protected ForJava6CapableVm(java.lang.reflect.Method appendToBootstrapClassLoaderSearch, java.lang.reflect.Method appendToSystemClassLoaderSearch)
Creates a new dispatcher for a Java 6 compatible VM.- Parameters:
appendToBootstrapClassLoaderSearch
- TheInstrumentation#appendToBootstrapClassLoaderSearch
method.appendToSystemClassLoaderSearch
- TheInstrumentation#appendToSystemClassLoaderSearch
method.
-
-
Method Detail
-
isAlive
public boolean isAlive()
Returnstrue
if this dispatcher is alive.- Specified by:
isAlive
in interfaceClassInjector.UsingInstrumentation.Dispatcher
- Returns:
true
if this dispatcher is alive.
-
appendToBootstrapClassLoaderSearch
public void appendToBootstrapClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the bootstrap class loader.- Specified by:
appendToBootstrapClassLoaderSearch
in interfaceClassInjector.UsingInstrumentation.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to interact with.jarFile
- The jar file to append.
-
appendToSystemClassLoaderSearch
public void appendToSystemClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the system class loader.- Specified by:
appendToSystemClassLoaderSearch
in interfaceClassInjector.UsingInstrumentation.Dispatcher
- Parameters:
instrumentation
- The instrumentation instance to interact with.jarFile
- The jar file to append.
-
-