Interface ConstraintValidatorContext. ConstraintViolationBuilder. NodeBuilderDefinedContext
-
- Enclosing interface:
- ConstraintValidatorContext.ConstraintViolationBuilder
public static interface ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext
Represents a node whose context is known (i.e. index, key and isInIterable) and that is not necessarily a leaf node (i.e. subnodes can be added).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderCustomizableContext
addBeanNode()
Adds a bean node (class-level) to the path theConstraintViolation
will be associated to.ConstraintValidatorContext
addConstraintViolation()
Adds the newConstraintViolation
to be generated if the constraint validator marks the value as invalid.ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext
addNode(String name)
Deprecated.since 1.1 - replaced byaddPropertyNode(String)
andaddBeanNode()
ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext
addPropertyNode(String name)
Adds a property node to the path theConstraintViolation
will be associated to.
-
-
-
Method Detail
-
addNode
ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext addNode(String name)
Deprecated. since 1.1 - replaced byaddPropertyNode(String)
andaddBeanNode()
Adds a node to the path theConstraintViolation
will be associated to.name
describes a single property. In particular, dot (.) is not allowed.- Parameters:
name
- property name- Returns:
- a builder representing node
name
-
addPropertyNode
ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderCustomizableContext addPropertyNode(String name)
Adds a property node to the path theConstraintViolation
will be associated to.name
describes a single property. In particular, dot (.) is not allowed.- Parameters:
name
- property name- Returns:
- a builder representing node
name
- Throws:
IllegalArgumentException
- if the name is null- Since:
- 1.1
-
addBeanNode
ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderCustomizableContext addBeanNode()
Adds a bean node (class-level) to the path theConstraintViolation
will be associated to. Note that bean nodes are always leaf nodes.- Returns:
- a builder representing the bean node
- Since:
- 1.1
-
addConstraintViolation
ConstraintValidatorContext addConstraintViolation()
Adds the newConstraintViolation
to be generated if the constraint validator marks the value as invalid. Methods of theConstraintViolationBuilder
instance this object comes from and the constraint violation builder nested objects throwIllegalStateException
after this call.- Returns:
ConstraintValidatorContext
instance theConstraintViolationBuilder
comes from
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 20:14:43 Cette version de la page est en cache (à la date du 21/08/2025 20:14:43) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 11/06/2005, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/validation/ConstraintValidatorContext.ConstraintViolationBuilder.NodeBuilderDefinedContext.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.