javax.validation.executable

Interface ExecutableValidator


  • public interface ExecutableValidator
    Validates parameters and return values of methods and constructors. Implementations of this interface must be thread-safe.
    Since:
    1.1
    Author:
    Gunnar Morling
    • Method Detail

      • validateParameters

        <T> Set<ConstraintViolation<T>> validateParameters(T object,
                                                           Method method,
                                                           Object[] parameterValues,
                                                           Class<?>... groups)
        Validates all constraints placed on the parameters of the given method.
        Type Parameters:
        T - the type hosting the method to validate
        Parameters:
        object - the object on which the method to validate is invoked
        method - the method for which the parameter constraints is validated
        parameterValues - the values provided by the caller for the given method's parameters
        groups - the group or list of groups targeted for validation (defaults to Default)
        Returns:
        a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null
        Throws:
        IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other
        ValidationException - if a non recoverable error happens during the validation process
      • validateReturnValue

        <T> Set<ConstraintViolation<T>> validateReturnValue(T object,
                                                            Method method,
                                                            Object returnValue,
                                                            Class<?>... groups)
        Validates all return value constraints of the given method.
        Type Parameters:
        T - the type hosting the method to validate
        Parameters:
        object - the object on which the method to validate is invoked
        method - the method for which the return value constraints is validated
        returnValue - the value returned by the given method
        groups - the group or list of groups targeted for validation (defaults to Default)
        Returns:
        a set with the constraint violations caused by this validation; will be empty if no error occurs, but never null
        Throws:
        IllegalArgumentException - if null is passed for any of the object, method or groups parameters or if parameters don't match with each other
        ValidationException - if a non recoverable error happens during the validation process
      • validateConstructorParameters

        <T> Set<ConstraintViolation<T>> validateConstructorParameters(Constructor<? extends T> constructor,
                                                                      Object[] parameterValues,
                                                                      Class<?>... groups)
        Validates all constraints placed on the parameters of the given constructor.
        Type Parameters:
        T - the type hosting the constructor to validate
        Parameters:
        constructor - the constructor for which the parameter constraints is validated
        parameterValues - the values provided by the caller for the given constructor's parameters
        groups - the group or list of groups targeted for validation (defaults to Default)
        Returns:
        a set with the constraint violations caused by this validation; Will be empty if no error occurs, but never null
        Throws:
        IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other
        ValidationException - if a non recoverable error happens during the validation process
      • validateConstructorReturnValue

        <T> Set<ConstraintViolation<T>> validateConstructorReturnValue(Constructor<? extends T> constructor,
                                                                       T createdObject,
                                                                       Class<?>... groups)
        Validates all return value constraints of the given constructor.
        Type Parameters:
        T - the type hosting the constructor to validate
        Parameters:
        constructor - the constructor for which the return value constraints is validated
        createdObject - the object instantiated by the given method
        groups - the group or list of groups targeted for validation (defaults to Default)
        Returns:
        a set with the constraint violations caused by this validation; will be empty, if no error occurs, but never null
        Throws:
        IllegalArgumentException - if null is passed for any of the parameters or if parameters don't match with each other
        ValidationException - if a non recoverable error happens during the validation process

Nederlandse vertaling

U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.

Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.

Bij voorbaat dank.

Document heeft de 11/06/2005 gemaakt, de laatste keer de 18/08/2025 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-javaee-rf-javax/validation/executable/executablevalidator.html

De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.

Referenties

  1. Bekijk - html-document Taal van het document:fr Manuel PHP : https://docs.oracle.com

Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur van deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.