public interface ConstrainedElement extends Iterable<MetaConstraint<?>>
MetaConstraint
s and can be
marked for a cascaded validation. Furthermore each constrained element has a
configuration source
which determines its origin.
The hierarchy of constrained elements resembles the physical structure of the represented Java types. In particular it doesn't provide the notion of properties and it doesn't aggregate meta data for overridden elements in an inheritance hierarchy.
Identity of implementations is based on the element location and constraint source. That means that for instance in a set there can be two configurations for one and the same Java field created by two different configuration sources (e.g. via annotation and XML) but not two configurations for the same field originating from one configuration source.
Implementations are strictly read-only.
Modifier and Type | Interface and Description |
---|---|
static class |
ConstrainedElement.ConstrainedElementKind
The kind of a
ConstrainedElement . |
Modifier and Type | Method and Description |
---|---|
Set<MetaConstraint<?>> |
getConstraints()
Returns a set containing the constraints specified for this constrained
element.
|
ConstrainedElement.ConstrainedElementKind |
getKind()
Returns the kind of this constrained element.
|
ConstraintLocation |
getLocation()
Returns the location of this constrained element.
|
boolean |
isCascading()
Whether cascading validation for the represented element shall be
performed or not.
|
boolean |
isConstrained()
Whether this element is constrained or not.
|
ConstrainedElement.ConstrainedElementKind getKind()
ConstraintLocation getLocation()
Set<MetaConstraint<?>> getConstraints()
null
.boolean isCascading()
True
, if cascading validation for the represented
element shall be performed, false
otherwise.boolean isConstrained()
True
, if this element is constrained,
false
otherwise.Copyright © 2007-2014 Red Hat Middleware, LLC. All Rights Reserved