public static interface ConstraintValidatorContext.ConstraintViolationBuilder.NodeContextBuilder
Iterator
or Map
.
If the iterator is an indexed collection or a map,
the index or the key should be set.
The node is not necessarily a leaf node (i.e. subnodes can
be added).ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext atKey(Object key)
Map
.key
- map keyConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext atIndex(Integer index)
List
or array.index
- indexConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name)
ConstraintViolation
will be associated to.
name
describes a single property. In particular,
dot (.) is not allowed.name
- property namename
ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext addPropertyNode(String name)
ConstraintViolation
will be associated to.
name
describes a single property. In particular,
dot (.) is not allowed.name
- property namename
IllegalArgumentException
- if the name is nullConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderCustomizableContext addBeanNode()
ConstraintViolation
will be associated to.
Note that bean nodes are always leaf nodes.ConstraintValidatorContext addConstraintViolation()
ConstraintViolation
to be generated if the
constraint validator mark the value as invalid.
Methods of the ConstraintViolationBuilder
instance this object
comes from and the constraint violation builder nested
objects throw IllegalStateException
after this call.ConstraintValidatorContext
instance the
ConstraintViolationBuilder
comes fromCopyright © 2007-2013. All Rights Reserved.