org.hibernate.validator.internal.cfg.context

## Class ExecutableConstraintMappingContextImpl

- java.lang.Object
- - org.hibernate.validator.internal.cfg.context.ExecutableConstraintMappingContextImpl

- All Implemented Interfaces:
    ConstructorConstraintMappingContext, CrossParameterTarget, MethodConstraintMappingContext, ParameterTarget, ReturnValueTarget

      public class ExecutableConstraintMappingContextImpl
      extends Object
      implements ConstructorConstraintMappingContext, MethodConstraintMappingContext

  A constraint mapping creational context which allows to select the parameter or return value to which the next operations shall apply.
  Author:
    Kevin Pollet (C) 2011 SERLI, Gunnar Morling

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, Constructor<?> constructor)`
    `ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, Method method)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConstrainedElement` | `build(ConstraintHelper constraintHelper, ParameterNameProvider parameterNameProvider)`
    `CrossParameterConstraintMappingContext` | `crossParameter()` Selects the cross-parameter element of a method or constructor as target for the next constraint declaration operations.
    `ExecutableElement` | `getExecutable()`
    `TypeConstraintMappingContextImpl<?>` | `getTypeContext()`
    `ParameterConstraintMappingContext` | `parameter(int index)` Changes the parameter for which added constraints apply.
    `ReturnValueConstraintMappingContext` | `returnValue()` Selects the current method's return value as the target for the next operations.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExecutableConstraintMappingContextImpl

          public ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext,
                                                Constructor<?> constructor)

    - #### ExecutableConstraintMappingContextImpl

          public ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext,
                                                Method method)

  - ### Method Detail

    - #### parameter

          public ParameterConstraintMappingContext parameter(int index)

      Description copied from interface: `ParameterTarget`
      Changes the parameter for which added constraints apply. A given parameter may only be configured once.
      Specified by:
        `parameter` in interface `ParameterTarget`
      Parameters:
        `index` - The parameter index.
      Returns:
        A creational context representing the selected parameter.

    - #### crossParameter

          public CrossParameterConstraintMappingContext crossParameter()

      Description copied from interface: `CrossParameterTarget`
      Selects the cross-parameter element of a method or constructor as target for the next constraint declaration operations. May only be configured once for a given method or constructor.
      Specified by:
        `crossParameter` in interface `CrossParameterTarget`
      Returns:
        A creational context representing the cross-parameter element of the current method or constructor.

    - #### returnValue

          public ReturnValueConstraintMappingContext returnValue()

      Description copied from interface: `ReturnValueTarget`
      Selects the current method's return value as the target for the next operations. The return value of one method or constructor may only be configured more once.
      Specified by:
        `returnValue` in interface `ReturnValueTarget`
      Returns:
        A creational context representing the current method's or constructor's return value.

    - #### getExecutable

          public ExecutableElement getExecutable()

    - #### getTypeContext

          public TypeConstraintMappingContextImpl<?> getTypeContext()

    - #### build

          public ConstrainedElement build(ConstraintHelper constraintHelper,
                                 ParameterNameProvider parameterNameProvider)

Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved