org.hibernate.validator.internal.engine

## Class ValueContext<T,V>

- java.lang.Object
- - org.hibernate.validator.internal.engine.ValueContext<T,V>

-     public class ValueContext<T,V>
      extends Object

  An instance of this class is used to collect all the relevant information for validating a single class, property or method invocation.
  Author:
    Hardy Ferentschik, Gunnar Morling

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendBeanNode()`
    `void` | `appendCrossParameterNode()`
    `void` | `appendNode(Cascadable node)`
    `T` | `getCurrentBean()`
    `Class<T>` | `getCurrentBeanType()`
    `Class<?>` | `getCurrentGroup()`
    `Validatable` | `getCurrentValidatable()`
    `Object` | `getCurrentValidatedValue()` Returns the current value to be validated.
    `ElementType` | `getElementType()`
    `static <T,V> ValueContext<T,V>` | `getLocalExecutionContext(Class<T> type, Validatable validatable, PathImpl propertyPath)`
    `static <T,V> ValueContext<T,V>` | `getLocalExecutionContext(T value, Validatable validatable, PathImpl propertyPath)`
    `PathImpl` | `getPropertyPath()`
    `Type` | `getTypeOfAnnotatedElement()` Returns the declared (static) type of the currently validated element.
    `void` | `markCurrentPropertyAsIterable()`
    `void` | `setCurrentGroup(Class<?> currentGroup)`
    `void` | `setCurrentValidatedValue(V currentValue)`
    `void` | `setElementType(ElementType elementType)`
    `void` | `setIndex(Integer index)`
    `void` | `setKey(Object key)`
    `void` | `setPropertyPath(PathImpl propertyPath)`
    `void` | `setTypeOfAnnotatedElement(Type typeOfAnnotatedElement)`
    `void` | `setValidatedValueHandler(ValidatedValueUnwrapper<? super V> handler)`
    `String` | `toString()`
    `boolean` | `validatingDefault()`

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

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

- - ### Method Detail

    - #### getLocalExecutionContext

          public static <T,V> ValueContext<T,V> getLocalExecutionContext(T value,
                                                         Validatable validatable,
                                                         PathImpl propertyPath)

    - #### getLocalExecutionContext

          public static <T,V> ValueContext<T,V> getLocalExecutionContext(Class<T> type,
                                                         Validatable validatable,
                                                         PathImpl propertyPath)

    - #### getPropertyPath

          public final PathImpl getPropertyPath()

    - #### getCurrentGroup

          public final Class<?> getCurrentGroup()

    - #### getCurrentBean

          public final T getCurrentBean()

    - #### getCurrentBeanType

          public final Class<T> getCurrentBeanType()

    - #### getCurrentValidatable

          public Validatable getCurrentValidatable()

    - #### getCurrentValidatedValue

          public final Object getCurrentValidatedValue()

      Returns the current value to be validated. If a `ValidatedValueUnwrapper` has been set, the value will be retrieved via that handler.
      Returns:
        the current value to be validated

    - #### setPropertyPath

          public final void setPropertyPath(PathImpl propertyPath)

    - #### appendNode

          public final void appendNode(Cascadable node)

    - #### appendBeanNode

          public final void appendBeanNode()

    - #### appendCrossParameterNode

          public final void appendCrossParameterNode()

    - #### markCurrentPropertyAsIterable

          public final void markCurrentPropertyAsIterable()

    - #### setKey

          public final void setKey(Object key)

    - #### setIndex

          public final void setIndex(Integer index)

    - #### setCurrentGroup

          public final void setCurrentGroup(Class<?> currentGroup)

    - #### setCurrentValidatedValue

          public final void setCurrentValidatedValue(V currentValue)

    - #### validatingDefault

          public final boolean validatingDefault()

    - #### getElementType

          public final ElementType getElementType()

    - #### setElementType

          public final void setElementType(ElementType elementType)

    - #### getTypeOfAnnotatedElement

          public final Type getTypeOfAnnotatedElement()

      Returns the declared (static) type of the currently validated element. If a `ValidatedValueUnwrapper` has been set, the type will be retrieved via that handler.
      Returns:
        the declared type of the currently validated element

    - #### setTypeOfAnnotatedElement

          public final void setTypeOfAnnotatedElement(Type typeOfAnnotatedElement)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### setValidatedValueHandler

          public void setValidatedValueHandler(ValidatedValueUnwrapper<? super V> handler)

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