Class MemberSubstitution.Replacement.Binding.ForMember
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Replacement.Binding.ForMember
- All Implemented Interfaces:
MemberSubstitution.Replacement.Binding
- Enclosing interface:
MemberSubstitution.Replacement.Binding
@Enhance
public static class MemberSubstitution.Replacement.Binding.ForMember
extends Object
implements MemberSubstitution.Replacement.Binding
A binding that was resolved for a field or method expression.
-
Nested Class Summary
Nested classes/interfaces inherited from interface MemberSubstitution.Replacement.Binding
MemberSubstitution.Replacement.Binding.ForDynamicInvocation, MemberSubstitution.Replacement.Binding.ForMember, MemberSubstitution.Replacement.Binding.Unresolved -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ByteCodeElement.MemberThe field or method that was accessed.private final TypeDescriptionThe type on which a field or method was accessed.private final MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForMember> The substitution to apply. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForMember(TypeDescription receiver, ByteCodeElement.Member member, MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForMember> substitution) Creates a new resolved binding. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisBound()Returnstrueif this binding is resolved.make(TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset) Creates a stack manipulation that represents the substitution.
-
Field Details
-
receiver
The type on which a field or method was accessed. -
member
The field or method that was accessed. -
substitution
private final MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForMember> substitutionThe substitution to apply.
-
-
Constructor Details
-
ForMember
protected ForMember(TypeDescription receiver, ByteCodeElement.Member member, MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForMember> substitution) Creates a new resolved binding.- Parameters:
receiver- The type on which a field or method was accessed.member- The field or method that was accessed.substitution- The substitution to apply.
-
-
Method Details
-
isBound
public boolean isBound()Returnstrueif this binding is resolved.- Specified by:
isBoundin interfaceMemberSubstitution.Replacement.Binding- Returns:
trueif this binding is resolved.
-
make
public StackManipulation make(TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset) Creates a stack manipulation that represents the substitution. This method can only be called for actually bound bindings.- Specified by:
makein interfaceMemberSubstitution.Replacement.Binding- Parameters:
parameters- The parameters that are accessible to the substitution target.result- The result that is expected from the substitution target orvoidif none is expected.methodHandle- A method handle that represents the original expression that is being substituted.stackManipulation- The original byte code expression that is being substituted.freeOffset- The first offset that can be used for storing local variables.- Returns:
- A stack manipulation that represents the replacement.
-