public abstract class AbstractConstraintMetaData extends Object implements ConstraintMetaData
ConstraintMetaData
with attributes common
to all type of meta data.ConstraintMetaData.ConstraintMetaDataKind
Constructor and Description |
---|
AbstractConstraintMetaData(String name,
Class<?> type,
Set<MetaConstraint<?>> constraints,
ConstraintMetaData.ConstraintMetaDataKind constrainedMetaDataKind,
boolean isCascading,
boolean isConstrained) |
Modifier and Type | Method and Description |
---|---|
protected Set<ConstraintDescriptorImpl<?>> |
asDescriptors(Set<MetaConstraint<?>> constraints) |
boolean |
equals(Object obj) |
Set<MetaConstraint<?>> |
getConstraints() |
ConstraintMetaData.ConstraintMetaDataKind |
getKind()
Returns the
kind of this meta data object. |
String |
getName()
Returns the name of this meta data object.
|
Class<?> |
getType()
Returns the data type of this meta data object, e.g.
|
int |
hashCode() |
boolean |
isCascading()
Whether this meta data object is marked for cascaded validation or not.
|
boolean |
isConstrained()
Whether this meta data object is constrained by any means or not.
|
Iterator<MetaConstraint<?>> |
iterator() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asDescriptor
public AbstractConstraintMetaData(String name, Class<?> type, Set<MetaConstraint<?>> constraints, ConstraintMetaData.ConstraintMetaDataKind constrainedMetaDataKind, boolean isCascading, boolean isConstrained)
name
- the name of the constrained property, method or parametertype
- the type of the constrained elementconstraints
- the set of constraintsconstrainedMetaDataKind
- the type of constraint - property, method or parameter constraintisCascading
- should cascading constraints be evaluated. Returns true
is the constrained element
is marked for cascaded validation (@Valid
), false
otherwise.isConstrained
- returns true
is there are direct constraints defined on this element or it is
marked for cascaded validation, false
otherwise.public String getName()
ConstraintMetaData
getName
in interface ConstraintMetaData
public Class<?> getType()
ConstraintMetaData
getType
in interface ConstraintMetaData
public Iterator<MetaConstraint<?>> iterator()
iterator
in interface Iterable<MetaConstraint<?>>
public Set<MetaConstraint<?>> getConstraints()
public ConstraintMetaData.ConstraintMetaDataKind getKind()
ConstraintMetaData
kind
of this meta data object.getKind
in interface ConstraintMetaData
kind
of this meta data object.public boolean isCascading()
ConstraintMetaData
isCascading
in interface ConstraintMetaData
True
if this object is marked for cascaded validation, false
otherwise.public boolean isConstrained()
ConstraintMetaData
isConstrained
in interface ConstraintMetaData
True
if this object is marked for cascaded validation or has any constraints, false
otherwise.protected Set<ConstraintDescriptorImpl<?>> asDescriptors(Set<MetaConstraint<?>> constraints)
Copyright © 2018 JBoss by Red Hat. All rights reserved.