Package org.apache.shiro.aspectj
Class BeforeAdviceMethodInvocationAdapter
- java.lang.Object
-
- org.apache.shiro.aspectj.BeforeAdviceMethodInvocationAdapter
-
- All Implemented Interfaces:
org.apache.shiro.aop.MethodInvocation
public class BeforeAdviceMethodInvocationAdapter extends Object implements org.apache.shiro.aop.MethodInvocation
Helper class that adapts an AspectJJoinPoint
.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description BeforeAdviceMethodInvocationAdapter(Object anObject, Method aMethod, Object[] someArguments)
Creates a newBeforeAdviceMethodInvocationAdapter
instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BeforeAdviceMethodInvocationAdapter
createFrom(org.aspectj.lang.JoinPoint aJoinPoint)
Factory method that creates a newBeforeAdviceMethodInvocationAdapter
instance using the AspectJJoinPoint
provided.Object[]
getArguments()
Method
getMethod()
Object
getThis()
Object
proceed()
-
-
-
Constructor Detail
-
BeforeAdviceMethodInvocationAdapter
public BeforeAdviceMethodInvocationAdapter(Object anObject, Method aMethod, Object[] someArguments)
Creates a newBeforeAdviceMethodInvocationAdapter
instance.- Parameters:
aMethod
- The method to invoke.someArguments
- The arguments of the method invocation.
-
-
Method Detail
-
createFrom
public static BeforeAdviceMethodInvocationAdapter createFrom(org.aspectj.lang.JoinPoint aJoinPoint)
Factory method that creates a newBeforeAdviceMethodInvocationAdapter
instance using the AspectJJoinPoint
provided. If the joint point passed in is not a method joint point, this method throws anIllegalArgumentException
.- Parameters:
aJoinPoint
- The AspectJJoinPoint
to use to adapt the advice.- Returns:
- The created instance.
- Throws:
IllegalArgumentException
- If the join point passed in does not involve a method call.
-
getArguments
public Object[] getArguments()
- Specified by:
getArguments
in interfaceorg.apache.shiro.aop.MethodInvocation
-
getMethod
public Method getMethod()
- Specified by:
getMethod
in interfaceorg.apache.shiro.aop.MethodInvocation
-
proceed
public Object proceed() throws Throwable
- Specified by:
proceed
in interfaceorg.apache.shiro.aop.MethodInvocation
- Throws:
Throwable
-
-