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
- Enclosing class:
MemberSubstitution.Substitution.Chain.Step.ForDelegation
@Enhance
protected static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.Factory
extends Object
implements MemberSubstitution.Substitution.Chain.Step.Factory
A factory for creating a delegating step during a member substitution.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShape
A description of the method or constructor to delegate to.The dispatcher to use for invoking the delegate.The offset mappings to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Factory
(MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher dispatcher, List<? extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<?>> factories) Creates a new factory for a delegating step. -
Method Summary
Modifier and TypeMethodDescriptionmake
(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Creates a substitution step for an instrumented method.
-
Field Details
-
delegate
A description of the method or constructor to delegate to. -
dispatcher
The dispatcher to use for invoking the delegate. -
offsetMappings
private final List<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping> offsetMappingsThe offset mappings to use.
-
-
Constructor Details
-
Factory
protected Factory(MethodDescription.InDefinedShape delegate, MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher dispatcher, 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 Details
-
make
public MemberSubstitution.Substitution.Chain.Step 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
- 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.
-