public class NativeRegExp extends IdScriptableObject
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
ScriptableObject.KeyComparator, ScriptableObject.LambdaGetterFunction, ScriptableObject.LambdaSetterFunction| Modifier and Type | Field and Description |
|---|---|
static int |
JSREG_DOTALL |
static int |
JSREG_FOLD |
static int |
JSREG_GLOB |
static int |
JSREG_MULTILINE |
static int |
JSREG_STICKY |
static int |
JSREG_UNICODE |
static int |
MATCH |
static int |
PREFIX |
static int |
TEST |
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTNOT_FOUND| Modifier and Type | Method and Description |
|---|---|
Object |
execIdCall(IdFunctionObject f,
Context cx,
Scriptable scope,
Scriptable thisObj,
Object[] args)
'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable
should be returned.
|
protected int |
findInstanceIdInfo(String s)
Map name to id of instance property.
|
protected int |
findPrototypeId(String s) |
protected int |
findPrototypeId(Symbol k) |
String |
getClassName()
Return the name of the class.
|
int |
getFlags() |
protected String |
getInstanceIdName(int id)
Map id back to property name it defines.
|
protected Object |
getInstanceIdValue(int id)
Get id value. * If id value is constant, descendant can call cacheIdValue to store * value in
the permanent cache. * Default implementation creates IdFunctionObject instance for given id
* and cache its value
|
protected int |
getMaxInstanceId()
Get maximum id findInstanceIdInfo can generate.
|
String |
getTypeOf()
Gets the value to be returned by the typeof operator called on this object.
|
protected void |
initPrototypeId(int id) |
static boolean |
parseRegExpUnicodeEscapeSequence(org.htmlunit.corejs.javascript.regexp.CompilerState state,
org.htmlunit.corejs.javascript.regexp.NativeRegExp.ParserParameters params) |
static boolean |
parseUnicodePropertyEscape(org.htmlunit.corejs.javascript.regexp.CompilerState state) |
static int |
readRegExpUnicodeEscapeSequence(org.htmlunit.corejs.javascript.regexp.CompilerState state,
org.htmlunit.corejs.javascript.regexp.NativeRegExp.ParserParameters params) |
static Object |
regExpExec(Scriptable regexp,
String string,
Context cx,
Scriptable scope) |
protected void |
setInstanceIdAttributes(int id,
int attr)
Update the attributes of the given instance property.
|
protected void |
setInstanceIdValue(int id,
Object value)
Set or delete id value.
|
String |
toString() |
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, get, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributesapplyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChangeForSlot, checkPropertyDefinition, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizecreateSlotMappublic static final int JSREG_GLOB
public static final int JSREG_FOLD
public static final int JSREG_MULTILINE
public static final int JSREG_DOTALL
public static final int JSREG_STICKY
public static final int JSREG_UNICODE
public static final int TEST
public static final int MATCH
public static final int PREFIX
public String getClassName()
ScriptableObjectThis is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
getClassName in interface ScriptablegetClassName in class ScriptableObjectpublic String getTypeOf()
getTypeOf in class ScriptableObjectScriptableObject.getTypeOf()public static int readRegExpUnicodeEscapeSequence(org.htmlunit.corejs.javascript.regexp.CompilerState state,
org.htmlunit.corejs.javascript.regexp.NativeRegExp.ParserParameters params)
public static boolean parseRegExpUnicodeEscapeSequence(org.htmlunit.corejs.javascript.regexp.CompilerState state,
org.htmlunit.corejs.javascript.regexp.NativeRegExp.ParserParameters params)
public static boolean parseUnicodePropertyEscape(org.htmlunit.corejs.javascript.regexp.CompilerState state)
public int getFlags()
protected int getMaxInstanceId()
IdScriptableObjectgetMaxInstanceId in class IdScriptableObjectprotected int findInstanceIdInfo(String s)
IdScriptableObjectIdScriptableObject.instanceIdInfo(int, int).findInstanceIdInfo in class IdScriptableObjectprotected String getInstanceIdName(int id)
IdScriptableObjectgetInstanceIdName in class IdScriptableObjectprotected Object getInstanceIdValue(int id)
IdScriptableObjectgetInstanceIdValue in class IdScriptableObjectprotected void setInstanceIdValue(int id,
Object value)
IdScriptableObjectsetInstanceIdValue in class IdScriptableObjectprotected void setInstanceIdAttributes(int id,
int attr)
IdScriptableObjectsetInstanceIdAttributes in class IdScriptableObjectid - the instance property idattr - the new attribute bitsetprotected void initPrototypeId(int id)
initPrototypeId in class IdScriptableObjectpublic Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
IdScriptableObjectexecIdCall in interface IdFunctionCallexecIdCall in class IdScriptableObjectpublic static Object regExpExec(Scriptable regexp, String string, Context cx, Scriptable scope)
protected int findPrototypeId(Symbol k)
findPrototypeId in class IdScriptableObjectprotected int findPrototypeId(String s)
findPrototypeId in class IdScriptableObjectCopyright © 2025 HtmlUnit. All rights reserved.