Class ParamValidatorRegistry


  • public class ParamValidatorRegistry
    extends Object
    A ParamValidatorRegistry stores the different validators for each of the different parameter types.
    Version:
    $Revision$ $Date$
    • Method Detail

      • getDefaultValidator

        public static ParamValidator getDefaultValidator()
        Returns the default validator, which is guaranteed to be different from 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.
        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 from null.

        If given value type is null, the method returns the value of getDefaultValidator().

        See Also:
        getDefaultValidator()
      • registerValidator

        public static void registerValidator​(Class valueType,
                                             ParamValidator validator)
      • deregisterValidator

        public static boolean deregisterValidator​(Class valueType)