Package net.sourceforge.annovalidator.validation.exception

Examples of net.sourceforge.annovalidator.validation.exception.ValidatorAnnotationException


            Annotation annotation, String parameterName) {
        try {
            return annotation.annotationType().getDeclaredMethod(parameterName,
                    new Class[] {});
        } catch (SecurityException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        } catch (NoSuchMethodException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        }
    }
View Full Code Here


            Method parameter =
                determineAnnotationParameterMethod(annotation, parameterName);
            parameter.setAccessible(true);
            return parameter.invoke(annotation, new Object[] {});
        } catch (IllegalArgumentException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        } catch (IllegalAccessException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        } catch (InvocationTargetException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        }
    }
View Full Code Here

            Annotation annotation, String parameterName) {
        try {
            return determineAnnotationParameterMethod(annotation, parameterName)
                    .getReturnType();
        } catch (SecurityException e) {
            throw new ValidatorAnnotationException(
                    Cause.BAD_PARAMETER, annotation, parameterName, e);
        }
    }
View Full Code Here

                .errorCode())) {
            return validatorDescriptor.errorCode();
        }
        if (StringUtils.isBlank(validatorDescriptor
                .errorCodeSuffix())) {
            throw new ValidatorAnnotationException(Cause.ERROR_CODE, null,
                    null, null);
        }
        return object.getClass().getSimpleName() + "."
          + (field != null ? field.getName() + "." : "")
                + validatorDescriptor.errorCodeSuffix();
View Full Code Here

                .errorCode())) {
            return validatorDescriptor.errorCode();
        }
        if (StringUtils.isBlank(validatorDescriptor
                .errorCodeSuffix())) {
            throw new ValidatorAnnotationException(Cause.ERROR_CODE, null,
                    null, null);
        }
        return object.getClass().getSimpleName() + "."
          + (field != null ? field + "." : "")
                + validatorDescriptor.errorCodeSuffix();
View Full Code Here

TOP

Related Classes of net.sourceforge.annovalidator.validation.exception.ValidatorAnnotationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.