Package com.ultikits.ultitools.aop
Interface MethodInvocation
- All Known Implementing Classes:
ReflectiveMethodInvocation
public interface MethodInvocation
Represents a method invocation that can be intercepted.
This interface provides access to the target object, method, and arguments, and allows the invocation to proceed through the interceptor chain.
- Since:
- 6.2.0
- Author:
- wisdomme
-
Method Details
-
getTarget
Object getTarget()Gets the target object being invoked.- Returns:
- the target object
-
getMethod
Method getMethod()Gets the method being invoked.- Returns:
- the method
-
getArguments
Object[] getArguments()Gets the arguments passed to the method.- Returns:
- the method arguments, or an empty array if no arguments
-
proceed
Proceeds with the next interceptor in the chain or invokes the target method if this is the last interceptor.- Returns:
- the result of the invocation
- Throws:
Throwable- if the invocation throws an exception
-