|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ElementDescriptor
Describes a validated element (class, property, method etc.).
Nested Class Summary | |
---|---|
static interface |
ElementDescriptor.ConstraintFinder
Declare restrictions on retrieved constraints. |
static class |
ElementDescriptor.Kind
The kind of an ElementDescriptor . |
Method Summary | ||
---|---|---|
|
as(Class<T> descriptorType)
Narrows the type of this descriptor down to the given type. |
|
ElementDescriptor.ConstraintFinder |
findConstraints()
Find constraints and potentially restricts them to certain criteria. |
|
Set<ConstraintDescriptor<?>> |
getConstraintDescriptors()
Return all constraint descriptors for this element in the class hierarchy or an empty Set if none are present. |
|
Class<?> |
getElementClass()
|
|
ElementDescriptor.Kind |
getKind()
Returns the kind of this descriptor. |
|
boolean |
hasConstraints()
|
Method Detail |
---|
boolean hasConstraints()
true
if at least one constraint declaration is present
for this element in the class hierarchy, false
otherwise.Class<?> getElementClass()
Set<ConstraintDescriptor<?>> getConstraintDescriptors()
Set
if none are present.
Set
of constraint descriptors for this elementElementDescriptor.ConstraintFinder findConstraints()
ElementDescriptor.Kind getKind()
<T extends ElementDescriptor> T as(Class<T> descriptorType)
getKind()
.
T
- The type to narrow down to.descriptorType
- Class object representing the descriptor type to narrow down
to.
ClassCastException
- If this descriptor is not assignable to the type
T
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |