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

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


    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

      }
      else if ( oneConfiguredLocation.getElementType() == ElementType.METHOD ) {
        propertyMetaData.add(
            new ConstrainedMethod(
                ConfigurationSource.XML,
                new MethodConstraintLocation( (Method) oneConfiguredLocation.getMember() ),
                constraintsByLocation.get( oneConfiguredLocation ),
                cascades.contains( oneConfiguredLocation )
            )
        );
      }
View Full Code Here

   *
   * @return Returns itself for method chaining.
   */
  public ParameterConstraintMappingContext valid() {
    mapping.addMethodCascadeConfig(
        new MethodConstraintLocation(
            method, parameterIndex
        )
    );
    return this;
  }
View Full Code Here

    );
  }

  public static <A extends Annotation> ConfiguredConstraint<A, MethodConstraintLocation> forParameter(ConstraintDef<?, A> constraint, Method method, int parameterIndex) {
    return new ConfiguredConstraint<A, MethodConstraintLocation>(
        constraint, new MethodConstraintLocation( method, parameterIndex )
    );
  }
View Full Code Here

    );
  }

  public static <A extends Annotation> ConfiguredConstraint<A, MethodConstraintLocation> forReturnValue(ConstraintDef<?, A> constraint, Method method) {
    return new ConfiguredConstraint<A, MethodConstraintLocation>(
        constraint, 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 ),
                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

   *
   * @return Returns itself for method chaining.
   */
  public ParameterConstraintMappingContext valid() {
    mapping.addMethodCascadeConfig(
        new MethodConstraintLocation(
            method, parameterIndex
        )
    );
    return this;
  }
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.