contextprovider/aspectj/src/main/java/io/tracee/contextlogger/contextprovider/aspectj/util/WatchdogUtils.java
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) {

        // 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