Package net.bytebuddy.dynamic.loading
Interface ClassInjector.UsingInstrumentation.Dispatcher
-
- All Known Implementing Classes:
ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm
,ClassInjector.UsingInstrumentation.Dispatcher.ForLegacyVm
- Enclosing class:
- ClassInjector.UsingInstrumentation
protected static interface ClassInjector.UsingInstrumentation.Dispatcher
A dispatcher to interact with the instrumentation API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ClassInjector.UsingInstrumentation.Dispatcher.CreationAction
An action to create a dispatcher for interacting with the instrumentation API.static class
ClassInjector.UsingInstrumentation.Dispatcher.ForJava6CapableVm
A dispatcher for a VM that is capable of appending to the boot and system class loader.static class
ClassInjector.UsingInstrumentation.Dispatcher.ForLegacyVm
A dispatcher for a legacy VM that is not capable of appending jar files using instrumentation.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
isAlive
boolean isAlive()
Returnstrue
if this dispatcher is alive.- Returns:
true
if this dispatcher is alive.
-
appendToBootstrapClassLoaderSearch
void appendToBootstrapClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the bootstrap class loader.- Parameters:
instrumentation
- The instrumentation instance to interact with.jarFile
- The jar file to append.
-
appendToSystemClassLoaderSearch
void appendToSystemClassLoaderSearch(java.lang.instrument.Instrumentation instrumentation, java.util.jar.JarFile jarFile)
Appends a jar file to the system class loader.- Parameters:
instrumentation
- The instrumentation instance to interact with.jarFile
- The jar file to append.
-
-