-
- Enclosing interface:
- ElementDescriptor
public static interface ElementDescriptor.ConstraintFinder
Declares restrictions on retrieved constraints. Restrictions are cumulative. AConstraintFinder
is not thread-safe. The set of matchingConstraintDescriptor
is.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description ElementDescriptor.ConstraintFinder
declaredOn(ElementType... types)
Restricts to the constraints hosted on the listedtypes
for a given element.Set<ConstraintDescriptor<?>>
getConstraintDescriptors()
Retrieves the constraint descriptors following the defined restrictions and hosted on the element described byElementDescriptor
.boolean
hasConstraints()
Returnstrue
if at least one constraint declaration matching the restrictions is present on the element,false
otherwise.ElementDescriptor.ConstraintFinder
lookingAt(Scope scope)
Restricts to the constraints matching the provided scope for this element.ElementDescriptor.ConstraintFinder
unorderedAndMatchingGroups(Class<?>... groups)
Restricts to the constraints matching a given set of groups for this element.
-
-
-
Method Detail
-
unorderedAndMatchingGroups
ElementDescriptor.ConstraintFinder unorderedAndMatchingGroups(Class<?>... groups)
Restricts to the constraints matching a given set of groups for this element. This method respects group conversion, group sequences and group inheritance (including class-levelDefault
group overriding) but does not returnConstraintDescriptor
s in any particular order. Specifically, ordering of the group sequence is not respected.- Parameters:
groups
- groups targeted- Returns:
this
following the chaining method pattern
-
lookingAt
ElementDescriptor.ConstraintFinder lookingAt(Scope scope)
Restricts to the constraints matching the provided scope for this element. Defaults toScope.HIERARCHY
- Parameters:
scope
- expected scope- Returns:
this
following the chaining method pattern
-
declaredOn
ElementDescriptor.ConstraintFinder declaredOn(ElementType... types)
Restricts to the constraints hosted on the listedtypes
for a given element. Defaults to all possible types of the element. Typically used to restrict to fields (FIELD
) or getters (METHOD
).- Parameters:
types
- targeted types- Returns:
this
following the chaining method pattern
-
getConstraintDescriptors
Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Retrieves the constraint descriptors following the defined restrictions and hosted on the element described byElementDescriptor
.- Returns:
- matching constraint descriptors
-
hasConstraints
boolean hasConstraints()
Returnstrue
if at least one constraint declaration matching the restrictions is present on the element,false
otherwise.- Returns:
true
if there is at least one constraint
-
-
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/elementdescriptor.constraintfinder.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
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.