static void checkTransitionAnnotations(StateMachineDefinitionImpl definition, Object instance)
            throws StateMachineDefinitionException {
        // Let's process the transitions
        Class<?> clazz = instance.getClass();
        for (Method method : clazz.getMethods()) {
            if (method.isAnnotationPresent(Transitions.class)) {
                Transitions transitions = method.getAnnotation(Transitions.class);
                for (Transition transition : transitions.value())
                    checkTransitionAnnotation(instance, definition, method, transition);
            } else if (method.isAnnotationPresent(Transition.class)) {
                checkTransitionAnnotation(instance, definition, method, method.getAnnotation(Transition.class));
            } else if (method.isAnnotationPresent(EnterState.class)) {
                checkEnterStateAnnotation(instance, definition, method, method.getAnnotation(EnterState.class));
            } else if (method.isAnnotationPresent(ExitState.class)) {
                checkExitStateAnnotation(instance, definition, method, method.getAnnotation(ExitState.class));
            }
        }
    }