Package org.hibernate.validator.internal.metadata.descriptor

Examples of org.hibernate.validator.internal.metadata.descriptor.ExecutableDescriptorImpl


  private Path createPathWithElementDescriptors(Path path, ValueContext<?, ?> localContext) {
    List<ElementDescriptor> elementDescriptors = new ArrayList<ElementDescriptor>();

    // first node in method level validation is the method and its descriptor
    ExecutableDescriptorImpl executableDescriptor = getMethodDescriptor();
    elementDescriptors.add( getMethodDescriptor() );

    Object value;
    if ( isReturnValueValidation( localContext ) ) {
      // add the return value descriptor
      elementDescriptors.add( executableDescriptor.getReturnValueDescriptor() );
      value = localContext.getCurrentBean();

      if ( value != null && ReflectionHelper.isIterable( value.getClass() ) ) {
        value = ReflectionHelper.getIndexedValue( value, getIterableIndex( path ) );
      }
    }
    else {
      // add the parameter descriptor
      Integer parameterIndex = localContext.getParameterIndex();
      ParameterDescriptor parameterDescriptor = executableDescriptor.getParameterDescriptors()
          .get( parameterIndex );
      elementDescriptors.add( parameterDescriptor );

      value = parameterValues[localContext.getParameterIndex()];
View Full Code Here


    return returnValueMetaData;
  }

  @Override
  public ExecutableDescriptorImpl asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
    return new ExecutableDescriptorImpl(
        getType(),
        getName(),
        asDescriptors( getCrossParameterConstraints() ),
        returnValueMetaData.asDescriptor(
            defaultGroupSequenceRedefined,
View Full Code Here

    return returnValueMetaData;
  }

  @Override
  public ExecutableDescriptorImpl asDescriptor(boolean defaultGroupSequenceRedefined, List<Class<?>> defaultGroupSequence) {
    return new ExecutableDescriptorImpl(
        getType(),
        getName(),
        asDescriptors( getCrossParameterConstraints() ),
        returnValueMetaData.asDescriptor(
            defaultGroupSequenceRedefined,
View Full Code Here

TOP

Related Classes of org.hibernate.validator.internal.metadata.descriptor.ExecutableDescriptorImpl

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.