Class RegexpValidator


  • public class RegexpValidator
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      RegexpValidator()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void throwIfPatternInvalid​(java.lang.String pattern)
      Tries to compile the passed regular expression pattern.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RegexpValidator

        public RegexpValidator()
    • Method Detail

      • throwIfPatternInvalid

        public static void throwIfPatternInvalid​(java.lang.String pattern)
                                          throws ValidationException

        Tries to compile the passed regular expression pattern.

        This method will throw specified exception if passed pattern fails to compile.

        Parameters:
        pattern - The pattern to validate.
        Throws:
        ValidationException - Thrown in case there was a problem compiling passed pattern.