public class ParamValidatorRegistry extends Object
ParamValidatorRegistry
stores the different validators for each of the different parameter types.Modifier and Type | Method and Description |
---|---|
static boolean |
deregisterValidator(Class valueType) |
static ParamValidator |
getDefaultValidator()
Returns the default validator, which is guaranteed to be different from
null . |
static ParamValidator |
getValidator(Class valueType)
Returns a validator for the given value type, which is guaranteed to be different from
null . |
static void |
registerValidator(Class valueType,
ParamValidator validator) |
public static ParamValidator getDefaultValidator()
null
. The method first look
for a validator registred for the String
class, if it is not found then a new instance of
StringValidator
is returned.getValidator(Class)
public static ParamValidator getValidator(Class valueType)
null
. If
given value type is null
, the method returns the value of getDefaultValidator()
.
getDefaultValidator()
public static void registerValidator(Class valueType, ParamValidator validator)
public static boolean deregisterValidator(Class valueType)
Copyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.