T
- The type of element that is supplied to the instrumentation API.protected abstract static class AgentBuilder.RedefinitionStrategy.Delegate<T> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AgentBuilder.RedefinitionStrategy.Delegate.ForRedefinition
A delegate that applies a redefinition of already loaded classes.
|
protected static class |
AgentBuilder.RedefinitionStrategy.Delegate.ForRetransformation
A delegate that applies a retransformation of already loaded classes.
|
Modifier and Type | Field and Description |
---|---|
protected AgentBuilder.Default.Transformation |
transformation
The transformation of the built agent.
|
protected List<Class<?>> |
types
A list of already collected redefinitions.
|
Modifier | Constructor and Description |
---|---|
protected |
Delegate(AgentBuilder.Default.Transformation transformation)
Creates a new delegate.
|
Modifier and Type | Method and Description |
---|---|
protected void |
apply(Instrumentation instrumentation,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
AgentBuilder.RedefinitionStrategy.FailureHandler redefinitionFailureHandler)
Applies the current retransformation process.
|
protected void |
consider(AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
Class<?> type,
Class<?> classBeingRedefined,
JavaModule module)
Considers the supplied type for redefinition.
|
protected void |
consider(AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
Class<?> type,
Class<?> classBeingRedefined,
JavaModule module,
boolean unmodifiable)
Considers the supplied type for redefinition.
|
protected abstract void |
doApply(List<T> transformations,
Instrumentation instrumentation)
Applies a type redefinition.
|
String |
toString() |
protected abstract T |
transform(Class<?> type,
AgentBuilder.LocationStrategy locationStrategy)
Turns a type into a transformation-ready primitive of the current redefinition process.
|
protected final AgentBuilder.Default.Transformation transformation
protected Delegate(AgentBuilder.Default.Transformation transformation)
transformation
- The transformation of the built agent.protected void consider(AgentBuilder.RawMatcher ignoredTypeMatcher, AgentBuilder.Listener listener, TypeDescription typeDescription, Class<?> type, Class<?> classBeingRedefined, JavaModule module)
ignoredTypeMatcher
- The ignored type matcher.listener
- The listener to notify.typeDescription
- The type's description.type
- The type being redefined.classBeingRedefined
- The type being redefined or null
if it should be considered unavailable.module
- The redefined type's module or null
if the current VM does not support the module system.protected void consider(AgentBuilder.RawMatcher ignoredTypeMatcher, AgentBuilder.Listener listener, TypeDescription typeDescription, Class<?> type, Class<?> classBeingRedefined, JavaModule module, boolean unmodifiable)
ignoredTypeMatcher
- The ignored type matcher.listener
- The listener to notify.typeDescription
- The type's description.type
- The type being redefined.classBeingRedefined
- The type being redefined or null
if it should be considered unavailable.module
- The redefined type's module or null
if the current VM does not support the module system.unmodifiable
- true
if the type should be seen as unmodifiable.protected void apply(Instrumentation instrumentation, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener, AgentBuilder.RedefinitionStrategy.FailureHandler redefinitionFailureHandler)
instrumentation
- The instrumentation instance to apply the redefinition upon.locationStrategy
- The location strategy to use.listener
- The listener to notify.redefinitionBatchAllocator
- The redefinition batch allocator to use.redefinitionListener
- The redefinition listener to use.redefinitionFailureHandler
- The redefinition failure handler to use.protected abstract T transform(Class<?> type, AgentBuilder.LocationStrategy locationStrategy) throws IOException
type
- The type to transform.locationStrategy
- The location strategy to use.IOException
- If an I/O error occured.protected abstract void doApply(List<T> transformations, Instrumentation instrumentation) throws UnmodifiableClassException, ClassNotFoundException
transformations
- The transformations to apply.instrumentation
- The instrumentation instance to apply the redefinition on.UnmodifiableClassException
- If a class was not modifiable.ClassNotFoundException
- If a class was not found.Copyright © 2014–2016. All rights reserved.