Package org.hibernate.validator.internal.metadata.raw

Examples of org.hibernate.validator.internal.metadata.raw.ExecutableElement


      }
      else {
        alreadyProcessedMethods.add( method );
      }

      ExecutableElement methodExecutableElement = ExecutableElement.forMethod( method );

      // ignore annotations
      boolean ignoreConstructorAnnotations = methodType.getIgnoreAnnotations() == null ? false : methodType
          .getIgnoreAnnotations();
      if ( ignoreConstructorAnnotations ) {
View Full Code Here


      }
      else {
        alreadyProcessedConstructors.add( constructor );
      }

      ExecutableElement constructorExecutableElement = ExecutableElement.forConstructor( constructor );

      // ignore annotations
      boolean ignoreConstructorAnnotations = constructorType.getIgnoreAnnotations() == null ? false : constructorType
          .getIgnoreAnnotations();
      if ( ignoreConstructorAnnotations ) {
View Full Code Here

    public boolean accepts(ConstrainedElement constrainedElement) {
      if ( kind != constrainedElement.getKind() ) {
        return false;
      }

      ExecutableElement executableElement = ( (ConstrainedExecutable) constrainedElement ).getLocation()
          .getExecutableElement();

      //are the locations equal (created by different builders) or
      //does one of the executables override the other one?
      return
          location.getExecutableElement().equals( executableElement ) ||
              location.getExecutableElement().overrides( executableElement ) ||
              executableElement.overrides(
                  location.getExecutableElement()
              );
    }
View Full Code Here

      crossParameterConstraints.addAll( constrainedExecutable.getCrossParameterConstraints() );
    }

    @Override
    public ExecutableMetaData build() {
      ExecutableElement executableElement = location.getExecutableElement();

      ConstraintDeclarationException constraintDeclarationException = checkParameterConstraints();
      if ( constraintDeclarationException == null ) {
        constraintDeclarationException = checkReturnValueConfiguration();
      }

      return new ExecutableMetaData(
          executableElement.getSimpleName(),
          executableElement.getReturnType(),
          executableElement.getParameterTypes(),
          kind == ConstrainedElement.ConstrainedElementKind.CONSTRUCTOR ? ElementKind.CONSTRUCTOR : ElementKind.METHOD,
          adaptOriginsAndImplicitGroups( getConstraints() ),
          findParameterMetaData(),
          adaptOriginsAndImplicitGroups( crossParameterConstraints ),
          constraintDeclarationException,
          getGroupConversions(),
          isCascading(),
          isConstrained,
          executableElement.isGetterMethod()
      );
    }
View Full Code Here

  }

  private <T> int validateParametersForGroup(ValidationContext<T> validationContext, T object, Object[] parameterValues, Group group) {
    int numberOfViolationsBefore = validationContext.getFailingConstraints().size();

    ExecutableElement executable = validationContext.getExecutable();

    BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() );
    ExecutableMetaData executableMetaData = beanMetaData.getMetaDataFor( executable );

    // TODO GM: define behavior with respect to redefined default sequences. Should only the
View Full Code Here

    public boolean accepts(ConstrainedElement constrainedElement) {
      if ( kind != constrainedElement.getKind() ) {
        return false;
      }

      ExecutableElement executableElement = ( (ConstrainedExecutable) constrainedElement ).getLocation()
          .getExecutableElement();

      //does one of the executables override the other one?
      return location.getExecutableElement()
          .overrides( executableElement ) || executableElement.overrides(
          location.getExecutableElement()
      );
    }
View Full Code Here

    }

    @Override
    public ExecutableMetaData build() {

      ExecutableElement executableElement = location.getExecutableElement();

      return new ExecutableMetaData(
          executableElement.getSimpleName(),
          executableElement.getReturnType(),
          executableElement.getParameterTypes(),
          kind == ConstrainedElementKind.CONSTRUCTOR ? ConstraintMetaDataKind.CONSTRUCTOR : ConstraintMetaDataKind.METHOD,
          adaptOriginsAndImplicitGroups( getConstraints() ),
          findParameterMetaData(),
          adaptOriginsAndImplicitGroups( crossParameterConstraints ),
          checkParameterConstraints(),
View Full Code Here

  }

  private <T> int validateParametersForGroup(MethodValidationContext<T> validationContext, T object, Object[] parameterValues, Group group) {
    int numberOfViolationsBefore = validationContext.getFailingConstraints().size();

    ExecutableElement executable = validationContext.getExecutable();

    BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() );
    ExecutableMetaData executableMetaData = beanMetaData.getMetaDataFor( executable );

    // TODO GM: define behavior with respect to redefined default sequences. Should only the
View Full Code Here

    public boolean accepts(ConstrainedElement constrainedElement) {
      if ( kind != constrainedElement.getKind() ) {
        return false;
      }

      ExecutableElement executableElement = ( (ConstrainedExecutable) constrainedElement ).getLocation()
          .getExecutableElement();

      //are the locations equal (created by different builders) or
      //does one of the executables override the other one?
      return
          location.getExecutableElement().equals( executableElement ) ||
              location.getExecutableElement().overrides( executableElement ) ||
              executableElement.overrides(
                  location.getExecutableElement()
              );
    }
View Full Code Here

    @Override
    public ExecutableMetaData build() {
      assertCorrectnessOfConfiguration();

      ExecutableElement executableElement = location.getExecutableElement();

      return new ExecutableMetaData(
          executableElement.getSimpleName(),
          executableElement.getReturnType(),
          executableElement.getParameterTypes(),
          kind == ConstrainedElement.ConstrainedElementKind.CONSTRUCTOR ? ElementKind.CONSTRUCTOR : ElementKind.METHOD,
          adaptOriginsAndImplicitGroups( getConstraints() ),
          findParameterMetaData(),
          adaptOriginsAndImplicitGroups( crossParameterConstraints ),
          getGroupConversions(),
          isCascading(),
          isConstrained,
          executableElement.isGetterMethod()
      );
    }
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.metadata.raw.ExecutableElement

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.