Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForField.Write.Factory
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForField.Write.Factory
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.Factory
- Enclosing class:
MemberSubstitution.Substitution.Chain.Step.ForField.Write
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForField.Write.Factory
extends Object
implements MemberSubstitution.Substitution.Chain.Step.Factory
A factory for creating a step to write to a field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldDescription
A description of the field to write to.private final int
The index of the parameter being accessed. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a factory for writing to a field.Factory
(FieldDescription fieldDescription, int index) Creates a factory for writing to a field. -
Method Summary
Modifier and TypeMethodDescriptionmake
(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Creates a substitution step for an instrumented method.
-
Field Details
-
fieldDescription
A description of the field to write to. -
index
private final int indexThe index of the parameter being accessed. If the targeted element is a non-static method, is increased by one.
-
-
Constructor Details
-
Factory
Creates a factory for writing to a field.- Parameters:
field
- The field to write to.index
- The index of the parameter being accessed. If the targeted element is a non-static method, is increased by one.
-
Factory
Creates a factory for writing to a field.- Parameters:
fieldDescription
- A description of the field to write to.index
- The index of the parameter being accessed. If the targeted element is a non-static method, is increased by one.
-
-
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.
-