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 java.lang.Object implements MemberSubstitution.Substitution.Factory
A factory for creating a substitution chain.
-
-
Field Summary
Fields Modifier and Type Field Description private Assigner
assigner
The assigner to use.private java.util.List<MemberSubstitution.Substitution.Chain.Step.Factory>
steps
The substitution steps to apply.private Assigner.Typing
typing
The typing of the assignment to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Factory(Assigner assigner, Assigner.Typing typing, java.util.List<MemberSubstitution.Substitution.Chain.Step.Factory> steps)
Creates a new factory for a substitution chain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberSubstitution.Substitution.Chain.Factory
executing(java.util.List<? extends MemberSubstitution.Substitution.Chain.Step.Factory> steps)
Appends the supplied steps to the substitution chain.MemberSubstitution.Substitution.Chain.Factory
executing(MemberSubstitution.Substitution.Chain.Step.Factory... step)
Appends the supplied steps to the substitution chain.MemberSubstitution.Substitution
make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a substitution for an instrumented method.
-
-
-
Field Detail
-
assigner
private final Assigner assigner
The assigner to use.
-
typing
private final Assigner.Typing typing
The typing of the assignment to use.
-
steps
private final java.util.List<MemberSubstitution.Substitution.Chain.Step.Factory> steps
The substitution steps to apply.
-
-
Constructor Detail
-
Factory
protected Factory(Assigner assigner, Assigner.Typing typing, java.util.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 Detail
-
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(java.util.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.
-
-