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

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


    if ( !groupSequence.isEmpty() ) {
      defaultSequences.put( beanClass, groupSequence );
    }

    // constraints
    ConstraintLocation constraintLocation = ConstraintLocation.forClass( beanClass );
    Set<MetaConstraint<?>> metaConstraints = newHashSet();
    for ( ConstraintType constraint : classType.getConstraint() ) {
      MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
          constraintLocation,
          constraint,
View Full Code Here


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

        for ( ConstrainedElement existingConstrainedElement : existingConstrainedElements ) {
          if ( existingConstrainedElement.getLocation().getMember() != null &&
              existingConstrainedElement.getLocation().getMember().equals(
                  constrainedElement.getLocation().getMember()
              ) ) {
            ConstraintLocation location = constrainedElement.getLocation();
            throw log.getConstrainedElementConfiguredMultipleTimesException(
                location.getMember().toString()
            );
          }
        }
        existingConstrainedElements.add( constrainedElement );
      }
View Full Code Here

                                 AnnotationProcessingOptionsImpl annotationProcessingOptions) {
    Set<ConstrainedField> constrainedFields = newHashSet();
    List<String> alreadyProcessedFieldNames = newArrayList();
    for ( FieldType fieldType : fields ) {
      Field field = findField( beanClass, fieldType.getName(), alreadyProcessedFieldNames );
      ConstraintLocation constraintLocation = ConstraintLocation.forProperty( field );
      Set<MetaConstraint<?>> metaConstraints = newHashSet();
      for ( ConstraintType constraint : fieldType.getConstraint() ) {
        MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
            constraintLocation,
            constraint,
View Full Code Here

    Set<MetaConstraint<?>> crossParameterConstraints = newHashSet();
    if ( crossParameterType == null ) {
      return crossParameterConstraints;
    }

    ConstraintLocation constraintLocation = ConstraintLocation.forCrossParameter( executableElement );

    for ( ConstraintType constraintType : crossParameterType.getConstraint() ) {
      MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
          constraintLocation,
          constraintType,
View Full Code Here

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

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

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

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

    if ( !groupSequence.isEmpty() ) {
      defaultSequences.put( beanClass, groupSequence );
    }

    // constraints
    ConstraintLocation constraintLocation = ConstraintLocation.forClass( beanClass );
    Set<MetaConstraint<?>> metaConstraints = newHashSet();
    for ( ConstraintType constraint : classType.getConstraint() ) {
      MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(
          constraintLocation,
          constraint,
View Full Code Here

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

        for ( ConstrainedElement existingConstrainedElement : existingConstrainedElements ) {
          if ( existingConstrainedElement.getLocation().getMember() != null &&
              existingConstrainedElement.getLocation().getMember().equals(
                  constrainedElement.getLocation().getMember()
              ) ) {
            ConstraintLocation location = constrainedElement.getLocation();
            throw log.getConstrainedElementConfiguredMultipleTimesException(
                location.getMember().toString()
            );
          }
        }
        existingConstrainedElements.add( constrainedElement );
      }
View Full Code Here

TOP

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

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.