public static class AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition extends Object implements AgentBuilder.RedefinitionStrategy.Collector
Modifier and Type | Class and Description |
---|---|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Entry
An entry describing a type redefinition.
|
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition, AgentBuilder.RedefinitionStrategy.Collector.ForRetransformation
Modifier | Constructor and Description |
---|---|
protected |
ForRedefinition(AgentBuilder.Default.Transformation transformation)
Creates a new collector for a redefinition.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(Instrumentation instrumentation,
ByteBuddy byteBuddy,
AgentBuilder.BinaryLocator binaryLocator,
AgentBuilder.TypeStrategy typeStrategy,
AgentBuilder.Listener listener,
AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy,
AccessControlContext accessControlContext,
AgentBuilder.InitializationStrategy initializationStrategy,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy)
Applies the represented type modification on all collected types.
|
boolean |
consider(Class<?> type,
ElementMatcher<? super TypeDescription> ignoredTypes)
Considers a loaded class for modification.
|
String |
toString() |
protected ForRedefinition(AgentBuilder.Default.Transformation transformation)
transformation
- The transformation of the built agent.public boolean consider(Class<?> type, ElementMatcher<? super TypeDescription> ignoredTypes)
AgentBuilder.RedefinitionStrategy.Collector
consider
in interface AgentBuilder.RedefinitionStrategy.Collector
type
- The type that is to be considered.ignoredTypes
- A matcher that indicates what types are explicitly ignored.true
if the class is considered to be redefined.public void apply(Instrumentation instrumentation, ByteBuddy byteBuddy, AgentBuilder.BinaryLocator binaryLocator, AgentBuilder.TypeStrategy typeStrategy, AgentBuilder.Listener listener, AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy, AccessControlContext accessControlContext, AgentBuilder.InitializationStrategy initializationStrategy, AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy) throws UnmodifiableClassException, ClassNotFoundException
AgentBuilder.RedefinitionStrategy.Collector
apply
in interface AgentBuilder.RedefinitionStrategy.Collector
instrumentation
- The instrumentation to use.byteBuddy
- The Byte Buddy configuration to use.binaryLocator
- The binary locator to use.typeStrategy
- The type strategy to use.listener
- The listener to report to.nativeMethodStrategy
- The native method strategy to apply.accessControlContext
- The access control context to use.initializationStrategy
- The initialization strategy to use.bootstrapInjectionStrategy
- The bootstrap injection strategy to use.UnmodifiableClassException
- If an unmodifiable class is attempted to be modified.ClassNotFoundException
- If a class cannot be found while redefining another class.Copyright © 2014–2016. All rights reserved.