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

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


      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


      }
      else {
        alreadyProcessedMethods.add( method );
      }

      ExecutableElement methodExecutableElement = ExecutableElement.forMethod( method );

      // ignore annotations
      if ( methodType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            method,
View Full Code Here

      }
      else {
        alreadyProcessedConstructors.add( constructor );
      }

      ExecutableElement constructorExecutableElement = ExecutableElement.forConstructor( constructor );

      // ignore annotations
      if ( constructorType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            constructor,
View Full Code Here

      }
      else {
        alreadyProcessedMethods.add( method );
      }

      ExecutableElement methodExecutableElement = ExecutableElement.forMethod( method );

      // ignore annotations
      if ( methodType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            method,
View Full Code Here

      }
      else {
        alreadyProcessedConstructors.add( constructor );
      }

      ExecutableElement constructorExecutableElement = ExecutableElement.forConstructor( constructor );

      // ignore annotations
      if ( constructorType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            constructor,
View Full Code Here

    assertEquals( node.getKey(), id );
  }

  @Test
  public void testCreationOfExecutablePath() throws Exception {
    ExecutableElement executable = ExecutableElement.forMethod(
        Container.class.getMethod(
            "addItem",
            Key.class,
            Item.class
        )
View Full Code Here

      returnValueConstraints.addAll( constrainedMethod.getConstraints() );
    }

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

      return new ExecutableMetaData(
          executableElement.getMember().getName(),
          executableElement.getReturnType(),
          executableElement.getParameterTypes(),
          kind == ConstrainedElementKind.CONSTRUCTOR ? ConstraintMetaDataKind.CONSTRUCTOR : ConstraintMetaDataKind.METHOD,
          adaptOriginsAndImplicitGroups( location.getBeanClass(), returnValueConstraints ),
          findParameterMetaData(),
          checkParameterConstraints(),
          isCascading,
View Full Code Here

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

      ExecutableElement executableElement = ( (ConstrainedExecutable) constrainedElement ).getExecutable();

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

      }
      else {
        alreadyProcessedMethods.add( method );
      }

      ExecutableElement methodExecutableElement = ExecutableElement.forMethod( method );

      // ignore annotations
      if ( methodType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            method,
View Full Code Here

      }
      else {
        alreadyProcessedConstructors.add( constructor );
      }

      ExecutableElement constructorExecutableElement = ExecutableElement.forConstructor( constructor );

      // ignore annotations
      if ( constructorType.getIgnoreAnnotations() != null ) {
        annotationProcessingOptions.ignoreConstraintAnnotationsOnMember(
            constructor,
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.