/** * Performs the method interception of the before advice at the specified joint point. * * @param aJoinPoint The joint point to intercept. * @throws Throwable If an error occurs berforming the method invocation. */ protected void performBeforeInterception(JoinPoint aJoinPoint) throws Throwable { if (log.isTraceEnabled()) log.trace("#### Invoking a method decorated with a Shiro annotation" + "\n\tkind : " + aJoinPoint.getKind() + "\n\tjoinPoint : " + aJoinPoint + "\n\tannotations: " + Arrays.toString(((MethodSignature) aJoinPoint.getSignature()).getMethod().getAnnotations()) + "\n\ttarget : " + aJoinPoint.getTarget() ); // 1. Adapt the join point into a method invocation BeforeAdviceMethodInvocationAdapter mi = BeforeAdviceMethodInvocationAdapter.createFrom(aJoinPoint); // 2. Delegate the authorization of the method call to the super class super.invoke(mi); } }
@Override public String getKind() { return this.joinpoint.getKind(); }
@Override public String getKind() { return this.joinpoint.getKind(); }
private boolean isNotExecutionJoinPoint(JoinPoint joinPoint) { return !"method-execution".equalsIgnoreCase(joinPoint.getKind()); } }
/** * Performs the method interception of the before advice at the specified joint point. * * @param aJoinPoint The joint point to intercept. * @throws Throwable If an error occurs berforming the method invocation. */ protected void performBeforeInterception(JoinPoint aJoinPoint) throws Throwable { if (log.isTraceEnabled()) log.trace("#### Invoking a method decorated with a Shiro annotation" + "\n\tkind : " + aJoinPoint.getKind() + "\n\tjoinPoint : " + aJoinPoint + "\n\tannotations: " + Arrays.toString(((MethodSignature) aJoinPoint.getSignature()).getMethod().getAnnotations()) + "\n\ttarget : " + aJoinPoint.getTarget() ); // 1. Adapt the join point into a method invocation BeforeAdviceMethodInvocationAdapter mi = BeforeAdviceMethodInvocationAdapter.createFrom(aJoinPoint); // 2. Delegate the authorization of the method call to the super class super.invoke(mi); } }
if (joinPoint.getKind().equals(JoinPoint.METHOD_EXECUTION) && joinPoint.getSignature() instanceof MethodSignature) { return ((MethodSignature) joinPoint.getSignature()).getMethod();