Package org.esa.snap.core.param
Class ParamValidatorRegistry
- java.lang.Object
-
- org.esa.snap.core.param.ParamValidatorRegistry
-
public class ParamValidatorRegistry extends Object
AParamValidatorRegistry
stores the different validators for each of the different parameter types.- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
deregisterValidator(Class valueType)
static ParamValidator
getDefaultValidator()
Returns the default validator, which is guaranteed to be different fromnull
.static ParamValidator
getValidator(Class valueType)
Returns a validator for the given value type, which is guaranteed to be different fromnull
.static void
registerValidator(Class valueType, ParamValidator validator)
-
-
-
Method Detail
-
getDefaultValidator
public static ParamValidator getDefaultValidator()
Returns the default validator, which is guaranteed to be different fromnull
. The method first look for a validator registred for theString
class, if it is not found then a new instance ofStringValidator
is returned.- See Also:
getValidator(Class)
-
getValidator
public static ParamValidator getValidator(Class valueType)
Returns a validator for the given value type, which is guaranteed to be different fromnull
.If given value type is
null
, the method returns the value ofgetDefaultValidator()
.- See Also:
getDefaultValidator()
-
registerValidator
public static void registerValidator(Class valueType, ParamValidator validator)
-
deregisterValidator
public static boolean deregisterValidator(Class valueType)
-
-