org.mozilla.javascript.regexp

Class NativeRegExp

Implemented Interfaces:
Callable, ConstProperties, DebuggableObject, Function, IdFunctionCall, Scriptable, Serializable

public class NativeRegExp
extends IdScriptableObject
implements Function

This class implements the RegExp native object. Revision History: Implementation in C by Brendan Eich Initial port to Java by Norris Boyd from jsregexp.c version 1.36 Merged up to version 1.38, which included Unicode support. Merged bug fixes in version 1.39. Merged JSFUN13_BRANCH changes up to 1.32.2.13
Authors:
Brendan Eich
Norris Boyd

Field Summary

static int
JSREG_FOLD
static int
JSREG_GLOB
static int
JSREG_MULTILINE
static int
MATCH
static int
PREFIX
static int
TEST

Fields inherited from class org.mozilla.javascript.ScriptableObject

CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST

Fields inherited from interface org.mozilla.javascript.Scriptable

NOT_FOUND

Method Summary

@Override
Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
protected @Override
Object getInstanceIdValue(int id)
@Override
String getClassName()
protected @Override
String getInstanceIdName(int id)
@Override
String toString()
Object
call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
Scriptable
construct(Context cx, Scriptable scope, Object[] args)
static void
init(Context cx, Scriptable scope, boolean sealed)
protected @Override
int findInstanceIdInfo(String s)
protected @Override
int findPrototypeId(String s)
protected @Override
int getMaxInstanceId()
protected @Override
void initPrototypeId(int id)
protected @Override
void setInstanceIdValue(int id, Object value)

Methods inherited from class org.mozilla.javascript.IdScriptableObject

Object get, activatePrototypeMap, addIdFunctionProperty, boolean has, defaultGet, defaultPut, execIdCall, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findPrototypeId, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeId, initPrototypeMethod, initPrototypeValue, instanceIdInfo, int getAttributes, setInstanceIdValue, void delete, void put, void setAttributes

Methods inherited from class org.mozilla.javascript.ScriptableObject

associateValue, avoidObjectDetection, callMethod, callMethod, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, extends Scriptable> String defineClass, extends Scriptable> void defineClass, extends Scriptable> void defineClass, get, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isGetterOrSetter, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype

Field Details

JSREG_FOLD

public static final int JSREG_FOLD
Field Value:
2

JSREG_GLOB

public static final int JSREG_GLOB
Field Value:
1

JSREG_MULTILINE

public static final int JSREG_MULTILINE
Field Value:
4

MATCH

public static final int MATCH
Field Value:
1

PREFIX

public static final int PREFIX
Field Value:
2

TEST

public static final int TEST
Field Value:
0

Method Details

Object execIdCall

public @Override Object execIdCall(IdFunctionObject f,
                                   Context cx,
                                   Scriptable scope,
                                   Scriptable thisObj,
                                   Object[] args)

Object getInstanceIdValue

protected @Override Object getInstanceIdValue(int id)

String getClassName

public @Override String getClassName()

String getInstanceIdName

protected @Override String getInstanceIdName(int id)

String toString

public @Override String toString()

call

public Object call(Context cx,
                   Scriptable scope,
                   Scriptable thisObj,
                   Object[] args)
Specified by:
call in interface Function
call in interface Callable

construct

public Scriptable construct(Context cx,
                            Scriptable scope,
                            Object[] args)
Specified by:
construct in interface Function

init

public static void init(Context cx,
                        Scriptable scope,
                        boolean sealed)

int findInstanceIdInfo

protected @Override int findInstanceIdInfo(String s)

int findPrototypeId

protected @Override int findPrototypeId(String s)

int getMaxInstanceId

protected @Override int getMaxInstanceId()

void initPrototypeId

protected @Override void initPrototypeId(int id)

void setInstanceIdValue

protected @Override void setInstanceIdValue(int id,
                                            Object value)