Package com.networknt.schema.regex
Class ECMAScriptRegularExpressionFactory
java.lang.Object
com.networknt.schema.regex.ECMAScriptRegularExpressionFactory
- All Implemented Interfaces:
RegularExpressionFactory
ECMAScript regular expression factory that chooses between GraalJS or Joni
implementations depending on which is on the classpath.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRegularExpression(String regex) Gets aRegularExpression.getRegularExpression(String regex, SchemaContext schemaContext) Gets aRegularExpressionin the context of the schema being evaluated.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ECMAScriptRegularExpressionFactory
public ECMAScriptRegularExpressionFactory()
-
-
Method Details
-
getInstance
-
getRegularExpression
Description copied from interface:RegularExpressionFactoryGets aRegularExpression.- Specified by:
getRegularExpressionin interfaceRegularExpressionFactory- Parameters:
regex- the regular expression text value- Returns:
- the regular expression
-
getRegularExpression
Description copied from interface:RegularExpressionFactoryGets aRegularExpressionin the context of the schema being evaluated.- Specified by:
getRegularExpressionin interfaceRegularExpressionFactory- Parameters:
regex- the regular expression text valueschemaContext- the schema context- Returns:
- the regular expression
-