|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jsefa.common.validator.provider.ValidatorProvider
public final class ValidatorProvider
Provider for Validator
s.
Each Validator
must have a static factory method create
, which is either
parameterless or has exactly one parameter of type ValidatorConfiguration
.
It is thread-safe.
Constructor Summary | |
---|---|
ValidatorProvider()
Constructs a ValidatorProvider . |
Method Summary | |
---|---|
ValidatorProvider |
createCopy()
Creates a copy of this ValidatorProvider . |
Validator |
getForObjectType(Class<?> objectType,
String[] constraints)
Returns a Validator for the given object type and constraints. |
Validator |
getForValidatorType(Class<? extends Validator> validatorType,
Class<?> objectType,
String[] constraints)
Returns an instance of the given Validator type initialized with the given constraints. |
boolean |
hasValidatorFor(Class<?> objectType)
Returns true if and only if this provider has a Validator for the given object type. |
void |
registerValidatorType(Class<?> objectType,
Class<? extends Validator> validatorType)
Registers the given Validator type as being responsible for values of the given object type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidatorProvider()
ValidatorProvider
.
Method Detail |
---|
public ValidatorProvider createCopy()
ValidatorProvider
.
ValidatorProvider
public boolean hasValidatorFor(Class<?> objectType)
Validator
for the given object type.
objectType
- the type of the object a validator is needed for
Validator
for the given type; false otherwise.public Validator getForObjectType(Class<?> objectType, String[] constraints)
Validator
for the given object type and constraints.
objectType
- the type of the object a validator is needed forconstraints
- the constraints the validator must be initialized with
public Validator getForValidatorType(Class<? extends Validator> validatorType, Class<?> objectType, String[] constraints)
Validator
type initialized with the given constraints.
validatorType
- the Validator
typeobjectType
- the type of the object a validator is needed forconstraints
- the constraints to initialize the validator with
public void registerValidatorType(Class<?> objectType, Class<? extends Validator> validatorType)
Validator
type as being responsible for values of the given object type.
objectType
- the object typevalidatorType
- the Validator
type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |