Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForField
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForField
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step<MemberSubstitution.Target>
- Direct Known Subclasses:
MemberSubstitution.Substitution.Chain.Step.ForField.Read
,MemberSubstitution.Substitution.Chain.Step.ForField.Write
- Enclosing interface:
- MemberSubstitution.Substitution.Chain.Step<U extends MemberSubstitution.Target>
@Enhance public abstract static class MemberSubstitution.Substitution.Chain.Step.ForField extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step<MemberSubstitution.Target>
Creates a step for a field access.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemberSubstitution.Substitution.Chain.Step.ForField.Read
A step for reading a field.static class
MemberSubstitution.Substitution.Chain.Step.ForField.Write
A step for writing to a field.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step
MemberSubstitution.Substitution.Chain.Step.Factory<V extends MemberSubstitution.Target>, MemberSubstitution.Substitution.Chain.Step.ForArgumentLoading, MemberSubstitution.Substitution.Chain.Step.ForArgumentSubstitution, MemberSubstitution.Substitution.Chain.Step.ForAssignment, MemberSubstitution.Substitution.Chain.Step.ForDelegation, MemberSubstitution.Substitution.Chain.Step.ForField, MemberSubstitution.Substitution.Chain.Step.ForInvocation, MemberSubstitution.Substitution.Chain.Step.OfOriginalExpression, MemberSubstitution.Substitution.Chain.Step.Resolution, MemberSubstitution.Substitution.Chain.Step.Simple
-
-
Field Summary
Fields Modifier and Type Field Description protected Assigner
assigner
The assigner to use.protected FieldDescription
fieldDescription
The field description accessed in this step.protected Assigner.Typing
typing
The typing to use when assigning.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForField(FieldDescription fieldDescription, Assigner assigner, Assigner.Typing typing)
Creates a new step for a field access.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract MemberSubstitution.Substitution.Chain.Step.Resolution
doResolve(MemberSubstitution.Target target, TypeList.Generic parameters, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, StackManipulation stackManipulation)
Completes the resolution.MemberSubstitution.Substitution.Chain.Step.Resolution
resolve(MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, TypeDescription.Generic current, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, int freeOffset)
Resolves this step of a substitution chain.
-
-
-
Field Detail
-
fieldDescription
protected final FieldDescription fieldDescription
The field description accessed in this step.
-
assigner
protected final Assigner assigner
The assigner to use.
-
typing
protected final Assigner.Typing typing
The typing to use when assigning.
-
-
Constructor Detail
-
ForField
protected ForField(FieldDescription fieldDescription, Assigner assigner, Assigner.Typing typing)
Creates a new step for a field access.- Parameters:
fieldDescription
- The field description accessed in this step.assigner
- The assigner to use.typing
- The typing to use when assigning.
-
-
Method Detail
-
resolve
public MemberSubstitution.Substitution.Chain.Step.Resolution resolve(MemberSubstitution.Target target, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, TypeDescription.Generic current, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, int freeOffset)
Resolves this step of a substitution chain.- Specified by:
resolve
in interfaceMemberSubstitution.Substitution.Chain.Step<MemberSubstitution.Target>
- Parameters:
target
- The target member of invokedynamic invocation.parameters
- The parameters of the substituted element.result
- The resulting type of the substituted element.methodHandle
- A method handle of the stackManipulation invocation that is being substituted.stackManipulation
- The byte code instruction that is being substituted.current
- The current type of the applied substitution that is the top element on the operand stack.offsets
- The arguments of the substituted byte code element mapped to their local variable offsets.freeOffset
- The first free offset in the local variable array.- Returns:
- A resolved substitution step for the supplied inputs.
-
doResolve
protected abstract MemberSubstitution.Substitution.Chain.Step.Resolution doResolve(MemberSubstitution.Target target, TypeList.Generic parameters, java.util.Map<java.lang.Integer,java.lang.Integer> offsets, StackManipulation stackManipulation)
Completes the resolution.- Parameters:
target
- The target member of invokedynamic invocation.parameters
- The parameters of the substituted element.offsets
- The arguments of the substituted byte code element mapped to their local variable offsets.stackManipulation
- A stack manipulation to prepare the field access.- Returns:
- A resolved substitution step for the supplied inputs.
-
-