Package net.bytebuddy.asm
Interface MemberSubstitution.Substitution
-
- All Known Implementing Classes:
MemberSubstitution.Substitution.ForFieldAccess
,MemberSubstitution.Substitution.ForMethodInvocation
,MemberSubstitution.Substitution.Stubbing
- Enclosing class:
- MemberSubstitution
public static interface MemberSubstitution.Substitution
A substitution replaces or enhances an interaction with a field or method within an instrumented method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MemberSubstitution.Substitution.Factory
A factory for creating a substitution for an instrumented method.static class
MemberSubstitution.Substitution.ForFieldAccess
A substitution with a field access.static class
MemberSubstitution.Substitution.ForMethodInvocation
A substitution with a method invocation.static class
MemberSubstitution.Substitution.Stubbing
A substitution that drops any field or method access and returns the expected return type's default value, i.enull
or zero for primitive types.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulation
resolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic result)
Resolves this substitution into a stack manipulation.
-
-
-
Method Detail
-
resolve
StackManipulation resolve(TypeDescription targetType, ByteCodeElement target, TypeList.Generic parameters, TypeDescription.Generic result)
Resolves this substitution into a stack manipulation.- Parameters:
targetType
- The target type on which a member is accessed.target
- The target field, method or constructor that is substituted,parameters
- All parameters that serve as input to this access.result
- The result that is expected from the interaction orvoid
if no result is expected.- Returns:
- A stack manipulation that represents the access.
-
-