-
- 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
-
-
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/metadata/ExecutableDescriptor.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
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.