Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Resolver.FieldAccessing
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Resolver.FieldAccessing
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Resolver
- Enclosing interface:
- MemberSubstitution.Substitution.Resolver
public static class MemberSubstitution.Substitution.Resolver.FieldAccessing extends java.lang.Object implements MemberSubstitution.Substitution.Resolver
A resolver that replaces an interaction with a byte code element with a field access.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Resolver
MemberSubstitution.Substitution.Resolver.FieldAccessing, MemberSubstitution.Substitution.Resolver.MethodInvoking, MemberSubstitution.Substitution.Resolver.Stubbing, MemberSubstitution.Substitution.Resolver.Unresolved
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldAccessing(FieldDescription fieldDescription)
Creates a resolver for a field access.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
apply(TypeDescription instrumentedType, ByteCodeElement target, TypeList.Generic arguments, TypeDescription.Generic result)
Applies this resolver.boolean
isResolved()
Checks if this resolver was actually resolved, i.e.
-
-
-
Constructor Detail
-
FieldAccessing
protected FieldAccessing(FieldDescription fieldDescription)
Creates a resolver for a field access.- Parameters:
fieldDescription
- The field that is used for substitution.
-
-
Method Detail
-
isResolved
public boolean isResolved()
Description copied from interface:MemberSubstitution.Substitution.Resolver
Checks if this resolver was actually resolved, i.e. if a member should be substituted at all.- Specified by:
isResolved
in interfaceMemberSubstitution.Substitution.Resolver
- Returns:
true
if a found member should be substituted.
-
apply
public StackManipulation apply(TypeDescription instrumentedType, ByteCodeElement target, TypeList.Generic arguments, TypeDescription.Generic result)
Description copied from interface:MemberSubstitution.Substitution.Resolver
Applies this resolver. This is only legal for resolved resolvers.- Specified by:
apply
in interfaceMemberSubstitution.Substitution.Resolver
- Parameters:
instrumentedType
- The instrumented type.target
- The substituted byte code element.arguments
- The factual arguments to the byte code element.result
- The expected result type orvoid
if no result is expected.- Returns:
- A stack manipulation that applies the resolved byte code representing the substitution.
-
-