Package org.apache.ofbiz.base.util
Class PatternFactory
- java.lang.Object
-
- org.apache.ofbiz.base.util.PatternFactory
-
public class PatternFactory extends java.lang.Object
A RegEx compiled pattern factory.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
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.
-
-
-
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 stringcaseSensitive
- case sensitive true/false- Returns:
- a
Pattern
instance for the given string pattern - Throws:
org.apache.oro.text.regex.MalformedPatternException
-
-