Package org.teiid.query.sql.lang
Class MatchCriteria.PatternTranslator
- java.lang.Object
-
- org.teiid.query.sql.lang.MatchCriteria.PatternTranslator
-
- Enclosing class:
- MatchCriteria
public static class MatchCriteria.PatternTranslator extends Object
Utility to convert the pattern into a different match syntax
-
-
Constructor Summary
Constructors Constructor Description PatternTranslator(char[] toReplace, String[] replacements, char[] reserved, char newEscape, int flags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPatternString(String pattern, char escape)
Pattern
translate(String pattern, char escape)
-
-
-
Constructor Detail
-
PatternTranslator
public PatternTranslator(char[] toReplace, String[] replacements, char[] reserved, char newEscape, int flags)
- Parameters:
toReplace
- meta characters to replacereplacements
- the replacements for the meta charactersreserved
- sorted array of reserved chars in the new match syntaxnewEscape
- escape char in the new syntax
-
-
Method Detail
-
translate
public Pattern translate(String pattern, char escape) throws ExpressionEvaluationException
- Throws:
ExpressionEvaluationException
-
getPatternString
public String getPatternString(String pattern, char escape) throws ExpressionEvaluationException
- Throws:
ExpressionEvaluationException
-
-