Package com.networknt.schema.regex
Class GraalJSRegularExpressionFactory
java.lang.Object
com.networknt.schema.regex.GraalJSRegularExpressionFactory
- All Implemented Interfaces:
RegularExpressionFactory
GraalJS
RegularExpressionFactory.
This requires a dependency on org.graalvm.js:js which along with its dependency libraries are 50 MB.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.GraalJSRegularExpressionFactory(org.graalvm.polyglot.Context context) Constructor. -
Method Summary
-
Constructor Details
-
GraalJSRegularExpressionFactory
public GraalJSRegularExpressionFactory()Constructor.This uses the context from
GraalJSContextFactory.getInstance().It is the caller's responsibility to release the context when it is no longer required by using GraalJSContextFactory.getInstance().close().
-
GraalJSRegularExpressionFactory
public GraalJSRegularExpressionFactory(org.graalvm.polyglot.Context context) Constructor.It is the caller's responsibility to release the context when it is no longer required.
- Parameters:
context- the context
-
-
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
-