protected static class AgentBuilder.Default.Transformation extends Object implements AgentBuilder.RawMatcher, AgentBuilder.Transformer
AgentBuilder.RawMatcher
and a
AgentBuilder.Transformer
.AgentBuilder.RawMatcher.ForElementMatcherPair
AgentBuilder.Transformer.Compound, AgentBuilder.Transformer.NoOp
Modifier | Constructor and Description |
---|---|
protected |
Transformation(AgentBuilder.RawMatcher rawMatcher,
AgentBuilder.Transformer transformer)
Creates a new transformation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
boolean |
matches(TypeDescription typeDescription,
ClassLoader classLoader,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain)
Decides if the given
typeDescription should be instrumented with the entailed
AgentBuilder.Transformer s. |
String |
toString() |
DynamicType.Builder<?> |
transform(DynamicType.Builder<?> builder,
TypeDescription typeDescription)
Allows for a transformation of a
DynamicType.Builder . |
protected Transformation(AgentBuilder.RawMatcher rawMatcher, AgentBuilder.Transformer transformer)
rawMatcher
- The raw matcher that is represented by this transformation.transformer
- The transformer that is represented by this transformation.public boolean matches(TypeDescription typeDescription, ClassLoader classLoader, Class<?> classBeingRedefined, ProtectionDomain protectionDomain)
AgentBuilder.RawMatcher
typeDescription
should be instrumented with the entailed
AgentBuilder.Transformer
s.matches
in interface AgentBuilder.RawMatcher
typeDescription
- A description of the type to be instrumented.classLoader
- The class loader of the instrumented type. Might be null
if this class
loader represents the bootstrap class loader.classBeingRedefined
- The class being redefined which is only not null
if a retransofmration
is applied.protectionDomain
- The protection domain of the type being transformed.true
if the entailed AgentBuilder.Transformer
s should
be applied for the given typeDescription
.public DynamicType.Builder<?> transform(DynamicType.Builder<?> builder, TypeDescription typeDescription)
AgentBuilder.Transformer
DynamicType.Builder
.transform
in interface AgentBuilder.Transformer
builder
- The dynamic builder to transform.typeDescription
- The description of the type currently being instrumented.builder
.Copyright © 2014–2015. All rights reserved.