org.mozilla.javascript.regexp
Class NativeRegExpCtor
java.lang.Object
|
+--org.mozilla.javascript.ScriptableObject
|
+--org.mozilla.javascript.IdScriptable
|
+--org.mozilla.javascript.BaseFunction
|
+--org.mozilla.javascript.NativeFunction
|
+--org.mozilla.javascript.regexp.NativeRegExpCtor
- All Implemented Interfaces:
- Function, IdFunctionMaster, Scriptable, java.io.Serializable
- public class NativeRegExpCtor
- extends NativeFunction
This class implements the RegExp constructor 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.11
- Author:
- Brendan Eich, Norris Boyd
- See Also:
- Serialized Form
Methods inherited from class org.mozilla.javascript.ScriptableObject |
callMethod, defineClass, defineClass, defineFunctionProperties, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, get, getAllIds, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, has, hasProperty, hasProperty, isSealed, put, putProperty, putProperty, sealObject, setAttributes, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mozilla.javascript.Scriptable |
delete, delete, get, get, getDefaultValue, getIds, getParentScope, getPrototype, has, has, put, put, setParentScope, setPrototype |
NativeRegExpCtor
public NativeRegExpCtor()
getClassName
public java.lang.String getClassName()
- Description copied from interface:
Scriptable
- Get the name of the set of objects implemented by this Java class.
This corresponds to the [[Class]] operation in ECMA and is used
by Object.prototype.toString() in ECMA.
See ECMA 8.6.2 and 15.2.4.2.
- Overrides:
getClassName
in class BaseFunction
call
public java.lang.Object call(Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
- Description copied from class:
BaseFunction
- Should be overridden.
- Overrides:
call
in class BaseFunction
- Following copied from interface:
org.mozilla.javascript.Function
- Parameters:
cx
- the current Context for this threadscope
- the scope to execute the function relative to. This is
set to the value returned by getParentScope() except
when the function is called from a closure.thisObj
- the JavaScript this
objectargs
- the array of arguments- Returns:
- the result of the call
- Throws:
JavaScriptException
- if an uncaught exception
occurred while executing the function
construct
public Scriptable construct(Context cx,
Scriptable scope,
java.lang.Object[] args)
- Description copied from interface:
Function
- Call the function as a constructor.
This method is invoked by the runtime in order to satisfy a use
of the JavaScript
new
operator. This method is
expected to create a new object and return it.
- Overrides:
construct
in class BaseFunction
- Following copied from interface:
org.mozilla.javascript.Function
- Parameters:
cx
- the current Context for this threadscope
- an enclosing scope of the caller except
when the function is called from a closure.args
- the array of arguments- Returns:
- the allocated object
- Throws:
JavaScriptException
- if an uncaught exception
occurred while executing the constructor