javax.validation.metadata

Interface ConstraintDescriptor<T extends Annotation>


  • public interface ConstraintDescriptor<T extends Annotation>
    Describes a single constraint and its composing constraints.

    T is the constraint's annotation type.

    Author:
    Emmanuel Bernard, Hardy Ferentschik
    • Method Detail

      • getAnnotation

        T getAnnotation()
        Returns the annotation describing the constraint declaration. If a composing constraint, attribute values are reflecting the overridden attributes of the composing constraint
        Returns:
        the annotation for this constraint
      • getMessageTemplate

        String getMessageTemplate()
        The non-interpolated error message
        Returns:
        the non-interpolated error message
        Since:
        1.1
      • getGroups

        Set<Class<?>> getGroups()
        The set of groups the constraint is applied on. If the constraint declares no group, a set with only the Default group is returned.
        Returns:
        the groups the constraint is applied on
      • getPayload

        Set<Class<? extends Payload>> getPayload()
        The set of payload the constraint hosts.
        Returns:
        payload classes hosted on the constraint or an empty set if none
      • getValidationAppliesTo

        ConstraintTarget getValidationAppliesTo()
        The ConstraintTarget value of validationAppliesTo if the constraint hosts it or null otherwise.
        Returns:
        the ConstraintTarget value or null
        Since:
        1.1
      • getConstraintValidatorClasses

        List<Class<? extends ConstraintValidator<T,?>>> getConstraintValidatorClasses()
        List of the constraint validation implementation classes.
        Returns:
        list of the constraint validation implementation classes
      • getAttributes

        Map<String,Object> getAttributes()
        Returns a map containing the annotation attribute names as keys and the annotation attribute values as value.

        If this constraint is used as part of a composed constraint, attribute values are reflecting the overridden attribute of the composing constraint.

        Returns:
        a map containing the annotation attribute names as keys and the annotation attribute values as value
      • getComposingConstraints

        Set<ConstraintDescriptor<?>> getComposingConstraints()
        Return a set of composing ConstraintDescriptors where each descriptor describes a composing constraint. ConstraintDescriptor instances of composing constraints reflect overridden attribute values in getAttributes() and getAnnotation().
        Returns:
        a set of ConstraintDescriptor objects or an empty set in case there are no composing constraints
      • isReportAsSingleViolation

        boolean isReportAsSingleViolation()
        Returns:
        true if the constraint is annotated with ReportAsSingleViolation

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/metadata/constraintdescriptor.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/en/java/, Interface ConstraintDescriptor

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.