I have two annotation @LookAtThisMethod
and @LookAtThisParameter
, if I have a pointcut around the methods with @LookAtThisMethod
how c
final String methodName = joinPoint.getSignature().getName();
final MethodSignature methodSignature = (MethodSignature) joinPoint
.getSignature();
Method method = methodSignature.getMethod();
GuiAudit annotation = null;
if (method.getDeclaringClass().isInterface()) {
method = joinPoint.getTarget().getClass()
.getDeclaredMethod(methodName, method.getParameterTypes());
annotation = method.getAnnotation(GuiAudit.class);
}
This code covers the case where the Method belongs to the interface