Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.ForFieldAccess.OfGivenField
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.ForFieldAccess.OfGivenField
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Factory
- Enclosing class:
- MemberSubstitution.Substitution.ForFieldAccess
@Enhance public static class MemberSubstitution.Substitution.ForFieldAccess.OfGivenField extends java.lang.Object implements MemberSubstitution.Substitution.Factory
A factory for a substitution that substitutes with a given field.
-
-
Field Summary
Fields Modifier and Type Field Description private FieldDescription
fieldDescription
The field to substitute with.
-
Constructor Summary
Constructors Constructor Description OfGivenField(FieldDescription fieldDescription)
Creates a new factory that substitues with a given field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberSubstitution.Substitution
make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a substitution for an instrumented method.
-
-
-
Field Detail
-
fieldDescription
private final FieldDescription fieldDescription
The field to substitute with.
-
-
Constructor Detail
-
OfGivenField
public OfGivenField(FieldDescription fieldDescription)
Creates a new factory that substitues with a given field.- Parameters:
fieldDescription
- The field to substitute with.
-
-
Method Detail
-
make
public MemberSubstitution.Substitution make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, TypePool typePool)
Creates a substitution for an instrumented method.- Specified by:
make
in interfaceMemberSubstitution.Substitution.Factory
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.typePool
- The type pool being used.- Returns:
- The substitution to apply within the instrumented method.
-
-