Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.Transforming
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator.Matchable<AgentBuilder.Identified.Narrowable>
net.bytebuddy.agent.builder.AgentBuilder.Default.Transforming
- All Implemented Interfaces:
AgentBuilder
,AgentBuilder.Identified
,AgentBuilder.Identified.Extendable
,AgentBuilder.Identified.Narrowable
,AgentBuilder.Matchable<AgentBuilder.Identified.Narrowable>
- Enclosing class:
AgentBuilder.Default
@Enhance(includeSyntheticFields=true)
protected class AgentBuilder.Default.Transforming
extends AgentBuilder.Default.Delegator.Matchable<AgentBuilder.Identified.Narrowable>
implements AgentBuilder.Identified.Extendable, AgentBuilder.Identified.Narrowable
A helper class that describes a
AgentBuilder.Default
after supplying
a AgentBuilder.RawMatcher
such that one or several
AgentBuilder.Transformer
s can be supplied.-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
AgentBuilder.Default.Delegator.Matchable<S extends AgentBuilder.Matchable<S>>
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder
AgentBuilder.CircularityLock, AgentBuilder.ClassFileBufferStrategy, AgentBuilder.Default, AgentBuilder.DescriptionStrategy, AgentBuilder.FallbackStrategy, AgentBuilder.Identified, AgentBuilder.Ignored, AgentBuilder.InitializationStrategy, AgentBuilder.InjectionStrategy, AgentBuilder.InstallationListener, AgentBuilder.LambdaInstrumentationStrategy, AgentBuilder.Listener, AgentBuilder.LocationStrategy, AgentBuilder.Matchable<T extends AgentBuilder.Matchable<T>>, AgentBuilder.PatchMode, AgentBuilder.PoolStrategy, AgentBuilder.RawMatcher, AgentBuilder.RedefinitionListenable, AgentBuilder.RedefinitionStrategy, AgentBuilder.Transformer, AgentBuilder.TransformerDecorator, AgentBuilder.TypeStrategy
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Identified
AgentBuilder.Identified.Extendable, AgentBuilder.Identified.Narrowable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AgentBuilder.RawMatcher
The supplied raw matcher.private final boolean
true
if this transformer is a terminal transformation.private final List
<AgentBuilder.Transformer> The supplied transformer. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Transforming
(AgentBuilder.RawMatcher rawMatcher, List<AgentBuilder.Transformer> transformers, boolean terminal) Creates a new matched default agent builder. -
Method Summary
Modifier and TypeMethodDescriptionand
(AgentBuilder.RawMatcher rawMatcher) Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.Applies the previously defined transformation as terminal such that no subsequent transformers are applied even if their matchers would include the type that was matched for applying this transformer.protected AgentBuilder
Materializes the currently describedAgentBuilder
.or
(AgentBuilder.RawMatcher rawMatcher) Defines a matching that is positive if the previous matcher or the supplied matcher are matched.transform
(AgentBuilder.Transformer transformer) Applies the given transformer for the already supplied matcher.Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator.Matchable
and, and, and, or, or, or
Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableClassFormatChanges, disableNativeMethodPrefix, enableNativeMethodPrefix, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, patchOn, patchOn, patchOnByteBuddyAgent, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableClassFormatChanges, disableNativeMethodPrefix, enableNativeMethodPrefix, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, patchOn, patchOn, patchOnByteBuddyAgent, patchOnByteBuddyAgent, type, type, type, type, warmUp, warmUp, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with, with
-
Field Details
-
rawMatcher
The supplied raw matcher. -
transformers
The supplied transformer. -
terminal
private final boolean terminaltrue
if this transformer is a terminal transformation.
-
-
Constructor Details
-
Transforming
protected Transforming(AgentBuilder.RawMatcher rawMatcher, List<AgentBuilder.Transformer> transformers, boolean terminal) Creates a new matched default agent builder.- Parameters:
rawMatcher
- The supplied raw matcher.transformers
- The transformers to apply.terminal
-true
if this transformer is a terminal transformation.
-
-
Method Details
-
materialize
Description copied from class:AgentBuilder.Default.Delegator
Materializes the currently describedAgentBuilder
.- Specified by:
materialize
in classAgentBuilder.Default.Delegator
- Returns:
- An agent builder that represents the currently described entry of this instance.
-
transform
Applies the given transformer for the already supplied matcher.- Specified by:
transform
in interfaceAgentBuilder.Identified
- Parameters:
transformer
- The transformer to apply.- Returns:
- A new instance of this agent builder with the transformer being applied when the previously supplied matcher identified a type for instrumentation which also allows for the registration of subsequent transformers.
-
asTerminalTransformation
Applies the previously defined transformation as terminal such that no subsequent transformers are applied even if their matchers would include the type that was matched for applying this transformer. If this option is not set, subsequent transformations are applied after this transformation such that it is possible that they override non-additive type transformations.- Specified by:
asTerminalTransformation
in interfaceAgentBuilder.Identified.Extendable
- Returns:
- A new agent builder that applies the previously configured transformer terminally.
-
and
Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.- Specified by:
and
in interfaceAgentBuilder.Matchable<AgentBuilder.Identified.Narrowable>
- Parameters:
rawMatcher
- A raw matcher for the type being matched.- Returns:
- A chained matcher.
-
or
Defines a matching that is positive if the previous matcher or the supplied matcher are matched.- Specified by:
or
in interfaceAgentBuilder.Matchable<AgentBuilder.Identified.Narrowable>
- Parameters:
rawMatcher
- A raw matcher for the type being matched.- Returns:
- A chained matcher.
-