Class NativeRegExp
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.corejs.javascript.IdScriptableObject
-
- org.htmlunit.corejs.javascript.regexp.NativeRegExp
-
- All Implemented Interfaces:
java.io.Serializable,ConstProperties,DebuggableObject,IdFunctionCall,Scriptable,SymbolScriptable
- Direct Known Subclasses:
NativeRegExpCallable
public class NativeRegExp extends IdScriptableObject
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
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
-
Field Summary
Fields Modifier and Type Field Description private static intANCHOR_BOLprivate static booleandebugprivate static intId_compileprivate static intId_dotAllprivate static intId_execprivate static intId_flagsprivate static intId_globalprivate static intId_ignoreCaseprivate static intId_lastIndexprivate static intId_multilineprivate static intId_prefixprivate static intId_sourceprivate static intId_stickyprivate static intId_testprivate static intId_toSourceprivate static intId_toStringprivate static intINDEX_LENstatic intJSREG_DOTALLstatic intJSREG_FOLDstatic intJSREG_GLOBstatic intJSREG_MULTILINEstatic intJSREG_STICKY(package private) java.lang.ObjectlastIndexprivate intlastIndexAttrstatic intMATCHprivate static intMAX_INSTANCE_IDprivate static intMAX_PROTOTYPE_IDstatic intPREFIXprivate RECompiledreprivate static java.lang.ObjectREGEXP_TAGprivate static byteREOP_ALNUMprivate static byteREOP_ALTprivate static byteREOP_ALTPREREQprivate static byteREOP_ALTPREREQ2private static byteREOP_ALTPREREQiprivate static byteREOP_ASSERTprivate static byteREOP_ASSERT_NOTprivate static byteREOP_ASSERTNOTTESTprivate static byteREOP_ASSERTTESTprivate static byteREOP_BACKREFprivate static byteREOP_BOLprivate static byteREOP_CLASSprivate static byteREOP_DIGITprivate static byteREOP_DOTprivate static byteREOP_EMPTYprivate static byteREOP_ENDprivate static byteREOP_ENDCHILDprivate static byteREOP_EOLprivate static byteREOP_FLATprivate static byteREOP_FLAT1private static byteREOP_FLAT1iprivate static byteREOP_FLATiprivate static byteREOP_JUMPprivate static byteREOP_LPARENprivate static byteREOP_MINIMALOPTprivate static byteREOP_MINIMALPLUSprivate static byteREOP_MINIMALQUANTprivate static byteREOP_MINIMALREPEATprivate static byteREOP_MINIMALSTARprivate static byteREOP_NCLASSprivate static byteREOP_NONALNUMprivate static byteREOP_NONDIGITprivate static byteREOP_NONSPACEprivate static byteREOP_OPTprivate static byteREOP_PLUSprivate static byteREOP_QUANTprivate static byteREOP_REPEATprivate static byteREOP_RPARENprivate static byteREOP_SIMPLE_ENDprivate static byteREOP_SIMPLE_STARTprivate static byteREOP_SPACEprivate static byteREOP_STARprivate static byteREOP_UCFLAT1private static byteREOP_UCFLAT1iprivate static byteREOP_WBDRYprivate static byteREOP_WNONBDRYprivate static longserialVersionUIDprivate static intSymbolId_matchprivate static intSymbolId_searchstatic intTEST-
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
-
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description NativeRegExp()NativeRegExp(Scriptable scope, RECompiled regexpCompiled)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static voidaddCharacterRangeToCharSet(RECharSet cs, char c1, char c2)private static voidaddCharacterToCharSet(RECharSet cs, char c)private static intaddIndex(byte[] array, int pc, int index)private voidappendFlags(java.lang.StringBuilder buf)private static booleanbackrefMatcher(REGlobalData gData, int parenIndex, java.lang.String input, int end)private static booleancalculateBitmapSize(CompilerState state, RENode target, char[] src, int index, int end)private static booleanclassMatcher(REGlobalData gData, RECharSet charSet, char ch)(package private) Scriptablecompile(Context cx, Scriptable scope, java.lang.Object[] args)(package private) static RECompiledcompileRE(Context cx, java.lang.String str, java.lang.String global, boolean flat)private static voiddoFlat(CompilerState state, char c)private static chardowncase(char ch)private static intemitREBytecode(CompilerState state, RECompiled re, int pc, RENode t)private static java.lang.StringescapeRegExp(java.lang.Object src)java.lang.ObjectexecIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.(package private) java.lang.ObjectexecSub(Context cx, Scriptable scopeObj, java.lang.Object[] args, int matchType)private static booleanexecuteREBytecode(Context cx, REGlobalData gData, java.lang.String input, int end)(package private) java.lang.ObjectexecuteRegExp(Context cx, Scriptable scope, RegExpImpl res, java.lang.String str, int[] indexp, int matchType)protected intfindInstanceIdInfo(java.lang.String s)Map name to id of instance property.protected intfindPrototypeId(java.lang.String s)protected intfindPrototypeId(Symbol k)private static booleanflatNIMatcher(REGlobalData gData, int matchChars, int length, java.lang.String input, int end)private static booleanflatNMatcher(REGlobalData gData, int matchChars, int length, java.lang.String input, int end)java.lang.StringgetClassName()Return the name of the class.private static intgetDecimalValue(char c, CompilerState state, int maxValue, java.lang.String overflowMessageId)intgetFlags()private static RegExpImplgetImpl(Context cx)private static intgetIndex(byte[] array, int pc)protected java.lang.StringgetInstanceIdName(int id)Map id back to property name it defines.protected java.lang.ObjectgetInstanceIdValue(int id)Get id value.protected intgetMaxInstanceId()Get maximum id findInstanceIdInfo can generate.private static intgetOffset(byte[] array, int pc)java.lang.StringgetTypeOf()Gets the value to be returned by the typeof operator called on this object.static voidinit(Context cx, Scriptable scope, boolean sealed)protected voidinitPrototypeId(int id)private static booleanisControlLetter(char c)(package private) static booleanisDigit(char c)private static booleanisLineTerm(char c)private static booleanisREWhiteSpace(int c)private static booleanisWord(char c)private static booleanmatchRegExp(Context cx, REGlobalData gData, RECompiled re, java.lang.String input, int start, int end, boolean multiline)private static booleanparseAlternative(CompilerState state)private static booleanparseDisjunction(CompilerState state)private static booleanparseTerm(CompilerState state)private static REProgStatepopProgState(REGlobalData gData)private static voidprocessCharSet(REGlobalData gData, RECharSet charSet)private static voidprocessCharSetImpl(REGlobalData gData, RECharSet charSet)private static voidpushBackTrackState(REGlobalData gData, byte op, int pc)private static voidpushBackTrackState(REGlobalData gData, byte op, int pc, int cp, int continuationOp, int continuationPc)private static voidpushProgState(REGlobalData gData, int min, int max, int cp, REBackTrackData backTrackLastToSave, int continuationOp, int continuationPc)private static NativeRegExprealThis(Scriptable thisObj, IdFunctionObject f)private static booleanreopIsSimple(int op)private static voidreportError(java.lang.String messageId, java.lang.String arg)private static voidreportWarning(Context cx, java.lang.String messageId, java.lang.String arg)private static voidresolveForwardJump(byte[] array, int from, int pc)protected voidsetInstanceIdAttributes(int id, int attr)Update the attributes of the given instance property.protected voidsetInstanceIdValue(int id, java.lang.Object value)Set or delete id value.private voidsetLastIndex(java.lang.Object value)private static intsimpleMatch(REGlobalData gData, java.lang.String input, int op, byte[] program, int pc, int end, boolean updatecp)private static inttoASCIIHexDigit(int c)java.lang.StringtoString()private static charupcase(char ch)-
Methods inherited from class org.htmlunit.corejs.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, get, get, getAttributes, getAttributes, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, 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, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
REGEXP_TAG
private static final java.lang.Object REGEXP_TAG
-
JSREG_GLOB
public static final int JSREG_GLOB
- See Also:
- Constant Field Values
-
JSREG_FOLD
public static final int JSREG_FOLD
- See Also:
- Constant Field Values
-
JSREG_MULTILINE
public static final int JSREG_MULTILINE
- See Also:
- Constant Field Values
-
JSREG_DOTALL
public static final int JSREG_DOTALL
- See Also:
- Constant Field Values
-
JSREG_STICKY
public static final int JSREG_STICKY
- See Also:
- Constant Field Values
-
TEST
public static final int TEST
- See Also:
- Constant Field Values
-
MATCH
public static final int MATCH
- See Also:
- Constant Field Values
-
PREFIX
public static final int PREFIX
- See Also:
- Constant Field Values
-
debug
private static final boolean debug
- See Also:
- Constant Field Values
-
REOP_SIMPLE_START
private static final byte REOP_SIMPLE_START
- See Also:
- Constant Field Values
-
REOP_EMPTY
private static final byte REOP_EMPTY
- See Also:
- Constant Field Values
-
REOP_BOL
private static final byte REOP_BOL
- See Also:
- Constant Field Values
-
REOP_EOL
private static final byte REOP_EOL
- See Also:
- Constant Field Values
-
REOP_WBDRY
private static final byte REOP_WBDRY
- See Also:
- Constant Field Values
-
REOP_WNONBDRY
private static final byte REOP_WNONBDRY
- See Also:
- Constant Field Values
-
REOP_DOT
private static final byte REOP_DOT
- See Also:
- Constant Field Values
-
REOP_DIGIT
private static final byte REOP_DIGIT
- See Also:
- Constant Field Values
-
REOP_NONDIGIT
private static final byte REOP_NONDIGIT
- See Also:
- Constant Field Values
-
REOP_ALNUM
private static final byte REOP_ALNUM
- See Also:
- Constant Field Values
-
REOP_NONALNUM
private static final byte REOP_NONALNUM
- See Also:
- Constant Field Values
-
REOP_SPACE
private static final byte REOP_SPACE
- See Also:
- Constant Field Values
-
REOP_NONSPACE
private static final byte REOP_NONSPACE
- See Also:
- Constant Field Values
-
REOP_BACKREF
private static final byte REOP_BACKREF
- See Also:
- Constant Field Values
-
REOP_FLAT
private static final byte REOP_FLAT
- See Also:
- Constant Field Values
-
REOP_FLAT1
private static final byte REOP_FLAT1
- See Also:
- Constant Field Values
-
REOP_FLATi
private static final byte REOP_FLATi
- See Also:
- Constant Field Values
-
REOP_FLAT1i
private static final byte REOP_FLAT1i
- See Also:
- Constant Field Values
-
REOP_UCFLAT1
private static final byte REOP_UCFLAT1
- See Also:
- Constant Field Values
-
REOP_UCFLAT1i
private static final byte REOP_UCFLAT1i
- See Also:
- Constant Field Values
-
REOP_CLASS
private static final byte REOP_CLASS
- See Also:
- Constant Field Values
-
REOP_NCLASS
private static final byte REOP_NCLASS
- See Also:
- Constant Field Values
-
REOP_SIMPLE_END
private static final byte REOP_SIMPLE_END
- See Also:
- Constant Field Values
-
REOP_QUANT
private static final byte REOP_QUANT
- See Also:
- Constant Field Values
-
REOP_STAR
private static final byte REOP_STAR
- See Also:
- Constant Field Values
-
REOP_PLUS
private static final byte REOP_PLUS
- See Also:
- Constant Field Values
-
REOP_OPT
private static final byte REOP_OPT
- See Also:
- Constant Field Values
-
REOP_LPAREN
private static final byte REOP_LPAREN
- See Also:
- Constant Field Values
-
REOP_RPAREN
private static final byte REOP_RPAREN
- See Also:
- Constant Field Values
-
REOP_ALT
private static final byte REOP_ALT
- See Also:
- Constant Field Values
-
REOP_JUMP
private static final byte REOP_JUMP
- See Also:
- Constant Field Values
-
REOP_ASSERT
private static final byte REOP_ASSERT
- See Also:
- Constant Field Values
-
REOP_ASSERT_NOT
private static final byte REOP_ASSERT_NOT
- See Also:
- Constant Field Values
-
REOP_ASSERTTEST
private static final byte REOP_ASSERTTEST
- See Also:
- Constant Field Values
-
REOP_ASSERTNOTTEST
private static final byte REOP_ASSERTNOTTEST
- See Also:
- Constant Field Values
-
REOP_MINIMALSTAR
private static final byte REOP_MINIMALSTAR
- See Also:
- Constant Field Values
-
REOP_MINIMALPLUS
private static final byte REOP_MINIMALPLUS
- See Also:
- Constant Field Values
-
REOP_MINIMALOPT
private static final byte REOP_MINIMALOPT
- See Also:
- Constant Field Values
-
REOP_MINIMALQUANT
private static final byte REOP_MINIMALQUANT
- See Also:
- Constant Field Values
-
REOP_ENDCHILD
private static final byte REOP_ENDCHILD
- See Also:
- Constant Field Values
-
REOP_REPEAT
private static final byte REOP_REPEAT
- See Also:
- Constant Field Values
-
REOP_MINIMALREPEAT
private static final byte REOP_MINIMALREPEAT
- See Also:
- Constant Field Values
-
REOP_ALTPREREQ
private static final byte REOP_ALTPREREQ
- See Also:
- Constant Field Values
-
REOP_ALTPREREQi
private static final byte REOP_ALTPREREQi
- See Also:
- Constant Field Values
-
REOP_ALTPREREQ2
private static final byte REOP_ALTPREREQ2
- See Also:
- Constant Field Values
-
REOP_END
private static final byte REOP_END
- See Also:
- Constant Field Values
-
ANCHOR_BOL
private static final int ANCHOR_BOL
- See Also:
- Constant Field Values
-
INDEX_LEN
private static final int INDEX_LEN
- See Also:
- Constant Field Values
-
Id_lastIndex
private static final int Id_lastIndex
- See Also:
- Constant Field Values
-
Id_source
private static final int Id_source
- See Also:
- Constant Field Values
-
Id_flags
private static final int Id_flags
- See Also:
- Constant Field Values
-
Id_global
private static final int Id_global
- See Also:
- Constant Field Values
-
Id_ignoreCase
private static final int Id_ignoreCase
- See Also:
- Constant Field Values
-
Id_multiline
private static final int Id_multiline
- See Also:
- Constant Field Values
-
Id_dotAll
private static final int Id_dotAll
- See Also:
- Constant Field Values
-
Id_sticky
private static final int Id_sticky
- See Also:
- Constant Field Values
-
MAX_INSTANCE_ID
private static final int MAX_INSTANCE_ID
- See Also:
- Constant Field Values
-
Id_compile
private static final int Id_compile
- See Also:
- Constant Field Values
-
Id_toString
private static final int Id_toString
- See Also:
- Constant Field Values
-
Id_toSource
private static final int Id_toSource
- See Also:
- Constant Field Values
-
Id_exec
private static final int Id_exec
- See Also:
- Constant Field Values
-
Id_test
private static final int Id_test
- See Also:
- Constant Field Values
-
Id_prefix
private static final int Id_prefix
- See Also:
- Constant Field Values
-
SymbolId_match
private static final int SymbolId_match
- See Also:
- Constant Field Values
-
SymbolId_search
private static final int SymbolId_search
- See Also:
- Constant Field Values
-
MAX_PROTOTYPE_ID
private static final int MAX_PROTOTYPE_ID
- See Also:
- Constant Field Values
-
re
private RECompiled re
-
lastIndex
java.lang.Object lastIndex
-
lastIndexAttr
private int lastIndexAttr
-
-
Constructor Detail
-
NativeRegExp
NativeRegExp(Scriptable scope, RECompiled regexpCompiled)
-
NativeRegExp
NativeRegExp()
-
-
Method Detail
-
init
public static void init(Context cx, Scriptable scope, boolean sealed)
-
getClassName
public java.lang.String getClassName()
Description copied from class:ScriptableObjectReturn the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassNamein interfaceScriptable- Specified by:
getClassNamein classScriptableObject
-
getTypeOf
public java.lang.String getTypeOf()
Gets the value to be returned by the typeof operator called on this object.- Overrides:
getTypeOfin classScriptableObject- Returns:
- "object"
- See Also:
ScriptableObject.getTypeOf()
-
compile
Scriptable compile(Context cx, Scriptable scope, java.lang.Object[] args)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
appendFlags
private void appendFlags(java.lang.StringBuilder buf)
-
getImpl
private static RegExpImpl getImpl(Context cx)
-
escapeRegExp
private static java.lang.String escapeRegExp(java.lang.Object src)
-
execSub
java.lang.Object execSub(Context cx, Scriptable scopeObj, java.lang.Object[] args, int matchType)
-
compileRE
static RECompiled compileRE(Context cx, java.lang.String str, java.lang.String global, boolean flat)
-
isDigit
static boolean isDigit(char c)
-
isWord
private static boolean isWord(char c)
-
isControlLetter
private static boolean isControlLetter(char c)
-
isLineTerm
private static boolean isLineTerm(char c)
-
isREWhiteSpace
private static boolean isREWhiteSpace(int c)
-
upcase
private static char upcase(char ch)
-
downcase
private static char downcase(char ch)
-
toASCIIHexDigit
private static int toASCIIHexDigit(int c)
-
parseDisjunction
private static boolean parseDisjunction(CompilerState state)
-
parseAlternative
private static boolean parseAlternative(CompilerState state)
-
calculateBitmapSize
private static boolean calculateBitmapSize(CompilerState state, RENode target, char[] src, int index, int end)
-
doFlat
private static void doFlat(CompilerState state, char c)
-
getDecimalValue
private static int getDecimalValue(char c, CompilerState state, int maxValue, java.lang.String overflowMessageId)
-
parseTerm
private static boolean parseTerm(CompilerState state)
-
resolveForwardJump
private static void resolveForwardJump(byte[] array, int from, int pc)
-
getOffset
private static int getOffset(byte[] array, int pc)
-
addIndex
private static int addIndex(byte[] array, int pc, int index)
-
getIndex
private static int getIndex(byte[] array, int pc)
-
emitREBytecode
private static int emitREBytecode(CompilerState state, RECompiled re, int pc, RENode t)
-
pushProgState
private static void pushProgState(REGlobalData gData, int min, int max, int cp, REBackTrackData backTrackLastToSave, int continuationOp, int continuationPc)
-
popProgState
private static REProgState popProgState(REGlobalData gData)
-
pushBackTrackState
private static void pushBackTrackState(REGlobalData gData, byte op, int pc)
-
pushBackTrackState
private static void pushBackTrackState(REGlobalData gData, byte op, int pc, int cp, int continuationOp, int continuationPc)
-
flatNMatcher
private static boolean flatNMatcher(REGlobalData gData, int matchChars, int length, java.lang.String input, int end)
-
flatNIMatcher
private static boolean flatNIMatcher(REGlobalData gData, int matchChars, int length, java.lang.String input, int end)
-
backrefMatcher
private static boolean backrefMatcher(REGlobalData gData, int parenIndex, java.lang.String input, int end)
-
addCharacterToCharSet
private static void addCharacterToCharSet(RECharSet cs, char c)
-
addCharacterRangeToCharSet
private static void addCharacterRangeToCharSet(RECharSet cs, char c1, char c2)
-
processCharSet
private static void processCharSet(REGlobalData gData, RECharSet charSet)
-
processCharSetImpl
private static void processCharSetImpl(REGlobalData gData, RECharSet charSet)
-
classMatcher
private static boolean classMatcher(REGlobalData gData, RECharSet charSet, char ch)
-
reopIsSimple
private static boolean reopIsSimple(int op)
-
simpleMatch
private static int simpleMatch(REGlobalData gData, java.lang.String input, int op, byte[] program, int pc, int end, boolean updatecp)
-
executeREBytecode
private static boolean executeREBytecode(Context cx, REGlobalData gData, java.lang.String input, int end)
-
matchRegExp
private static boolean matchRegExp(Context cx, REGlobalData gData, RECompiled re, java.lang.String input, int start, int end, boolean multiline)
-
executeRegExp
java.lang.Object executeRegExp(Context cx, Scriptable scope, RegExpImpl res, java.lang.String str, int[] indexp, int matchType)
-
getFlags
public int getFlags()
-
reportWarning
private static void reportWarning(Context cx, java.lang.String messageId, java.lang.String arg)
-
reportError
private static void reportError(java.lang.String messageId, java.lang.String arg)
-
getMaxInstanceId
protected int getMaxInstanceId()
Description copied from class:IdScriptableObjectGet maximum id findInstanceIdInfo can generate.- Overrides:
getMaxInstanceIdin classIdScriptableObject
-
findInstanceIdInfo
protected int findInstanceIdInfo(java.lang.String s)
Description copied from class:IdScriptableObjectMap name to id of instance property. Should return 0 if not found or the result ofIdScriptableObject.instanceIdInfo(int, int).- Overrides:
findInstanceIdInfoin classIdScriptableObject
-
getInstanceIdName
protected java.lang.String getInstanceIdName(int id)
Description copied from class:IdScriptableObjectMap id back to property name it defines.- Overrides:
getInstanceIdNamein classIdScriptableObject
-
getInstanceIdValue
protected java.lang.Object getInstanceIdValue(int id)
Description copied from class:IdScriptableObjectGet 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- Overrides:
getInstanceIdValuein classIdScriptableObject
-
setLastIndex
private void setLastIndex(java.lang.Object value)
-
setInstanceIdValue
protected void setInstanceIdValue(int id, java.lang.Object value)Description copied from class:IdScriptableObjectSet or delete id value. If value == NOT_FOUND , the implementation should make sure that the following getInstanceIdValue return NOT_FOUND.- Overrides:
setInstanceIdValuein classIdScriptableObject
-
setInstanceIdAttributes
protected void setInstanceIdAttributes(int id, int attr)Description copied from class:IdScriptableObjectUpdate the attributes of the given instance property. Classes which want to support changing property attributes via Object.defineProperty must override this method. The default implementation throws InternalError.- Overrides:
setInstanceIdAttributesin classIdScriptableObject- Parameters:
id- the instance property idattr- the new attribute bitset
-
initPrototypeId
protected void initPrototypeId(int id)
- Overrides:
initPrototypeIdin classIdScriptableObject
-
execIdCall
public java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
Description copied from class:IdScriptableObject'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.- Specified by:
execIdCallin interfaceIdFunctionCall- Overrides:
execIdCallin classIdScriptableObject
-
realThis
private static NativeRegExp realThis(Scriptable thisObj, IdFunctionObject f)
-
findPrototypeId
protected int findPrototypeId(Symbol k)
- Overrides:
findPrototypeIdin classIdScriptableObject
-
findPrototypeId
protected int findPrototypeId(java.lang.String s)
- Overrides:
findPrototypeIdin classIdScriptableObject
-
-