public abstract class Constraint extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Annotation |
annotation
Annotation corresponding to this constraint
|
| Constructor and Description |
|---|
Constraint() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkAssignableFrom(Object value,
Class<?>... clazz)
Checks if the provided
value can be assigned to the type defined by
clazz. |
protected abstract boolean |
isMet(Object value)
Checks if the provided
value meets this constraint. |
void |
populate(Annotation annotation)
TODO: remove this method and replace with a constructor accepting Annotation this
constraint is bound to.
|
protected void |
populateCustom(Annotation annotation) |
protected Annotation annotation
protected abstract boolean isMet(Object value)
value meets this constraint.protected void checkAssignableFrom(Object value, Class<?>... clazz)
value can be assigned to the type defined by
clazz. If not, an IllegalArgumentException will be thrown.
null values are assignable to any class.public final void populate(Annotation annotation)
protected void populateCustom(Annotation annotation)
Copyright © 2013 Carrot2.org. All Rights Reserved.