Class ValueContext<T,V>

java.lang.Object
org.hibernate.validator.internal.engine.valuecontext.ValueContext<T,V>
Direct Known Subclasses:
BeanValueContext

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, Guillaume Smet
  • Method Details

    • getPropertyPath

      public final PathImpl getPropertyPath()
    • getCurrentGroup

      public final Class<?> getCurrentGroup()
    • getCurrentBean

      public final T getCurrentBean()
    • getCurrentValidatable

      public Validatable getCurrentValidatable()
    • getCurrentValidatedValue

      public final Object getCurrentValidatedValue()
      Returns the current value to be validated.
    • appendNode

      public final void appendNode(Cascadable node)
    • appendNode

      public final void appendNode(ConstraintLocation location)
    • appendTypeParameterNode

      public final void appendTypeParameterNode(String nodeName)
    • markCurrentPropertyAsIterable

      public final void markCurrentPropertyAsIterable()
    • markCurrentPropertyAsIterableAndSetKey

      public final void markCurrentPropertyAsIterableAndSetKey(Object key)
    • markCurrentPropertyAsIterableAndSetIndex

      public final void markCurrentPropertyAsIterableAndSetIndex(Integer index)
    • setTypeParameter

      public final void setTypeParameter(Class<?> containerClass, Integer typeParameterIndex)
      Sets the container element information.
      Parameters:
      containerClass - the class of the container
      typeParameterIndex - the index of the actual type parameter
      See Also:
    • setCurrentGroup

      public final void setCurrentGroup(Class<?> currentGroup)
    • setCurrentValidatedValue

      public final void setCurrentValidatedValue(V currentValue)
    • validatingDefault

      public final boolean validatingDefault()
    • getConstraintLocationKind

      public final ConstraintLocation.ConstraintLocationKind getConstraintLocationKind()
    • setConstraintLocationKind

      public final void setConstraintLocationKind(ConstraintLocation.ConstraintLocationKind constraintLocationKind)
    • getCurrentValueState

      public final ValueContext.ValueState<V> getCurrentValueState()
    • resetValueState

      public final void resetValueState(ValueContext.ValueState<V> valueState)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getValue

      public Object getValue(Object parent, ConstraintLocation location)