Class MemberSubstitution.Substitution.Chain.Factory<U extends MemberSubstitution.Target>
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Factory<U>
- Type Parameters:
U- The type of the matched target.
- All Implemented Interfaces:
MemberSubstitution.Substitution.Factory<U>
- Enclosing class:
MemberSubstitution.Substitution.Chain<S extends MemberSubstitution.Target>
@Enhance
public static class MemberSubstitution.Substitution.Chain.Factory<U extends MemberSubstitution.Target>
extends Object
implements MemberSubstitution.Substitution.Factory<U>
A factory for creating a substitution chain.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AssignerThe assigner to use.private final List<MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> The substitution steps to apply.private final Assigner.TypingThe typing of the assignment to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFactory(Assigner assigner, Assigner.Typing typing, List<MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> steps) Creates a new factory for a substitution chain. -
Method Summary
Modifier and TypeMethodDescriptionexecuting(List<? extends MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> steps) Appends the supplied steps to the substitution chain.executing(MemberSubstitution.Substitution.Chain.Step.Factory<? super U>... step) Appends the supplied steps to the substitution chain.MemberSubstitution.Substitution<? super U> 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
private final List<MemberSubstitution.Substitution.Chain.Step.Factory<? super U extends MemberSubstitution.Target>> stepsThe substitution steps to apply.
-
-
Constructor Details
-
Factory
protected Factory(Assigner assigner, Assigner.Typing typing, List<MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> 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<? super U> make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool) Creates a substitution for an instrumented method.- Specified by:
makein interfaceMemberSubstitution.Substitution.Factory<U extends MemberSubstitution.Target>- 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
@Enhance public final MemberSubstitution.Substitution.Chain.Factory<U> executing(MemberSubstitution.Substitution.Chain.Step.Factory<? super U>... 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<U> executing(List<? extends MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> 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.
-