public abstract class AbstractConstraintMetaData extends Object implements ConstraintMetaData
ConstraintMetaData
with attributes common
to all type of meta data.Constructor and Description |
---|
AbstractConstraintMetaData(String name,
Type type,
Set<MetaConstraint<?>> constraints,
ElementKind constrainedMetaDataKind,
boolean isCascading,
boolean isConstrained,
boolean requiresUnwrapping) |
Modifier and Type | Method and Description |
---|---|
protected Set<ConstraintDescriptorImpl<?>> |
asDescriptors(Set<MetaConstraint<?>> constraints) |
boolean |
equals(Object obj) |
Set<MetaConstraint<?>> |
getConstraints() |
ElementKind |
getKind()
Returns the
kind of this meta data object. |
String |
getName()
Returns the name of this meta data object.
|
Type |
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() |
boolean |
requiresUnwrapping()
Whether the value to be validated needs to be unwrapped (which is the case if this element is annotated with
@UnwrapValidatedValue ) or not. |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asDescriptor
public AbstractConstraintMetaData(String name, Type type, Set<MetaConstraint<?>> constraints, ElementKind constrainedMetaDataKind, boolean isCascading, boolean isConstrained, boolean requiresUnwrapping)
public String getName()
ConstraintMetaData
getName
in interface ConstraintMetaData
public Type getType()
ConstraintMetaData
getType
in interface ConstraintMetaData
public Iterator<MetaConstraint<?>> iterator()
iterator
in interface Iterable<MetaConstraint<?>>
public Set<MetaConstraint<?>> getConstraints()
public ElementKind 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.public boolean requiresUnwrapping()
ConstraintMetaData
@UnwrapValidatedValue
) or not.requiresUnwrapping
in interface ConstraintMetaData
true
if the value to be validated needs to unwrapped, false
otherwise.protected Set<ConstraintDescriptorImpl<?>> asDescriptors(Set<MetaConstraint<?>> constraints)
Copyright © 2007-2014 Red Hat, Inc. All Rights Reserved