|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.schema.model.constraint.ConstraintUtil
public abstract class ConstraintUtil
Helper for creating default constraints and dealing with the
Constraint
annotation. Caches immutable default constraints that have
a default constructor.
Constraint
,
Definition.getConstraint(Class)
Constructor Summary | |
---|---|
ConstraintUtil()
|
Method Summary | ||
---|---|---|
static Class<?> |
getConstraintType(Class<?> type)
Determine the constraint type in the hierarchy of the given type, i.e. |
|
static
|
getDefaultConstraint(Class<T> constraintType,
Definition<?> definition)
Get the default constraint for the given constraint type. |
|
static boolean |
isMutableConstraint(Class<?> type)
Determine if the constraint type in the hierarchy of the given type is mutable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConstraintUtil()
Method Detail |
---|
public static <T> T getDefaultConstraint(Class<T> constraintType, Definition<?> definition) throws IllegalArgumentException
T
- the constraint typeconstraintType
- the concrete constraint type, i.e. a type annotated
with Constraint
and defining a default constructor
and/or a constructor taking a Definition
as an
argumentdefinition
- the definition the constraint will be associated to
IllegalArgumentException
- if the given type is no constraint type
or creating the default constraint failsConstraint
,
Definition.getConstraint(Class)
public static Class<?> getConstraintType(Class<?> type) throws IllegalArgumentException
Constraint
type
- the type to determine the constraint type for
IllegalArgumentException
- if no constraint type exists in the type
hierarchypublic static boolean isMutableConstraint(Class<?> type)
type
- the type to determine the constraint type for
IllegalArgumentException
- if no constraint type exists in the type
hierarchy
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |