Examples of ExecutableConstraintLocation


Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

        annotationProcessingOptions
    );

    return new ConstrainedExecutable(
        ConfigurationSource.XML,
        new ExecutableConstraintLocation( executableElement ),
        parameterMetaData,
        crossParameterConstraints,
        returnValueConstraints,
        groupConversions,
        isCascaded
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

                        AnnotationProcessingOptionsImpl annotationProcessingOptions) {
    if ( returnValueType == null ) {
      return false;
    }

    ExecutableConstraintLocation constraintLocation = new ExecutableConstraintLocation( executableElement );
    for ( ConstraintType constraintType : returnValueType.getConstraint() ) {
      MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
          constraintLocation,
          constraintType,
          executableElement.getElementType(),
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

    Set<ConstrainedExecutable> constrainedExecutables = newHashSet();
    List<String> alreadyProcessedGetterNames = newArrayList();
    for ( GetterType getterType : getterList ) {
      String getterName = getterType.getName();
      Method getter = findGetter( beanClass, getterName, alreadyProcessedGetterNames );
      ExecutableConstraintLocation constraintLocation = new ExecutableConstraintLocation( getter );

      Set<MetaConstraint<?>> metaConstraints = newHashSet();
      for ( ConstraintType constraint : getterType.getConstraint() ) {
        MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
            constraintLocation,
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

                                    AnnotationProcessingOptionsImpl annotationProcessingOptions) {
    List<ConstrainedParameter> constrainedParameters = newArrayList();
    int i = 0;
    List<String> parameterNames = executableElement.getParameterNames( parameterNameProvider );
    for ( ParameterType parameterType : parameterList ) {
      ExecutableConstraintLocation constraintLocation = new ExecutableConstraintLocation( executableElement, i );
      Set<MetaConstraint<?>> metaConstraints = newHashSet();
      for ( ConstraintType constraint : parameterType.getConstraint() ) {
        MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
            constraintLocation,
            constraint,
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

  public PropertyConstraintMappingContext valid() {
    if ( member instanceof Field ) {
      mapping.addCascadeConfig( new BeanConstraintLocation( member ) );
    }
    else {
      mapping.addMethodCascadeConfig( new ExecutableConstraintLocation( (Method) member ) );
    }

    return this;
  }
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

      isCascading = executable.getAccessibleObject().isAnnotationPresent( Valid.class );
    }

    return new ConstrainedExecutable(
        ConfigurationSource.ANNOTATION,
        new ExecutableConstraintLocation( executable ),
        parameterConstraints,
        crossParameterConstraints,
        returnValueConstraints,
        groupConversions,
        isCascading
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

      if ( annotationProcessingOptions.areParameterConstraintsIgnoredFor( executable.getMember(), i ) ) {
        metaData.add(
            new ConstrainedParameter(
                ConfigurationSource.ANNOTATION,
                new ExecutableConstraintLocation( executable, i ),
                parameterName,
                parameterConstraints,
                getGroupConversions( groupConversion, groupConversionList ),
                false
            )
        );
        i++;
        continue;
      }

      for ( Annotation parameterAnnotation : parameterAnnotations ) {
        //1. collect constraints if this annotation is a constraint annotation
        List<ConstraintDescriptorImpl<?>> constraints = findConstraintAnnotations(
            executable.getMember(), parameterAnnotation, ElementType.PARAMETER
        );
        for ( ConstraintDescriptorImpl<?> constraintDescriptorImpl : constraints ) {
          parameterConstraints.add(
              createParameterMetaConstraint(
                  executable, i, constraintDescriptorImpl
              )
          );
        }

        //2. mark parameter as cascading if this annotation is the @Valid annotation
        if ( parameterAnnotation.annotationType().equals( Valid.class ) ) {
          parameterIsCascading = true;
        }
        //3. determine group conversions
        else if ( parameterAnnotation.annotationType().equals( ConvertGroup.class ) ) {
          groupConversion = (ConvertGroup) parameterAnnotation;
        }
        else if ( parameterAnnotation.annotationType().equals( ConvertGroup.List.class ) ) {
          groupConversionList = (ConvertGroup.List) parameterAnnotation;
        }
      }

      metaData.add(
          new ConstrainedParameter(
              ConfigurationSource.ANNOTATION,
              new ExecutableConstraintLocation( executable, i ),
              parameterName,
              parameterConstraints,
              getGroupConversions( groupConversion, groupConversionList ),
              parameterIsCascading
          )
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

  }

  private <A extends Annotation> MetaConstraint<A> createParameterMetaConstraint(ExecutableElement member,
                                           int parameterIndex,
                                           ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new ExecutableConstraintLocation( member, parameterIndex ) );
  }
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

    return new MetaConstraint<A>( descriptor, new ExecutableConstraintLocation( member, parameterIndex ) );
  }

  private <A extends Annotation> MetaConstraint<A> createReturnValueMetaConstraint(ExecutableElement member,
                                           ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new ExecutableConstraintLocation( member ) );
  }
View Full Code Here

Examples of org.hibernate.validator.internal.metadata.location.ExecutableConstraintLocation

        executable
    );

    return new ConstrainedExecutable(
        ConfigurationSource.ANNOTATION,
        new ExecutableConstraintLocation( executable, null ),
        parameterConstraints,
        crossParameterConstraints,
        returnValueConstraints,
        groupConversions,
        isCascading
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.