Package net.bytebuddy.agent.builder
Interface AgentBuilder.RedefinitionStrategy.Dispatcher
- Enclosing class:
AgentBuilder.RedefinitionStrategy
@Proxied("java.lang.instrument.Instrumentation")
protected static interface AgentBuilder.RedefinitionStrategy.Dispatcher
A dispatcher for interacting with the instrumentation API.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isModifiableClass
(Instrumentation instrumentation, Class<?> type) Checks if the supplied type is modifiable.boolean
isRetransformClassesSupported
(Instrumentation instrumentation) Checks if retransformation is supported for the supplied instrumentation instance.void
retransformClasses
(Instrumentation instrumentation, Class<?>[] type) Retransforms the supplied classes.
-
Method Details
-
isModifiableClass
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
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(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.
-