Package javax.validation.groups

Examples of javax.validation.groups.ConvertGroup


    for ( Annotation[] annotationsOfOneParameter : executable.getParameterAnnotations() ) {

      boolean parameterIsCascading = false;
      String parameterName = parameterNames[i];
      Set<MetaConstraint<?>> constraintsOfOneParameter = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;
      for ( Annotation parameterAnnotation : annotationsOfOneParameter ) {

        //1. collect constraints if this annotation is a constraint annotation
        List<ConstraintDescriptorImpl<?>> constraints = findConstraintAnnotations(
View Full Code Here


    int i = 0;
    for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) {
      boolean parameterIsCascading = false;
      String parameterName = parameterNames.get( i );
      Set<MetaConstraint<?>> parameterConstraints = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
            new ConstrainedParameter(
View Full Code Here

    int i = 0;
    for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) {
      boolean parameterIsCascading = false;
      String parameterName = parameterNames.get( i );
      Set<MetaConstraint<?>> parameterConstraints = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;
      boolean requiresUnwrapping = false;

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
View Full Code Here

                        edesc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(convertGroup.from()), new Group(convertGroup.to())));
                    }
                }

                if (ConvertGroup.class.isInstance(a)) {
                    final ConvertGroup convertGroup = ConvertGroup.class.cast(a);
                    edesc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(convertGroup.from()), new Group(convertGroup.to())));
                }
            }
            annotations.clear();
        }
View Full Code Here

            for (final ConvertGroup convertGroup : convertGroupList.value()) {
                edesc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(convertGroup.from()), new Group(convertGroup.to())));
            }
        }

        final ConvertGroup convertGroup = accessible.getAnnotation(ConvertGroup.class);
        if (convertGroup != null) {
            edesc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(convertGroup.from()), new Group(convertGroup.to())));
        }
    }
View Full Code Here

            for (final Annotation anno : paramAnnos) {
                if (anno instanceof Valid || anno instanceof Validate) {
                    cascaded = true;
                } else if (ConvertGroup.class.isInstance(anno)) {
                    final ConvertGroup cg = ConvertGroup.class.cast(anno);
                    from = new Group[]{new Group(cg.from())};
                    to = new Group[]{new Group(cg.to())};
                } else if (ConvertGroup.List.class.isInstance(anno)) {
                    final ConvertGroup.List cgl = ConvertGroup.List.class.cast(anno);
                    final ConvertGroup[] groups = cgl.value();
                    from = new Group[groups.length];
                    to = new Group[groups.length];
View Full Code Here

            }

            if (annotation instanceof Valid || annotation instanceof Validate) {
                desc.setCascaded(true);
            } else if (ConvertGroup.class.isInstance(annotation) && ReturnAccess.class.isInstance(access)) { // access is just tested to ensure to not read it twice with cross parameter
                final ConvertGroup cg = ConvertGroup.class.cast(annotation);
                desc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(cg.from()), new Group(cg.to())));
            } else if (ConvertGroup.List.class.isInstance(annotation) && ReturnAccess.class.isInstance(access)) {
                final ConvertGroup.List cgl = ConvertGroup.List.class.cast(annotation);
                for (final ConvertGroup cg : cgl.value()) {
                    desc.addGroupConversion(new GroupConversionDescriptorImpl(new Group(cg.from()), new Group(cg.to())));
                }
            } else {
                processConstraint(annotation, desc, access, validations);
            }
        }
View Full Code Here

    int i = 0;
    for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) {
      boolean parameterIsCascading = false;
      String parameterName = parameterNames.get( i );
      Set<MetaConstraint<?>> parameterConstraints = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
            new ConstrainedParameter(
View Full Code Here

    int i = 0;
    for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) {
      boolean parameterIsCascading = false;
      String parameterName = parameterNames.get( i );
      Set<MetaConstraint<?>> parameterConstraints = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;
      boolean requiresUnwrapping = false;

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
View Full Code Here

    for ( Annotation[] parameterAnnotations : executable.getParameterAnnotations() ) {
      boolean parameterIsCascading = false;
      String parameterName = parameterNames.get( i );
      Set<MetaConstraint<?>> parameterConstraints = newHashSet();
      Set<MetaConstraint<?>> typeArgumentsConstraints = newHashSet();
      ConvertGroup groupConversion = null;
      ConvertGroup.List groupConversionList = null;

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
            new ConstrainedParameter(
View Full Code Here

TOP

Related Classes of javax.validation.groups.ConvertGroup

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.