public abstract 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.Chunked
A collector that applies a redefinition and applies all redefinitions as a separate transformation request per class.
|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Cumulative
A collector that applies a redefinition and applies all redefinitions as a single transformation request.
|
protected static class |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Entry
An entry describing a type redefinition.
|
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition, AgentBuilder.RedefinitionStrategy.Collector.ForRetransformation
Modifier and Type | Field and Description |
---|---|
protected List<AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Entry> |
entries
A list of already collected redefinitions.
|
protected AgentBuilder.Default.Transformation |
transformation
The transformation of the built agent.
|
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,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener)
Applies this collector.
|
boolean |
consider(TypeDescription typeDescription,
Class<?> type,
Class<?> classBeingRedefined,
AgentBuilder.RawMatcher ignoredTypeMatcher)
Considers a loaded class for modification.
|
protected abstract void |
doApply(Instrumentation instrumentation,
List<ClassDefinition> classDefinitions)
Applies a redefinition.
|
protected final AgentBuilder.Default.Transformation transformation
protected final List<AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Entry> entries
protected ForRedefinition(AgentBuilder.Default.Transformation transformation)
transformation
- The transformation of the built agent.public boolean consider(TypeDescription typeDescription, Class<?> type, Class<?> classBeingRedefined, AgentBuilder.RawMatcher ignoredTypeMatcher)
AgentBuilder.RedefinitionStrategy.Collector
consider
in interface AgentBuilder.RedefinitionStrategy.Collector
typeDescription
- The type description of the type that is to be considered.type
- The loaded representation of the type that is to be considered.classBeingRedefined
- The loaded representation of the type that is to be considered or null
if the
loaded type representation should not be considered.ignoredTypeMatcher
- Identifies types that should not be instrumented.true
if the class is considered to be redefined.public void apply(Instrumentation instrumentation, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Listener listener) throws UnmodifiableClassException, ClassNotFoundException
AgentBuilder.RedefinitionStrategy.Collector
apply
in interface AgentBuilder.RedefinitionStrategy.Collector
instrumentation
- The instrumentation instance to apply the transformation for.poolStrategy
- The type locator to use.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.protected abstract void doApply(Instrumentation instrumentation, List<ClassDefinition> classDefinitions) throws UnmodifiableClassException, ClassNotFoundException
instrumentation
- The instrumentation instance to use.classDefinitions
- The class definitions to apply.UnmodifiableClassException
- If a class is not modifiable.ClassNotFoundException
- If a class could not be found.Copyright © 2014–2016. All rights reserved.