@SuppressWarnings(
    {"unchecked", "rawtypes"})
    private void validateMethod(final Object instance, final Method method,
                                final boolean useStrictMode, final ValidationResults results)
    {
        /*
         * Validate all method annotations.
         */
        final Annotation[] annotations = method.getDeclaredAnnotations();

        boolean wasValidated = false;

        if(annotations != null)
        {
            /*
             * Run through all of the method's annotations and find validation
             * annotations.
             */
            for (final Annotation annotation : annotations)
            {
                final Validator validator = this.validatorFactory
                .createValidator(annotation);

                try
                {
                    /*
                     * If the factory did not return null, then the annotation
                     * was a validation annotation.
                     */
                    if(validator != null)
                    {
                        final Object value = ReflectionUtils.getValueOfMethod(
                        method, instance);

                        final ValidationProblem problem = validator.validate(
                        instance, annotation, method, value);

                        if(problem != null)
                        {
                            results.addProblem(problem);
                        }

                        wasValidated = true;
                    }
                } catch (final ValidationException t)
                {
                    throw t;
                } catch (final Throwable t)
                {
                    throw new ValidationException(t);
                }
            }
        }

        if(wasValidated)
        {
            results.setValidated(true);
        } else if(useStrictMode)
        {
            final Object novalidation = method
            .getAnnotation(NoValidation.class);

            if(novalidation == null)
            {
                throw new ValidationException(
                "STRICT MODE IS ON, but method \"" + method
                + "\" did not have a validation annotation.");
            }
        }
    }