Package net.bytebuddy.asm
Interface MemberSubstitution.Substitution.Resolver
-
- All Known Implementing Classes:
MemberSubstitution.Substitution.Resolver.FieldAccessing
,MemberSubstitution.Substitution.Resolver.MethodInvoking
,MemberSubstitution.Substitution.Resolver.Stubbing
,MemberSubstitution.Substitution.Resolver.Unresolved
- Enclosing interface:
- MemberSubstitution.Substitution
public static interface MemberSubstitution.Substitution.Resolver
A resolver supplies an implementation for a substitution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
MemberSubstitution.Substitution.Resolver.FieldAccessing
A resolver that replaces an interaction with a byte code element with a field access.static class
MemberSubstitution.Substitution.Resolver.MethodInvoking
A resolver that invokes a method.static class
MemberSubstitution.Substitution.Resolver.Stubbing
A resolver that stubs any interaction with a byte code element.static class
MemberSubstitution.Substitution.Resolver.Unresolved
An unresolved resolver that does not apply a substitution.
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
isResolved
boolean isResolved()
Checks if this resolver was actually resolved, i.e. if a member should be substituted at all.- Returns:
true
if a found member should be substituted.
-
apply
StackManipulation apply(TypeDescription instrumentedType, ByteCodeElement target, TypeList.Generic arguments, TypeDescription.Generic result)
Applies this resolver. This is only legal for resolved resolvers.- 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.
-
-