Class PatternFactory


  • public class PatternFactory
    extends java.lang.Object
    A RegEx compiled pattern factory.
    • Constructor Summary

      Constructors 
      Constructor Description
      PatternFactory()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.oro.text.regex.Pattern createOrGetPerl5CompiledPattern​(java.lang.String stringPattern, boolean caseSensitive)
      Compiles and caches a Perl5 regexp pattern for the given string pattern.
      • Methods inherited from class java.lang.Object

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

      • PatternFactory

        public PatternFactory()
    • Method Detail

      • createOrGetPerl5CompiledPattern

        public static org.apache.oro.text.regex.Pattern createOrGetPerl5CompiledPattern​(java.lang.String stringPattern,
                                                                                        boolean caseSensitive)
                                                                                 throws org.apache.oro.text.regex.MalformedPatternException
        Compiles and caches a Perl5 regexp pattern for the given string pattern. This would be of no benefits (and may bloat memory usage) if stringPattern is never the same.
        Parameters:
        stringPattern - a Perl5 pattern string
        caseSensitive - case sensitive true/false
        Returns:
        a Pattern instance for the given string pattern
        Throws:
        org.apache.oro.text.regex.MalformedPatternException