Package net.bytebuddy.asm
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 java.lang.Object implements MemberSubstitution.Substitution.Factory<U>
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<? super U>>
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<? super U>> 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<U>
executing(java.util.List<? extends MemberSubstitution.Substitution.Chain.Step.Factory<? super U>> steps)
Appends the supplied steps to the substitution chain.MemberSubstitution.Substitution.Chain.Factory<U>
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 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<? super U extends MemberSubstitution.Target>> steps
The substitution steps to apply.
-
-
Constructor Detail
-
Factory
protected Factory(Assigner assigner, Assigner.Typing typing, java.util.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 Detail
-
make
public MemberSubstitution.Substitution<? super U> make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a substitution for an instrumented method.- Specified by:
make
in 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(java.util.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.
-
-