protected abstract static class AgentBuilder.RedefinitionStrategy.Collector extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition
A collector that applies a redefinition of already loaded classes.
|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.ForRetransformation
A collector that applies a retransformation of already loaded classes.
|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.PrependableIterator
An iterator that allows prepending of iterables to be applied previous to another iterator.
|
| Modifier and Type | Field and Description |
|---|---|
protected List<Class<?>> |
types
All types that were collected for redefinition.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Collector()
Creates a new collector.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
apply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
int batch)
Applies all types that this collector collected.
|
protected void |
consider(AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
Class<?> type,
Class<?> classBeingRedefined,
JavaModule module,
boolean unmodifiable)
Does consider the retransformation or redefinition of a loaded type.
|
protected void |
consider(AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
Class<?> type,
JavaModule module)
Does consider the retransformation or redefinition of a loaded type without a loaded type representation.
|
protected abstract void |
doApply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
List<Class<?>> types,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener)
Applies this collector.
|
protected void |
include(List<Class<?>> types)
Includes all the supplied types in this collector.
|
protected void consider(AgentBuilder.RawMatcher typeMatcher, AgentBuilder.RawMatcher ignoredTypeMatcher, AgentBuilder.Listener listener, TypeDescription typeDescription, Class<?> type, JavaModule module)
typeMatcher - The type matcher to apply.ignoredTypeMatcher - The ignored type matcher to apply.listener - The listener to apply during the consideration.typeDescription - The type description of the type being considered.type - The loaded type being considered.module - The type's Java module or null if the current VM does not support modules.protected void consider(AgentBuilder.RawMatcher typeMatcher, AgentBuilder.RawMatcher ignoredTypeMatcher, AgentBuilder.Listener listener, TypeDescription typeDescription, Class<?> type, Class<?> classBeingRedefined, JavaModule module, boolean unmodifiable)
typeMatcher - A type matcher to apply.ignoredTypeMatcher - The ignored type matcher to apply.listener - The listener to apply during the consideration.typeDescription - The type description of the type being considered.type - The loaded type being considered.classBeingRedefined - The loaded type being considered or null if it should be considered non-available.module - The type's Java module or null if the current VM does not support modules.unmodifiable - true if the current type should be considered unmodifiable.protected void include(List<Class<?>> types)
types - The types to include.protected int apply(Instrumentation instrumentation, AgentBuilder.CircularityLock circularityLock, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener, int batch)
instrumentation - The instrumentation instance to apply changes to.circularityLock - The circularity lock to use.locationStrategy - The location strategy to use.listener - The listener to use.redefinitionBatchAllocator - The redefinition batch allocator to use.redefinitionListener - The redefinition listener to use.batch - The next batch's index.protected abstract void doApply(Instrumentation instrumentation, AgentBuilder.CircularityLock circularityLock, List<Class<?>> types, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener) throws UnmodifiableClassException, ClassNotFoundException
instrumentation - The instrumentation instance to apply the transformation for.circularityLock - The circularity lock to use.types - The types of the current patch to transform.locationStrategy - The location strategy to use.listener - the listener to notify.UnmodifiableClassException - If a class is not modifiable.ClassNotFoundException - If a class could not be found.Copyright © 2014–2019. All rights reserved.