Package com.networknt.schema.regex
Class ECMAScriptRegularExpressionFactory
- java.lang.Object
-
- com.networknt.schema.regex.ECMAScriptRegularExpressionFactory
-
- All Implemented Interfaces:
RegularExpressionFactory
public class ECMAScriptRegularExpressionFactory extends java.lang.Object implements RegularExpressionFactory
ECMAScript regular expression factory that chooses between GraalJS or Joni implementations depending on which is on the classpath.
-
-
Field Summary
Fields Modifier and Type Field Description private static RegularExpressionFactory
DELEGATE
private static boolean
GRAALJS_PRESENT
static ECMAScriptRegularExpressionFactory
INSTANCE
private static boolean
JONI_PRESENT
-
Constructor Summary
Constructors Constructor Description ECMAScriptRegularExpressionFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ECMAScriptRegularExpressionFactory
getInstance()
RegularExpression
getRegularExpression(java.lang.String regex)
Gets aRegularExpression
.
-
-
-
Field Detail
-
JONI_PRESENT
private static final boolean JONI_PRESENT
-
GRAALJS_PRESENT
private static final boolean GRAALJS_PRESENT
- See Also:
- Constant Field Values
-
DELEGATE
private static final RegularExpressionFactory DELEGATE
-
INSTANCE
public static final ECMAScriptRegularExpressionFactory INSTANCE
-
-
Method Detail
-
getInstance
public static ECMAScriptRegularExpressionFactory getInstance()
-
getRegularExpression
public RegularExpression getRegularExpression(java.lang.String regex)
Description copied from interface:RegularExpressionFactory
Gets aRegularExpression
.- Specified by:
getRegularExpression
in interfaceRegularExpressionFactory
- Parameters:
regex
- the regular expression text value- Returns:
- the regular expression
-
-