Package net.bytebuddy.asm
Interface Advice.Delegator
-
- All Known Implementing Classes:
Advice.Delegator.ForDynamicInvocation
,Advice.Delegator.ForRegularInvocation
- Enclosing class:
- Advice
protected static interface Advice.Delegator
Materializes an advice invocation within a delegation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Advice.Delegator.Factory
A factory for creating aAdvice.Delegator
.static class
Advice.Delegator.ForDynamicInvocation
Invokes an advice method using a dynamic method call.static class
Advice.Delegator.ForRegularInvocation
Invokes an advice method using a regular method call.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulation
apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Materializes an invocation.void
assertVisibility(TypeDescription instrumentedType)
Asserts the visibility of the delegation target.MethodDescription.TypeToken
getTypeToken()
Returns the advice method's type token.
-
-
-
Method Detail
-
apply
StackManipulation apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Materializes an invocation.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- An appropriate stack manipulation which needs to consume all arguments for the advice method and needs to provide a compatible return type.
-
getTypeToken
MethodDescription.TypeToken getTypeToken()
Returns the advice method's type token.- Returns:
- The advice method's type token.
-
assertVisibility
void assertVisibility(TypeDescription instrumentedType)
Asserts the visibility of the delegation target.- Parameters:
instrumentedType
- The instrumented type.
-
-