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 AgentBuilder.CircularityLock |
circularityLock
The circularity lock to use.
|
protected AgentBuilder.Listener |
listener
The listener to notify on transformations.
|
protected AgentBuilder.LocationStrategy |
locationStrategy
The location strategy to use.
|
protected List<Class<?>> |
types
All types that were collected for redefinition.
|
Modifier | Constructor and Description |
---|---|
protected |
Collector(AgentBuilder.RawMatcher matcher,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.Listener listener,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.CircularityLock circularityLock)
Creates a new collector.
|
Modifier and Type | Method and Description |
---|---|
protected int |
apply(Instrumentation instrumentation,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
int batch)
Applies all types that this collector collected.
|
protected void |
consider(Class<?> type,
boolean modifiable)
Considers a loaded class for collection.
|
protected abstract void |
doApply(Instrumentation instrumentation,
List<Class<?>> types)
Applies this collector.
|
protected final AgentBuilder.LocationStrategy locationStrategy
protected final AgentBuilder.Listener listener
protected final AgentBuilder.CircularityLock circularityLock
protected Collector(AgentBuilder.RawMatcher matcher, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.DescriptionStrategy descriptionStrategy, AgentBuilder.Listener listener, AgentBuilder.FallbackStrategy fallbackStrategy, AgentBuilder.CircularityLock circularityLock)
matcher
- The matcher to identify what types to redefine.poolStrategy
- The pool strategy to use.locationStrategy
- The location strategy to use.descriptionStrategy
- The description strategy for resolving type descriptions for types.listener
- The listener to notify on transformations.fallbackStrategy
- The fallback strategy to apply.circularityLock
- The circularity lock to use.protected void consider(Class<?> type, boolean modifiable)
type
- The loaded type being considered.modifiable
- true
if the considered type is considered modifiable.protected int apply(Instrumentation instrumentation, AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator, AgentBuilder.RedefinitionStrategy.Listener redefinitionListener, int batch)
instrumentation
- The instrumentation instance to apply changes to.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, List<Class<?>> types) throws UnmodifiableClassException, ClassNotFoundException
instrumentation
- The instrumentation instance to apply the transformation for.types
- The types of the current patch to transform.UnmodifiableClassException
- If a class is not modifiable.ClassNotFoundException
- If a class could not be found.Copyright © 2014–2022. All rights reserved.