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 org.apache.servicemix.bundles.rhino
Show all versions of org.apache.servicemix.bundles.rhino
This OSGi bundle wraps rhino and rhino-engine ${pkgVersion} jar files.
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