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

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 11/06/2005, zuletzt geändert 18/08/2025
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/java-api-javaee-rf-javax/validation/executable/executablevalidator.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : https://docs.oracle.com

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor dieser Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.