|
Carrot2 v3.3.0
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.attribute.constraint.Constraint
public abstract class Constraint
A base class for implementing constraints.
| Field Summary | |
|---|---|
protected Annotation |
annotation
Annotation corresponding to this constraint |
| Constructor Summary | |
|---|---|
Constraint()
|
|
| Method Summary | |
|---|---|
protected void |
checkAssignableFrom(Class<?> clazz,
Object value)
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)
|
protected void |
populateCustom(Annotation annotation)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Annotation annotation
| Constructor Detail |
|---|
public Constraint()
| Method Detail |
|---|
protected abstract boolean isMet(Object value)
value meets this constraint.
protected void checkAssignableFrom(Class<?> clazz,
Object value)
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)
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||