Class MessageInterpolatorContext
java.lang.Object
org.hibernate.validator.internal.engine.MessageInterpolatorContext
- All Implemented Interfaces:
MessageInterpolator.Context,HibernateMessageInterpolatorContext
public class MessageInterpolatorContext
extends Object
implements HibernateMessageInterpolatorContext
Implementation of the context used during message interpolation.
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Gunnar Morling, Guillaume Smet
-
Constructor Summary
ConstructorsConstructorDescriptionMessageInterpolatorContext(ConstraintDescriptor<?> constraintDescriptor, Object validatedValue, Class<?> rootBeanType, Path propertyPath, Map<String, Object> messageParameters, Map<String, Object> expressionVariables, ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel, boolean customViolation) -
Method Summary
-
Constructor Details
-
MessageInterpolatorContext
public MessageInterpolatorContext(ConstraintDescriptor<?> constraintDescriptor, Object validatedValue, Class<?> rootBeanType, Path propertyPath, Map<String, Object> messageParameters, Map<String, Object> expressionVariables, ExpressionLanguageFeatureLevel expressionLanguageFeatureLevel, boolean customViolation)
-
-
Method Details
-
getConstraintDescriptor
- Specified by:
getConstraintDescriptorin interfaceMessageInterpolator.Context- Returns:
ConstraintDescriptorcorresponding to the constraint being validated
-
getValidatedValue
- Specified by:
getValidatedValuein interfaceMessageInterpolator.Context- Returns:
- value being validated
-
getRootBeanType
Description copied from interface:HibernateMessageInterpolatorContextReturns the currently validated root bean type.- Specified by:
getRootBeanTypein interfaceHibernateMessageInterpolatorContext- Returns:
- The currently validated root bean type.
-
getMessageParameters
- Specified by:
getMessageParametersin interfaceHibernateMessageInterpolatorContext- Returns:
- the message parameters added to this context for interpolation
-
getExpressionLanguageFeatureLevel
- Specified by:
getExpressionLanguageFeatureLevelin interfaceHibernateMessageInterpolatorContext- Returns:
- the level of features enabled for the Expression Language engine
-
isCustomViolation
public boolean isCustomViolation() -
getExpressionVariables
- Specified by:
getExpressionVariablesin interfaceHibernateMessageInterpolatorContext- Returns:
- the expression variables added to this context for EL interpolation
-
getPropertyPath
- Specified by:
getPropertyPathin interfaceHibernateMessageInterpolatorContext- Returns:
- the path to the validated constraint starting from the root bean
-
unwrap
Description copied from interface:MessageInterpolator.ContextReturns an instance of the specified type allowing access to provider-specific APIs. If the Jakarta Bean Validation provider implementation does not support the specified class,ValidationExceptionis thrown.- Specified by:
unwrapin interfaceMessageInterpolator.Context- Type Parameters:
T- the type of the object to be returned- Parameters:
type- the class of the object to be returned- Returns:
- an instance of the specified class
-
equals
-
hashCode
public int hashCode() -
toString
-