-
- All Superinterfaces:
- ElementDescriptor
- All Known Subinterfaces:
- ConstructorDescriptor, MethodDescriptor
public interface ExecutableDescriptor extends ElementDescriptor
Provides the common functionality ofMethodDescriptor
andConstructorDescriptor
.- Since:
- 1.1
- Author:
- Gunnar Morling
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface javax.validation.metadata.ElementDescriptor
ElementDescriptor.ConstraintFinder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description ElementDescriptor.ConstraintFinder
findConstraints()
Returns a finder that will always return an emptySet
.Set<ConstraintDescriptor<?>>
getConstraintDescriptors()
Returns an emptySet
.CrossParameterDescriptor
getCrossParameterDescriptor()
Returns a descriptor containing the cross-parameter constraints of this executable.String
getName()
Returns the method name in case this descriptor represents a method or the non-qualified name of the declaring class in case this descriptor represents a constructor.List<ParameterDescriptor>
getParameterDescriptors()
Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.ReturnValueDescriptor
getReturnValueDescriptor()
Returns a descriptor for this executable's return value.boolean
hasConstrainedParameters()
Returnstrue
if the executable parameters are constrained either: because of a constraint on at least one of the parameters because of a cascade on at least one of the parameters (viaValid
) because of at least one cross-parameter constraint Also returnsfalse
if there is no parameter.boolean
hasConstrainedReturnValue()
Returnstrue
if the executable return value is constrained either: because of a constraint on the return value because validation is cascaded on the return value (viaValid
) Also returnsfalse
if there is no return value.boolean
hasConstraints()
Returnsfalse
.-
Methods inherited from interface javax.validation.metadata.ElementDescriptor
getElementClass
-
-
-
-
Method Detail
-
getName
String getName()
Returns the method name in case this descriptor represents a method or the non-qualified name of the declaring class in case this descriptor represents a constructor.- Returns:
- the name of the executable represented by this descriptor
-
getParameterDescriptors
List<ParameterDescriptor> getParameterDescriptors()
Returns a list of descriptors representing this executable's parameters, in the order of their declaration, including synthetic parameters.- Returns:
- a list of descriptors representing this executable's
parameters; an empty list will be returned if this executable has
no parameters, but never
null
-
getCrossParameterDescriptor
CrossParameterDescriptor getCrossParameterDescriptor()
Returns a descriptor containing the cross-parameter constraints of this executable.- Returns:
- a descriptor containing the cross-parameter constraints of this executable
-
getReturnValueDescriptor
ReturnValueDescriptor getReturnValueDescriptor()
Returns a descriptor for this executable's return value. An executable without return value will return a descriptor representingvoid
. This descriptor will have no constraint associated.- Returns:
- a descriptor for this executable's return value
-
hasConstrainedParameters
boolean hasConstrainedParameters()
Returnstrue
if the executable parameters are constrained either:- because of a constraint on at least one of the parameters
- because of a cascade on at least one of the parameters (via
Valid
) - because of at least one cross-parameter constraint
false
if there is no parameter.- Returns:
true
if the executable parameters are constrained
-
hasConstrainedReturnValue
boolean hasConstrainedReturnValue()
Returnstrue
if the executable return value is constrained either:- because of a constraint on the return value
- because validation is cascaded on the return value (via
Valid
)
false
if there is no return value.- Returns:
true
if the executable return value is constrained
-
hasConstraints
boolean hasConstraints()
Returnsfalse
. An executable per se does not host constraints, usegetParameterDescriptors()
,getCrossParameterDescriptor()
andgetReturnValueDescriptor()
to discover constraints.- Specified by:
hasConstraints
in interfaceElementDescriptor
- Returns:
false
-
getConstraintDescriptors
Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Returns an emptySet
. An executable per se does not host constraints, usegetParameterDescriptors()
,getCrossParameterDescriptor()
andgetReturnValueDescriptor()
to discover constraints.- Specified by:
getConstraintDescriptors
in interfaceElementDescriptor
- Returns:
- an empty
Set
-
findConstraints
ElementDescriptor.ConstraintFinder findConstraints()
Returns a finder that will always return an emptySet
. An executable per se does not host constraints, usegetParameterDescriptors()
,getCrossParameterDescriptor()
andgetReturnValueDescriptor()
to discover constraints.- Specified by:
findConstraints
in interfaceElementDescriptor
- Returns:
ConstraintFinder
object
-
-
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/ExecutableDescriptor.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.