org.mozilla.javascript.regexp.NativeRegExpCallable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rhino Show documentation
Show all versions of rhino Show documentation
Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically
embedded into Java applications to provide scripting to end users.
The newest version!
package org.mozilla.javascript.regexp;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Function;
import org.mozilla.javascript.Scriptable;
/**
* Legacy implementation of RegExp was callable, this class exists to preserve this functionality
*/
class NativeRegExpCallable extends NativeRegExp implements Function {
NativeRegExpCallable(Scriptable scope, RECompiled compiled) {
super(scope, compiled);
}
NativeRegExpCallable() {
super();
}
@Override
public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
return execSub(cx, scope, args, MATCH);
}
@Override
public Scriptable construct(Context cx, Scriptable scope, Object[] args) {
return (Scriptable) execSub(cx, scope, args, MATCH);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy