Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.Transforming
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Matchable.AbstractBase<T>
-
- net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator<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
protected class AgentBuilder.Default.Transforming extends AgentBuilder.Default.Delegator<AgentBuilder.Identified.Narrowable> implements AgentBuilder.Identified.Extendable, AgentBuilder.Identified.Narrowable
A helper class that describes aAgentBuilder.Default
after supplying aAgentBuilder.RawMatcher
such that one or severalAgentBuilder.Transformer
s can be supplied.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder
AgentBuilder.CircularityLock, AgentBuilder.Default, AgentBuilder.DescriptionStrategy, AgentBuilder.FallbackStrategy, AgentBuilder.Identified, AgentBuilder.Ignored, AgentBuilder.InitializationStrategy, AgentBuilder.InstallationListener, AgentBuilder.LambdaInstrumentationStrategy, AgentBuilder.Listener, AgentBuilder.LocationStrategy, AgentBuilder.Matchable<T extends AgentBuilder.Matchable<T>>, AgentBuilder.PoolStrategy, AgentBuilder.RawMatcher, AgentBuilder.RedefinitionListenable, AgentBuilder.RedefinitionStrategy, AgentBuilder.Transformer, AgentBuilder.TypeStrategy
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Identified
AgentBuilder.Identified.Extendable, AgentBuilder.Identified.Narrowable
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Matchable
AgentBuilder.Matchable.AbstractBase<S extends AgentBuilder.Matchable<S>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Transforming(AgentBuilder.RawMatcher rawMatcher, AgentBuilder.Transformer transformer, boolean decorator)
Creates a new matched default agent builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AgentBuilder.Identified.Narrowable
and(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.AgentBuilder
asDecorator()
Applies the specified transformation as a decorative transformation.boolean
equals(java.lang.Object other)
int
hashCode()
protected AgentBuilder
materialize()
Materializes the currently describedAgentBuilder
.AgentBuilder.Identified.Narrowable
or(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if the previous matcher or the supplied matcher are matched.AgentBuilder.Identified.Extendable
transform(AgentBuilder.Transformer transformer)
Applies the given transformer for the already supplied matcher.-
Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Default.Delegator
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableBootstrapInjection, disableClassFormatChanges, disableNativeMethodPrefix, enableBootstrapInjection, enableNativeMethodPrefix, enableUnsafeBootstrapInjection, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, type, type, type, type, with, with, with, with, with, with, with, with, with, with, with, with
-
Methods inherited from class net.bytebuddy.agent.builder.AgentBuilder.Matchable.AbstractBase
and, and, and, or, or, or
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.agent.builder.AgentBuilder
assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeFromAndTo, assureReadEdgeTo, assureReadEdgeTo, assureReadEdgeTo, disableBootstrapInjection, disableClassFormatChanges, disableNativeMethodPrefix, enableBootstrapInjection, enableNativeMethodPrefix, enableUnsafeBootstrapInjection, ignore, ignore, ignore, ignore, installOn, installOnByteBuddyAgent, makeRaw, type, type, type, type, with, with, with, with, with, with, with, with, with, with, with, with
-
-
-
-
Constructor Detail
-
Transforming
protected Transforming(AgentBuilder.RawMatcher rawMatcher, AgentBuilder.Transformer transformer, boolean decorator)
Creates a new matched default agent builder.- Parameters:
rawMatcher
- The supplied raw matcher.transformer
- The supplied transformer.decorator
-true
if this transformer serves as a decorator.
-
-
Method Detail
-
materialize
protected AgentBuilder materialize()
Description copied from class:AgentBuilder.Default.Delegator
Materializes the currently describedAgentBuilder
.- Specified by:
materialize
in classAgentBuilder.Default.Delegator<AgentBuilder.Identified.Narrowable>
- Returns:
- An agent builder that represents the currently described entry of this instance.
-
transform
public AgentBuilder.Identified.Extendable transform(AgentBuilder.Transformer transformer)
Description copied from interface:AgentBuilder.Identified
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.
-
asDecorator
public AgentBuilder asDecorator()
Description copied from interface:AgentBuilder.Identified.Extendable
Applies the specified transformation as a decorative transformation. For a decorative transformation, the supplied transformer is prepended to any previous transformation that also matches the instrumented type, i.e. both transformations are supplied. This procedure is repeated until a transformer is reached that matches the instrumented type but is not defined as decorating after which no further transformations are considered. If all matching transformations are declared as decorating, all matching transformers are applied.
Note: A decorating transformer is applied after previously registered transformers.
- Specified by:
asDecorator
in interfaceAgentBuilder.Identified.Extendable
- Returns:
- A new instance of this agent builder with the specified transformation being applied as a decorator.
-
and
public AgentBuilder.Identified.Narrowable and(AgentBuilder.RawMatcher rawMatcher)
Description copied from interface:AgentBuilder.Matchable
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
public AgentBuilder.Identified.Narrowable or(AgentBuilder.RawMatcher rawMatcher)
Description copied from interface:AgentBuilder.Matchable
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.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-