Package javax.validation

Examples of javax.validation.ElementKind


        }
    }

    private Response.Status getResponseStatus(final ConstraintViolation<?> constraintViolation) {
        for (final Path.Node node : constraintViolation.getPropertyPath()) {
            final ElementKind kind = node.getKind();

            if (ElementKind.RETURN_VALUE.equals(kind)) {
                return Response.Status.INTERNAL_SERVER_ERROR;
            }
        }
View Full Code Here


        Object leaf;
        Object returnValue;
        T rootBean;
        if (GroupValidationContext.class.isInstance(context)) { // TODO: clean up it but it would need to rework completely our context - get rid of it would be the best
            final GroupValidationContext<T> ctx = GroupValidationContext.class.cast(context);
            final ElementKind elementKind = ctx.getElementKind();
            final Iterator<Path.Node> it = propPath.iterator();
            final ElementKind kind = propPath.iterator().next().getKind();

            returnValue = ctx.getReturnValue();

            if (ElementKind.CONSTRUCTOR.equals(kind)) {
                rootBean = null;
View Full Code Here

    private static boolean kindOf(final Path propPath, final ElementKind... kinds) {
        final Iterator<Path.Node> node = propPath.iterator();
        boolean isParam = false;
        while (node.hasNext()) {
            final ElementKind current = node.next().getKind();
            isParam = false;
            for (final ElementKind k : kinds) {
                if (k.equals(current)) {
                    isParam = true;
                    break;
View Full Code Here

TOP

Related Classes of javax.validation.ElementKind

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.