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.Defaultafter supplying aAgentBuilder.RawMatchersuch that one or severalAgentBuilder.Transformers 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 protectedTransforming(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.Narrowableand(AgentBuilder.RawMatcher rawMatcher)Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.AgentBuilderasDecorator()Applies the specified transformation as a decorative transformation.booleanequals(java.lang.Object other)inthashCode()protected AgentBuildermaterialize()Materializes the currently describedAgentBuilder.AgentBuilder.Identified.Narrowableor(AgentBuilder.RawMatcher rawMatcher)Defines a matching that is positive if the previous matcher or the supplied matcher are matched.AgentBuilder.Identified.Extendabletransform(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-trueif this transformer serves as a decorator.
-
-
Method Detail
-
materialize
protected AgentBuilder materialize()
Description copied from class:AgentBuilder.Default.DelegatorMaterializes the currently describedAgentBuilder.- Specified by:
materializein 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.IdentifiedApplies the given transformer for the already supplied matcher.- Specified by:
transformin 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.ExtendableApplies 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:
asDecoratorin 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.MatchableDefines a matching that is positive if both the previous matcher and the supplied matcher are matched.- Specified by:
andin 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.MatchableDefines a matching that is positive if the previous matcher or the supplied matcher are matched.- Specified by:
orin 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-