Package net.bytebuddy.agent.builder
Interface AgentBuilder.RedefinitionStrategy.Dispatcher
-
- All Known Implementing Classes:
AgentBuilder.RedefinitionStrategy.Dispatcher.ForJava6CapableVm
,AgentBuilder.RedefinitionStrategy.Dispatcher.ForLegacyVm
- Enclosing class:
- AgentBuilder.RedefinitionStrategy
protected static interface AgentBuilder.RedefinitionStrategy.Dispatcher
A dispatcher for interacting with the instrumentation API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AgentBuilder.RedefinitionStrategy.Dispatcher.CreationAction
An action for creating a dispatcher.static class
AgentBuilder.RedefinitionStrategy.Dispatcher.ForJava6CapableVm
A dispatcher for a Java 6 capable VM.static class
AgentBuilder.RedefinitionStrategy.Dispatcher.ForLegacyVm
A dispatcher for a legacy VM.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isModifiableClass(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?> type)
Checks if the supplied type is modifiable.boolean
isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Checks if retransformation is supported for the supplied instrumentation instance.void
retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type)
Retransforms the supplied classes.
-
-
-
Method Detail
-
isModifiableClass
boolean isModifiableClass(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?> type)
Checks if the supplied type is modifiable.- Parameters:
instrumentation
- The instrumentation instance available.type
- The type to check for modifiability.- Returns:
true
if the supplied type is modifiable.
-
isRetransformClassesSupported
boolean isRetransformClassesSupported(java.lang.instrument.Instrumentation instrumentation)
Checks if retransformation is supported for the supplied instrumentation instance.- Parameters:
instrumentation
- The instrumentation instance available.- Returns:
true
if the supplied instance supports retransformation.
-
retransformClasses
void retransformClasses(java.lang.instrument.Instrumentation instrumentation, java.lang.Class<?>[] type) throws java.lang.instrument.UnmodifiableClassException
Retransforms the supplied classes.- Parameters:
instrumentation
- The instrumentation instance to use for retransformation.type
- The types to retransform.- Throws:
java.lang.instrument.UnmodifiableClassException
- If the supplied classes cannot be retransformed.
-
-