public static ErrorMessage getErrorMessageAnnotation(final ProceedingJoinPoint proceedingJoinPoint) {

        // get watchdog annotation from method
        MethodSignature methodSignature = (MethodSignature)proceedingJoinPoint.getSignature();
        ErrorMessage methodAnnotation = methodSignature.getMethod().getAnnotation(ErrorMessage.class);

        if (methodAnnotation != null) {
            return methodAnnotation;
        }
        else {
            return null;
        }

    }
public static ErrorMessage getErrorMessageAnnotation(final ProceedingJoinPoint proceedingJoinPoint) {

        
        MethodSignature methodSignature = (MethodSignature)proceedingJoinPoint.getSignature();
        ErrorMessage methodAnnotation = methodSignature.getMethod().getAnnotation(ErrorMessage.class);

        if (methodAnnotation != null) {
            return methodAnnotation;
        }
        else {
            return null;
        }

    }
public static ErrorMessage getErrorMessageAnnotation ( final ProceedingJoinPoint proceedingJoinPoint ) { // get watchdog annotation from method MethodSignature methodSignature = ( MethodSignature ) proceedingJoinPoint . getSignature ( ) ; ErrorMessage methodAnnotation = methodSignature . getMethod ( ) . getAnnotation ( ErrorMessage . class ) ; if ( methodAnnotation != null ) { return methodAnnotation ; } else { return null ; } }
Tries to get the watchdog annotation for the called method or the methods class.

@param proceedingJoinPoint The aspectj join point
@return The watchdog annotation of the method, the class or null if neither the method or class aren't annotated with the watchdog annotation
Tries to get the watchdog annotation for the called method or the methods class .