Package com.networknt.schema.regex
Class ECMAScriptRegularExpressionFactory
- java.lang.Object
-
- com.networknt.schema.regex.ECMAScriptRegularExpressionFactory
-
- All Implemented Interfaces:
RegularExpressionFactory
public class ECMAScriptRegularExpressionFactory extends 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 static ECMAScriptRegularExpressionFactory
INSTANCE
-
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(String regex)
Gets aRegularExpression
.
-
-
-
Field Detail
-
INSTANCE
public static final ECMAScriptRegularExpressionFactory INSTANCE
-
-
Method Detail
-
getInstance
public static ECMAScriptRegularExpressionFactory getInstance()
-
getRegularExpression
public RegularExpression getRegularExpression(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
-
-