Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForInvocation.Factory
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForInvocation.Factory
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.Factory<MemberSubstitution.Target>
- Enclosing class:
- MemberSubstitution.Substitution.Chain.Step.ForInvocation
@Enhance public static class MemberSubstitution.Substitution.Chain.Step.ForInvocation.Factory extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step.Factory<MemberSubstitution.Target>
A factory to create a step for a method invocation.
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription
methodDescription
The invoked method or constructor.private java.util.Map<java.lang.Integer,java.lang.Integer>
substitutions
A mapping of substituted parameter indices.
-
Constructor Summary
Constructors Constructor Description Factory(java.lang.reflect.Constructor<?> constructor)
Creates a factory for a method invocation without parameter substitutions.Factory(java.lang.reflect.Constructor<?> constructor, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation without parameter substitutions.Factory(java.lang.reflect.Method method)
Creates a factory for a method invocation without parameter substitutions.Factory(java.lang.reflect.Method method, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation without parameter substitutions.Factory(MethodDescription methodDescription)
Creates a factory for a method invocation without parameter substitutions.Factory(MethodDescription methodDescription, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberSubstitution.Substitution.Chain.Step<MemberSubstitution.Target>
make(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Creates a substitution step for an instrumented method.
-
-
-
Field Detail
-
methodDescription
private final MethodDescription methodDescription
The invoked method or constructor.
-
substitutions
private final java.util.Map<java.lang.Integer,java.lang.Integer> substitutions
A mapping of substituted parameter indices. For targets that are non-static methods, the targeted index is increased by one.
-
-
Constructor Detail
-
Factory
public Factory(java.lang.reflect.Method method)
Creates a factory for a method invocation without parameter substitutions.- Parameters:
method
- The invoked method.
-
Factory
public Factory(java.lang.reflect.Method method, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation without parameter substitutions.- Parameters:
method
- The invoked method.substitutions
- A mapping of substituted parameter indices. For targets that are non-static methods, the targeted index is increased by one.
-
Factory
public Factory(java.lang.reflect.Constructor<?> constructor)
Creates a factory for a method invocation without parameter substitutions.- Parameters:
constructor
- The constructor.
-
Factory
public Factory(java.lang.reflect.Constructor<?> constructor, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation without parameter substitutions.- Parameters:
constructor
- The constructor.substitutions
- A mapping of substituted parameter indices. For targets that are non-static methods, the targeted index is increased by one.
-
Factory
public Factory(MethodDescription methodDescription)
Creates a factory for a method invocation without parameter substitutions.- Parameters:
methodDescription
- The invoked method or constructor.
-
Factory
public Factory(MethodDescription methodDescription, java.util.Map<java.lang.Integer,java.lang.Integer> substitutions)
Creates a factory for a method invocation.- Parameters:
methodDescription
- The invoked method or constructor.substitutions
- A mapping of substituted parameter indices. For targets that are non-static methods, the targeted index is increased by one.
-
-
Method Detail
-
make
public MemberSubstitution.Substitution.Chain.Step<MemberSubstitution.Target> make(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Creates a substitution step for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Substitution.Chain.Step.Factory<MemberSubstitution.Target>
- Parameters:
assigner
- The assigner to use.typing
- The typing to use.instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- The substitution step to apply.
-
-