Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Factory
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Factory
- All Implemented Interfaces:
MemberSubstitution.Substitution.Factory
- Enclosing class:
- MemberSubstitution.Substitution.Chain
public static class MemberSubstitution.Substitution.Chain.Factory
extends Object
implements MemberSubstitution.Substitution.Factory
A factory for creating a substitution chain.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Assigner
The assigner to use.private final List<MemberSubstitution.Substitution.Chain.Step.Factory>
The substitution steps to apply.private final Assigner.Typing
The typing of the assignment to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Factory
(Assigner assigner, Assigner.Typing typing, List<MemberSubstitution.Substitution.Chain.Step.Factory> steps) Creates a new factory for a substitution chain. -
Method Summary
Modifier and TypeMethodDescriptionexecuting
(List<? extends MemberSubstitution.Substitution.Chain.Step.Factory> steps) Appends the supplied steps to the substitution chain.Appends the supplied steps to the substitution chain.make
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a substitution for an instrumented method.
-
Field Details
-
assigner
The assigner to use. -
typing
The typing of the assignment to use. -
steps
The substitution steps to apply.
-
-
Constructor Details
-
Factory
protected Factory(Assigner assigner, Assigner.Typing typing, List<MemberSubstitution.Substitution.Chain.Step.Factory> steps) Creates a new factory for a substitution chain.- Parameters:
assigner
- The assigner to use.typing
- The typing of the assignment to use.steps
- The substitution steps to apply.
-
-
Method Details
-
make
public MemberSubstitution.Substitution make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a substitution for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Substitution.Factory
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typePool
- The type pool being used.- Returns:
- The substitution to apply within the instrumented method.
-
executing
public MemberSubstitution.Substitution.Chain.Factory executing(MemberSubstitution.Substitution.Chain.Step.Factory... step) Appends the supplied steps to the substitution chain.- Parameters:
step
- The steps to append.- Returns:
- A new substitution chain that is equal to this substitution chain but with the supplied steps appended.
-
executing
public MemberSubstitution.Substitution.Chain.Factory executing(List<? extends MemberSubstitution.Substitution.Chain.Step.Factory> steps) Appends the supplied steps to the substitution chain.- Parameters:
steps
- The steps to append.- Returns:
- A new substitution chain that is equal to this substitution chain but with the supplied steps appended.
-