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.DispatcherA dispatcher for interacting with the instrumentation API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.RedefinitionStrategy.Dispatcher.CreationActionAn action for creating a dispatcher.static classAgentBuilder.RedefinitionStrategy.Dispatcher.ForJava6CapableVmA dispatcher for a Java 6 capable VM.static classAgentBuilder.RedefinitionStrategy.Dispatcher.ForLegacyVmA dispatcher for a legacy VM.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisModifiableClass(Instrumentation instrumentation, Class<?> type)Checks if the supplied type is modifiable.booleanisRetransformClassesSupported(Instrumentation instrumentation)Checks if retransformation is supported for the supplied instrumentation instance.voidretransformClasses(Instrumentation instrumentation, Class<?>[] type)Retransforms the supplied classes.
-
-
-
Method Detail
-
isModifiableClass
boolean isModifiableClass(Instrumentation instrumentation, Class<?> type)
Checks if the supplied type is modifiable.- Parameters:
instrumentation- The instrumentation instance available.type- The type to check for modifiability.- Returns:
trueif the supplied type is modifiable.
-
isRetransformClassesSupported
boolean isRetransformClassesSupported(Instrumentation instrumentation)
Checks if retransformation is supported for the supplied instrumentation instance.- Parameters:
instrumentation- The instrumentation instance available.- Returns:
trueif the supplied instance supports retransformation.
-
retransformClasses
void retransformClasses(Instrumentation instrumentation, Class<?>[] type) throws UnmodifiableClassException
Retransforms the supplied classes.- Parameters:
instrumentation- The instrumentation instance to use for retransformation.type- The types to retransform.- Throws:
UnmodifiableClassException- If the supplied classes cannot be retransformed.
-
-