Package org.hibernate.validator.internal.metadata.location

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


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

    return this;
  }
View Full Code Here


      for ( int i = 0; i < oneMethod.getParameterTypes().length; i++ ) {
        parameterMetaDataList.add(
            new ConstrainedParameter(
                ConfigurationSource.API,
                new MethodConstraintLocation( oneMethod, i ),
                DEFAULT_PARAMETER_NAME_PREFIX + i,
                asMetaConstraints( constraintsByParameter.get( i ) ),
                cascadesByParameter.containsKey( i )
            )
        );
      }

      ConstrainedMethod methodMetaData = new ConstrainedMethod(
          ConfigurationSource.API,
          new MethodConstraintLocation( oneMethod ),
          parameterMetaDataList,
          asMetaConstraints( constraintsByParameter.get( null ) ),
          cascadesByParameter.containsKey( null )
      );
      allMethodMetaData.add( methodMetaData );
View Full Code Here

    Set<MetaConstraint<?>> constraints =
        convertToMetaConstraints( findConstraints( method, ElementType.METHOD ), method );

    return new ConstrainedMethod(
        ConfigurationSource.ANNOTATION,
        new MethodConstraintLocation( method ),
        parameterConstraints,
        constraints,
        isCascading
    );
  }
View Full Code Here

      }

      metaData.add(
          new ConstrainedParameter(
              ConfigurationSource.ANNOTATION,
              new MethodConstraintLocation( method, i ),
              parameterName,
              constraintsOfOneParameter,
              parameterIsCascading
          )
      );
View Full Code Here

  private <A extends Annotation> MetaConstraint<?> createMetaConstraint(Member member, ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new BeanConstraintLocation( member ) );
  }

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

  private <A extends Annotation> MetaConstraint<A> createParameterMetaConstraint(Method method, int parameterIndex, ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new MethodConstraintLocation( method, parameterIndex ) );
  }

  private <A extends Annotation> MetaConstraint<A> createReturnValueMetaConstraint(Method method, ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new MethodConstraintLocation( method ) );
  }
View Full Code Here

      for ( int i = 0; i < oneMethod.getParameterTypes().length; i++ ) {
        parameterMetaDataList.add(
            new ConstrainedParameter(
                ConfigurationSource.API,
                new MethodConstraintLocation( oneMethod, i ),
                parameterNames[i],
                asMetaConstraints( constraintsByParameter.get( i ) ),
                cascadesByParameter.containsKey( i )
            )
        );
      }

      ConstrainedMethod methodMetaData = new ConstrainedMethod(
          ConfigurationSource.API,
          new MethodConstraintLocation( oneMethod ),
          parameterMetaDataList,
          asMetaConstraints( constraintsByParameter.get( null ) ),
          cascadesByParameter.containsKey( null )
      );
      allMethodMetaData.add( methodMetaData );
View Full Code Here

            executable
        );

    return new ConstrainedMethod(
        ConfigurationSource.ANNOTATION,
        new MethodConstraintLocation( executable, null ),
        parameterConstraints,
        constraints,
        isCascading
    );
  }
View Full Code Here

      }

      metaData.add(
          new ConstrainedParameter(
              ConfigurationSource.ANNOTATION,
              new MethodConstraintLocation( method, i ),
              parameterName,
              constraintsOfOneParameter,
              parameterIsCascading
          )
      );
View Full Code Here

  private <A extends Annotation> MetaConstraint<?> createMetaConstraint(Member member, ConstraintDescriptorImpl<A> descriptor) {
    return new MetaConstraint<A>( descriptor, new BeanConstraintLocation( member ) );
  }

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

TOP

Related Classes of org.hibernate.validator.internal.metadata.location.MethodConstraintLocation

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.