javax.validation

Interface TraversableResolver


  • public interface TraversableResolver
    Contract determining if a property can be accessed by the Bean Validation provider. This contract is called for each property that is being either validated or cascaded.

    A traversable resolver implementation must be thread-safe.

    Author:
    Emmanuel Bernard
    • Method Detail

      • isReachable

        boolean isReachable(Object traversableObject,
                            Path.Node traversableProperty,
                            Class<?> rootBeanType,
                            Path pathToTraversableObject,
                            ElementType elementType)
        Determines if the Bean Validation provider is allowed to reach the property state.
        Parameters:
        traversableObject - object hosting traversableProperty or null if validateValue is called
        traversableProperty - the traversable property
        rootBeanType - type of the root object passed to the Validator or hosting the method or constructor validated
        pathToTraversableObject - path from the root object to traversableObject (using the path specification defined by Bean Validator)
        elementType - either FIELD or METHOD
        Returns:
        true if the Bean Validation provider is allowed to reach the property state, false otherwise
      • isCascadable

        boolean isCascadable(Object traversableObject,
                             Path.Node traversableProperty,
                             Class<?> rootBeanType,
                             Path pathToTraversableObject,
                             ElementType elementType)
        Determines if the Bean Validation provider is allowed to cascade validation on the bean instance returned by the property value marked as @Valid.

        Note that this method is called only if isReachable(Object, javax.validation.Path.Node, Class, Path, java.lang.annotation.ElementType) returns true for the same set of arguments and if the property is marked as Valid.

        Parameters:
        traversableObject - object hosting traversableProperty or null if validateValue is called
        traversableProperty - the traversable property
        rootBeanType - type of the root object passed to the Validator or hosting the method or constructor validated
        pathToTraversableObject - path from the root object to traversableObject (using the path specification defined by Bean Validator)
        elementType - either FIELD or METHOD
        Returns:
        true if the Bean Validation provider is allowed to cascade validation, false otherwise

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 18:31:05 Cette version de la page est en cache (à la date du 21/08/2025 18:31:05) 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/traversableresolver.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

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com

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.