Examples of MethodConstraintLocation


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

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

      }

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

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

  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

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

  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

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

      }
      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

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

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

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

    );
  }

  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

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

    );
  }

  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

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

      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

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

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