Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Factory
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.Factory
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.Factory<MemberSubstitution.Target>
- Enclosing class:
- MemberSubstitution.Substitution.Chain.Step.ForDelegation
@Enhance protected static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Factory extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step.Factory<MemberSubstitution.Target>
A factory for creating a delegating step during a member substitution.
-
-
Field Summary
Fields Modifier and Type Field Description private MethodDescription.InDefinedShape
delegate
A description of the method or constructor to delegate to.private MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher
dispatcher
The dispatcher to use for invoking the delegate.private java.util.List<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping>
offsetMappings
The offset mappings to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Factory(MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher dispatcher, java.util.List<? extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<?>> factories)
Creates a new factory for a delegating step.
-
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
-
delegate
private final MethodDescription.InDefinedShape delegate
A description of the method or constructor to delegate to.
-
dispatcher
private final MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher dispatcher
The dispatcher to use for invoking the delegate.
-
offsetMappings
private final java.util.List<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping> offsetMappings
The offset mappings to use.
-
-
Constructor Detail
-
Factory
protected Factory(MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher dispatcher, java.util.List<? extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<?>> factories)
Creates a new factory for a delegating step.- Parameters:
delegate
- A description of the method or constructor to delegate to.dispatcher
- The dispatcher to use for invoking the delegate.factories
- The dispatcher to use for invoking the delegate.
-
-
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.
-
-