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.ResolverA resolver supplies an implementation for a substitution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMemberSubstitution.Substitution.Resolver.FieldAccessingA resolver that replaces an interaction with a byte code element with a field access.static classMemberSubstitution.Substitution.Resolver.MethodInvokingA resolver that invokes a method.static classMemberSubstitution.Substitution.Resolver.StubbingA resolver that stubs any interaction with a byte code element.static classMemberSubstitution.Substitution.Resolver.UnresolvedAn unresolved resolver that does not apply a substitution.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulationapply(TypeDescription instrumentedType, ByteCodeElement target, TypeList.Generic arguments, TypeDescription.Generic result)Applies this resolver.booleanisResolved()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:
trueif 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 orvoidif no result is expected.- Returns:
- A stack manipulation that applies the resolved byte code representing the substitution.
-
-