Class ScriptRuntime
- java.lang.Object
- 
- org.mozilla.javascript.ScriptRuntime
 
- 
- Direct Known Subclasses:
- OptRuntime
 
 public class ScriptRuntime extends java.lang.ObjectThis is the class that implements the runtime.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static interfaceScriptRuntime.MessageProviderThis is an interface defining a message provider.static classScriptRuntime.StringIdOrIndexHelper to return a string or an integer.
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.Class<?>BigIntegerClassstatic java.lang.Class<?>BooleanClassstatic java.lang.Class<?>ByteClassstatic java.lang.Class<?>CharacterClassstatic java.lang.Class<?>ClassClassstatic java.lang.Class<?>ContextClassstatic java.lang.Class<?>ContextFactoryClassstatic java.lang.Class<?>DateClassstatic java.lang.Class<?>DoubleClassstatic java.lang.Object[]emptyArgsstatic java.lang.String[]emptyStringsstatic intENUMERATE_ARRAYstatic intENUMERATE_ARRAY_NO_ITERATORstatic intENUMERATE_KEYSstatic intENUMERATE_KEYS_NO_ITERATORstatic intENUMERATE_VALUESstatic intENUMERATE_VALUES_IN_ORDERstatic intENUMERATE_VALUES_NO_ITERATORstatic java.lang.Class<?>FloatClassstatic java.lang.Class<?>FunctionClassstatic java.lang.Class<?>IntegerClassstatic java.lang.Class<?>LongClassstatic ScriptRuntime.MessageProvidermessageProviderstatic doubleNaNstatic java.lang.DoubleNaNobjstatic doublenegativeZerostatic java.lang.DoublenegativeZeroObjstatic java.lang.Class<?>NumberClassstatic java.lang.Class<?>ObjectClassstatic java.lang.Class<Scriptable>ScriptableClassstatic java.lang.Class<?>ScriptableObjectClassstatic java.lang.Class<?>ShortClassstatic java.lang.Class<?>StringClassstatic java.lang.DoublezeroObj
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedScriptRuntime()No instances should be created.
 - 
Method SummaryAll Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.CharSequenceadd(java.lang.CharSequence val1, java.lang.Object val2)Deprecated.Useadd(Object, Object, Context)insteadstatic java.lang.CharSequenceadd(java.lang.Object val1, java.lang.CharSequence val2)Deprecated.Useadd(Object, Object, Context)insteadstatic java.lang.Objectadd(java.lang.Object val1, java.lang.Object val2, Context cx)static voidaddInstructionCount(Context cx, int instructionsToAdd)static java.lang.ObjectapplyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)Function.prototype.apply and Function.prototype.callstatic java.lang.StringbigIntToString(java.math.BigInteger n, int base)static Scriptablebind(Context cx, Scriptable scope, java.lang.String id)Returns the object in the scope chain that has a given property.static java.lang.NumberbitwiseAND(java.lang.Number val1, java.lang.Number val2)static java.lang.NumberbitwiseNOT(java.lang.Number val)static java.lang.NumberbitwiseOR(java.lang.Number val1, java.lang.Number val2)static java.lang.NumberbitwiseXOR(java.lang.Number val1, java.lang.Number val2)static java.lang.Objectcall(Context cx, java.lang.Object fun, java.lang.Object thisArg, java.lang.Object[] args, Scriptable scope)Deprecated.The method is only present for compatibility.static java.lang.ObjectcallIterator(java.lang.Object obj, Context cx, Scriptable scope)Given an object, get the "Symbol.iterator" element, throw a TypeError if it is not present, then call the result, (throwing a TypeError if the result is not a function), and return that result, whatever it is.static RefcallRef(Callable function, Scriptable thisObj, java.lang.Object[] args, Context cx)Perform function call in reference context.static java.lang.ObjectcallSpecial(Context cx, Callable fun, Scriptable thisObj, java.lang.Object[] args, Scriptable scope, Scriptable callerThis, int callType, java.lang.String filename, int lineNumber)static java.util.Optional<java.lang.Double>canonicalNumericIndexString(java.lang.String arg)If "arg" is a "canonical numeric index," which means any number constructed from a string that doesn't have extra whitespace or non-standard formatting, return it -- otherwise return an empty option.static RegExpProxycheckRegExpProxy(Context cx)static booleancompare(java.lang.Number val1, java.lang.Number val2, int op)static booleancompare(java.lang.Object val1, java.lang.Object val2, int op)static EcmaErrorconstructError(java.lang.String error, java.lang.String message)static EcmaErrorconstructError(java.lang.String error, java.lang.String message, int lineNumberDelta)static EcmaErrorconstructError(java.lang.String error, java.lang.String message, java.lang.String sourceName, int lineNumber, java.lang.String lineSource, int columnNumber)static ScriptablecreateArrowFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, java.lang.Object[] args, boolean isStrict, boolean argsHasRest)static ScriptablecreateArrowFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args, boolean isStrict)Deprecated.static ScriptablecreateFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, java.lang.Object[] args, boolean isStrict, boolean argsHasRest)static ScriptablecreateFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args)Deprecated.static ScriptablecreateFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args, boolean isStrict)Deprecated.static java.lang.Objectdelete(java.lang.Object obj, java.lang.Object id, Context cx)Deprecated.static java.lang.Objectdelete(java.lang.Object obj, java.lang.Object id, Context cx, boolean isName)Deprecated.static java.lang.Objectdelete(java.lang.Object obj, java.lang.Object id, Context cx, Scriptable scope, boolean isName)The delete operatorstatic booleandeleteObjectElem(Scriptable target, java.lang.Object elem, Context cx)static java.lang.Numberdivide(java.lang.Number val1, java.lang.Number val2)static java.lang.ObjectdoTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)Deprecated.static java.lang.ObjectdoTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, boolean isTopLevelStrict)static java.lang.ObjectelemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, int incrDecrMask)Deprecated.static java.lang.ObjectelemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, Scriptable scope, int incrDecrMask)static voidenterActivationFunction(Context cx, Scriptable scope)static ScriptableenterDotQuery(java.lang.Object value, Scriptable scope)static ScriptableenterWith(java.lang.Object obj, Context cx, Scriptable scope)static java.lang.ObjectenumId(java.lang.Object enumObj, Context cx)static java.lang.ObjectenumInit(java.lang.Object value, Context cx, boolean enumValues)Deprecated.UseenumInit(Object, Context, Scriptable, int)insteadstatic java.lang.ObjectenumInit(java.lang.Object value, Context cx, int enumType)Deprecated.UseenumInit(Object, Context, Scriptable, int)insteadstatic java.lang.ObjectenumInit(java.lang.Object value, Context cx, Scriptable scope, int enumType)static java.lang.BooleanenumNext(java.lang.Object enumObj)Deprecated.since 1.7.15.static java.lang.BooleanenumNext(java.lang.Object enumObj, Context cx)static java.lang.ObjectenumValue(java.lang.Object enumObj, Context cx)static booleaneq(java.lang.Object x, java.lang.Object y)Equalitystatic java.lang.StringescapeAttributeValue(java.lang.Object value, Context cx)Escapes the reserved characters in a value of an attributestatic java.lang.StringescapeString(java.lang.String s)static java.lang.StringescapeString(java.lang.String s, char escapeQuote)For escaping strings printed by object and array literals; not quite the same as 'escape.'static java.lang.StringescapeTextValue(java.lang.Object value, Context cx)Escapes the reserved characters in a value of a text nodestatic java.lang.ObjectevalSpecial(Context cx, Scriptable scope, java.lang.Object thisArg, java.lang.Object[] args, java.lang.String filename, int lineNumber)The eval function property of the global object.static voidexitActivationFunction(Context cx)static java.lang.Numberexponentiate(java.lang.Number val1, java.lang.Number val2)static java.lang.Object[]getArrayElements(Scriptable object)static CallablegetElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx)Deprecated.static CallablegetElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope)Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static ScriptableObjectgetGlobal(Context cx)static ScriptableObjectgetLibraryScopeOrNull(Scriptable scope)static java.lang.StringgetMessage(java.lang.String messageId, java.lang.Object[] arguments)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessage0(java.lang.String messageId)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessage1(java.lang.String messageId, java.lang.Object arg1)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessage2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessage3(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessage4(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)Deprecated.UsegetMessageById(String messageId, Object... args)insteadstatic java.lang.StringgetMessageById(java.lang.String messageId, java.lang.Object... args)static CallablegetNameFunctionAndThis(java.lang.String name, Context cx, Scriptable scope)Prepare for calling name(...): return function corresponding to name and make current top scope available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static java.lang.ObjectgetObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx)Deprecated.static java.lang.ObjectgetObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope)Call obj.[[Get]](id)static java.lang.ObjectgetObjectElem(Scriptable obj, java.lang.Object elem, Context cx)static java.lang.ObjectgetObjectIndex(java.lang.Object obj, double dblIndex, Context cx)Deprecated.static java.lang.ObjectgetObjectIndex(java.lang.Object obj, double dblIndex, Context cx, Scriptable scope)A cheaper and less general version of the above for well-known argument types.static java.lang.ObjectgetObjectIndex(Scriptable obj, int index, Context cx)static java.lang.ObjectgetObjectProp(java.lang.Object obj, java.lang.String property, Context cx)Deprecated.static java.lang.ObjectgetObjectProp(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)Version of getObjectElem when elem is a valid JS identifier name.static java.lang.ObjectgetObjectProp(Scriptable obj, java.lang.String property, Context cx)static java.lang.ObjectgetObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx)Deprecated.static java.lang.ObjectgetObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)static CallablegetPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx)Deprecated.static CallablegetPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static RegExpProxygetRegExpProxy(Context cx)static ScriptablegetTemplateLiteralCallSite(Context cx, Scriptable scope, java.lang.Object[] strings, int index)static ScriptablegetTopCallScope(Context cx)static java.lang.ObjectgetTopLevelProp(Scriptable scope, java.lang.String id)static CallablegetValueFunctionAndThis(java.lang.Object value, Context cx)Prepare for calling <expression>(...): return function corresponding to <expression> and make parent scope of the function available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj.static booleanhasObjectElem(Scriptable target, java.lang.Object elem, Context cx)static booleanhasTopCall(Context cx)static booleanin(java.lang.Object a, java.lang.Object b, Context cx)The in operator.static longindexFromString(java.lang.String str)Return -1L if str is not an index, or the index value as lower 32 bits of the result.static voidinitFunction(Context cx, Scriptable scope, NativeFunction function, int type, boolean fromEvalCode)static ScriptableObjectinitSafeStandardObjects(Context cx, ScriptableObject scope, boolean sealed)static voidinitScript(NativeFunction funObj, Scriptable thisObj, Context cx, Scriptable scope, boolean evalScript)static ScriptableObjectinitStandardObjects(Context cx, ScriptableObject scope, boolean sealed)static booleaninstanceOf(java.lang.Object a, java.lang.Object b, Context cx)The instanceof operator.static booleanisArrayObject(java.lang.Object obj)static booleanisIteratorDone(Context cx, java.lang.Object result)Given an iterator result, return true if and only if there is a "done" property that's true.static booleanisJSLineTerminator(int c)static booleanisJSWhitespaceOrLineTerminator(int c)static booleanisNaN(java.lang.Object n)static booleanisObject(java.lang.Object value)static booleanisPrimitive(java.lang.Object obj)static booleanisRhinoRuntimeType(java.lang.Class<?> cl)static booleanjsDelegatesTo(Scriptable lhs, Scriptable rhs)Delegates tostatic ScriptablelastStoredScriptable(Context cx)static longlastUint32Result(Context cx)static ScriptableleaveDotQuery(Scriptable scope)static ScriptableleaveWith(Scriptable scope)static java.lang.NumberleftShift(java.lang.Number val1, java.lang.Number val2)static booleanloadFromIterable(Context cx, Scriptable scope, java.lang.Object arg1, java.util.function.BiConsumer<java.lang.Object,java.lang.Object> setter)This is used to handle all the special cases that are required when invoking Object.fromEntries or constructing a NativeMap or NativeWeakMap from an iterable.static RefmemberRef(java.lang.Object obj, java.lang.Object namespace, java.lang.Object elem, Context cx, int memberTypeFlags)static RefmemberRef(java.lang.Object obj, java.lang.Object elem, Context cx, int memberTypeFlags)static java.lang.Numbermultiply(java.lang.Number val1, java.lang.Number val2)static java.lang.Objectname(Context cx, Scriptable scope, java.lang.String name)Looks up a name in the scope chain and returns its value.static java.lang.ObjectnameIncrDecr(Scriptable scopeChain, java.lang.String id, int incrDecrMask)Deprecated.UsenameIncrDecr(Scriptable, String, Context, int)insteadstatic java.lang.ObjectnameIncrDecr(Scriptable scopeChain, java.lang.String id, Context cx, int incrDecrMask)static RefnameRef(java.lang.Object namespace, java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags)static RefnameRef(java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags)static java.lang.Numbernegate(java.lang.Number val)static ScriptablenewArrayLiteral(java.lang.Object[] objects, int[] skipIndices, Context cx, Scriptable scope)static ScriptablenewBuiltinObject(Context cx, Scriptable scope, TopLevel.Builtins type, java.lang.Object[] args)static ScriptablenewCatchScope(java.lang.Throwable t, Scriptable lastCatchScope, java.lang.String exceptionName, Context cx, Scriptable scope)static ScriptablenewObject(java.lang.Object fun, Context cx, Scriptable scope, java.lang.Object[] args)Operator new.static ScriptablenewObject(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.Object[] args)static ScriptablenewObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope)static ScriptablenewObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, Context cx, Scriptable scope)Deprecated.static java.lang.ObjectnewSpecial(Context cx, java.lang.Object fun, java.lang.Object[] args, Scriptable scope, int callType)static java.lang.RuntimeExceptionnotFoundError(Scriptable object, java.lang.String property)static java.lang.RuntimeExceptionnotFunctionError(java.lang.Object value)static java.lang.RuntimeExceptionnotFunctionError(java.lang.Object value, java.lang.Object messageHelper)static java.lang.RuntimeExceptionnotFunctionError(java.lang.Object obj, java.lang.Object value, java.lang.String propertyName)static java.lang.StringnumberToString(double d, int base)static java.lang.Object[]padAndRestArguments(Context cx, Scriptable scope, java.lang.Object[] args, int argCount)Helper function for builtin objects that use the varargs form.static java.lang.Object[]padArguments(java.lang.Object[] args, int count)Helper function for builtin objects that use the varargs form.static java.lang.ObjectpropIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, int incrDecrMask)Deprecated.static java.lang.ObjectpropIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, Scriptable scope, int incrDecrMask)static EcmaErrorrangeError(java.lang.String message)static EcmaErrorrangeErrorById(java.lang.String messageId, java.lang.Object... args)static java.lang.ObjectrefDel(Ref ref, Context cx)static java.lang.ObjectrefGet(Ref ref, Context cx)static java.lang.ObjectrefIncrDecr(Ref ref, Context cx, int incrDecrMask)Deprecated.UserefIncrDecr(Ref, Context, Scriptable, int)insteadstatic java.lang.ObjectrefIncrDecr(Ref ref, Context cx, Scriptable scope, int incrDecrMask)static java.lang.ObjectrefSet(Ref ref, java.lang.Object value, Context cx)Deprecated.UserefSet(Ref, Object, Context, Scriptable)insteadstatic java.lang.ObjectrefSet(Ref ref, java.lang.Object value, Context cx, Scriptable scope)static java.lang.Numberremainder(java.lang.Number val1, java.lang.Number val2)static booleansame(java.lang.Object x, java.lang.Object y)static booleansameZero(java.lang.Object x, java.lang.Object y)Implement "SameValueZero" from ECMA 7.2.9static java.lang.ObjectsearchDefaultNamespace(Context cx)static voidsetBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type)static java.lang.ObjectsetConst(Scriptable bound, java.lang.Object value, Context cx, java.lang.String id)static java.lang.ObjectsetDefaultNamespace(java.lang.Object namespace, Context cx)static voidsetEnumNumbers(java.lang.Object enumObj, boolean enumNumbers)static voidsetFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope)static voidsetFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope, boolean es6GeneratorFunction)static voidsetFunctionProtoAndParent(BaseFunction fn, Scriptable scope)Deprecated.static voidsetFunctionProtoAndParent(BaseFunction fn, Scriptable scope, boolean es6GeneratorFunction)Deprecated.static java.lang.ObjectsetName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id)static java.lang.ObjectsetObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx)Deprecated.static java.lang.ObjectsetObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx, Scriptable scope)Call obj.[[Put]](id, value)static java.lang.ObjectsetObjectElem(Scriptable obj, java.lang.Object elem, java.lang.Object value, Context cx)static java.lang.ObjectsetObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx)Deprecated.static java.lang.ObjectsetObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx, Scriptable scope)A cheaper and less general version of the above for well-known argument types.static java.lang.ObjectsetObjectIndex(Scriptable obj, int index, java.lang.Object value, Context cx)static java.lang.ObjectsetObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx)Deprecated.static java.lang.ObjectsetObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx, Scriptable scope)Version of setObjectElem when elem is a valid JS identifier name.static java.lang.ObjectsetObjectProp(Scriptable obj, java.lang.String property, java.lang.Object value, Context cx)static voidsetObjectProtoAndParent(ScriptableObject object, Scriptable scope)static voidsetRegExpProxy(Context cx, RegExpProxy proxy)static booleanshallowEq(java.lang.Object x, java.lang.Object y)static java.lang.NumbersignedRightShift(java.lang.Number val1, java.lang.Number val2)static RefspecialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx)Deprecated.UsespecialRef(Object, String, Context, Scriptable)insteadstatic RefspecialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx, Scriptable scope)static voidstoreUint32Result(Context cx, long value)static java.lang.ObjectstrictSetName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id)static java.lang.Numbersubtract(java.lang.Number val1, java.lang.Number val2)static EcmaErrorsyntaxError(java.lang.String message)static EcmaErrorsyntaxErrorById(java.lang.String messageId, java.lang.Object... args)static longtestUint32String(java.lang.String str)If str is a decimal presentation of Uint32 value, return it as long.static JavaScriptExceptionthrowCustomError(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.String message)Equivalent to executing "new $constructorName(message, sourceFileName, sourceLineNo)" from JavaScript.static JavaScriptExceptionthrowError(Context cx, Scriptable scope, java.lang.String message)Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript.static java.math.BigIntegertoBigInt(java.lang.Object val)Convert the value to a BigInt.static java.math.BigIntegertoBigInt(java.lang.String s)ToBigInt applied to the String typestatic booleantoBoolean(java.lang.Object val)Convert the value to a boolean.static java.lang.CharSequencetoCharSequence(java.lang.Object val)static inttoIndex(java.lang.Object val)static inttoInt32(double d)static inttoInt32(java.lang.Object val)See ECMA 9.5.static inttoInt32(java.lang.Object[] args, int index)static doubletoInteger(double d)static doubletoInteger(java.lang.Object val)See ECMA 9.4.static doubletoInteger(java.lang.Object[] args, int index)static ScriptabletoIterator(Context cx, Scriptable scope, Scriptable obj, boolean keyOnly)static longtoLength(java.lang.Object[] args, int index)static doubletoNumber(java.lang.Object val)Convert the value to a number.static doubletoNumber(java.lang.Object[] args, int index)static doubletoNumber(java.lang.String s)ToNumber applied to the String typestatic java.lang.NumbertoNumeric(java.lang.Object val)Convert the value to a Numeric (Number or BigInt).static ScriptabletoObject(Context cx, Scriptable scope, java.lang.Object val)Convert the value to an object.static ScriptabletoObject(Context cx, Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass)Deprecated.UsetoObject(Context, Scriptable, Object)instead.static ScriptabletoObject(Scriptable scope, java.lang.Object val)static ScriptabletoObject(Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass)Deprecated.UsetoObject(Scriptable, Object)instead.static ScriptabletoObjectOrNull(Context cx, java.lang.Object obj)Deprecated.UsetoObjectOrNull(Context, Object, Scriptable)insteadstatic ScriptabletoObjectOrNull(Context cx, java.lang.Object obj, Scriptable scope)static java.lang.ObjecttoPrimitive(java.lang.Object val)static java.lang.ObjecttoPrimitive(java.lang.Object val, java.lang.Class<?> typeHint)static java.lang.StringtoString(double val)Optimized version of toString(Object) for numbers.static java.lang.StringtoString(java.lang.Object val)Convert the value to a string.static java.lang.StringtoString(java.lang.Object[] args, int index)static ScriptRuntime.StringIdOrIndextoStringIdOrIndex(java.lang.Object id)If id is a number or a string presentation of an int32 value, then id the returning StringIdOrIndex has the index set, otherwise the stringId is set.static chartoUint16(java.lang.Object val)See ECMA 9.7.static longtoUint32(double d)See ECMA 9.6.static longtoUint32(java.lang.Object val)static EcmaErrortypeError(java.lang.String message)static EcmaErrortypeError0(java.lang.String messageId)Deprecated.UsetypeErrorById(String messageId, Object... args)insteadstatic EcmaErrortypeError1(java.lang.String messageId, java.lang.Object arg1)Deprecated.UsetypeErrorById(String messageId, Object... args)insteadstatic EcmaErrortypeError2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)Deprecated.UsetypeErrorById(String messageId, Object... args)insteadstatic EcmaErrortypeError3(java.lang.String messageId, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)Deprecated.UsetypeErrorById(String messageId, Object... args)insteadstatic EcmaErrortypeErrorById(java.lang.String messageId, java.lang.Object... args)static BaseFunctiontypeErrorThrower()Deprecated.static BaseFunctiontypeErrorThrower(Context cx)Returns representation of the [[ThrowTypeError]] object.static java.lang.Stringtypeof(java.lang.Object value)The typeof operatorstatic java.lang.StringtypeofName(Scriptable scope, java.lang.String id)The typeof operator that correctly handles the undefined casestatic java.lang.RuntimeExceptionundefCallError(java.lang.Object object, java.lang.Object id)static java.lang.RuntimeExceptionundefReadError(java.lang.Object object, java.lang.Object id)static java.lang.RuntimeExceptionundefWriteError(java.lang.Object object, java.lang.Object id, java.lang.Object value)static java.lang.ObjectupdateDotQuery(boolean value, Scriptable scope)static java.lang.BooleanwrapBoolean(boolean b)static ScriptablewrapException(java.lang.Throwable t, Scriptable scope, Context cx)static java.lang.IntegerwrapInt(int i)static java.lang.NumberwrapNumber(double x)static ScriptablewrapRegExp(Context cx, Scriptable scope, java.lang.Object compiled)
 
- 
- 
- 
Field Detail- 
BooleanClasspublic static final java.lang.Class<?> BooleanClass 
 - 
ByteClasspublic static final java.lang.Class<?> ByteClass 
 - 
CharacterClasspublic static final java.lang.Class<?> CharacterClass 
 - 
ClassClasspublic static final java.lang.Class<?> ClassClass 
 - 
DoubleClasspublic static final java.lang.Class<?> DoubleClass 
 - 
FloatClasspublic static final java.lang.Class<?> FloatClass 
 - 
IntegerClasspublic static final java.lang.Class<?> IntegerClass 
 - 
LongClasspublic static final java.lang.Class<?> LongClass 
 - 
NumberClasspublic static final java.lang.Class<?> NumberClass 
 - 
ObjectClasspublic static final java.lang.Class<?> ObjectClass 
 - 
ShortClasspublic static final java.lang.Class<?> ShortClass 
 - 
StringClasspublic static final java.lang.Class<?> StringClass 
 - 
DateClasspublic static final java.lang.Class<?> DateClass 
 - 
BigIntegerClasspublic static final java.lang.Class<?> BigIntegerClass 
 - 
ContextClasspublic static final java.lang.Class<?> ContextClass 
 - 
ContextFactoryClasspublic static final java.lang.Class<?> ContextFactoryClass 
 - 
FunctionClasspublic static final java.lang.Class<?> FunctionClass 
 - 
ScriptableObjectClasspublic static final java.lang.Class<?> ScriptableObjectClass 
 - 
ScriptableClasspublic static final java.lang.Class<Scriptable> ScriptableClass 
 - 
NaNpublic static final double NaN - See Also:
- Constant Field Values
 
 - 
NaNobjpublic static final java.lang.Double NaNobj 
 - 
negativeZeropublic static final double negativeZero 
 - 
zeroObjpublic static final java.lang.Double zeroObj 
 - 
negativeZeroObjpublic static final java.lang.Double negativeZeroObj 
 - 
ENUMERATE_KEYSpublic static final int ENUMERATE_KEYS - See Also:
- Constant Field Values
 
 - 
ENUMERATE_VALUESpublic static final int ENUMERATE_VALUES - See Also:
- Constant Field Values
 
 - 
ENUMERATE_ARRAYpublic static final int ENUMERATE_ARRAY - See Also:
- Constant Field Values
 
 - 
ENUMERATE_KEYS_NO_ITERATORpublic static final int ENUMERATE_KEYS_NO_ITERATOR - See Also:
- Constant Field Values
 
 - 
ENUMERATE_VALUES_NO_ITERATORpublic static final int ENUMERATE_VALUES_NO_ITERATOR - See Also:
- Constant Field Values
 
 - 
ENUMERATE_ARRAY_NO_ITERATORpublic static final int ENUMERATE_ARRAY_NO_ITERATOR - See Also:
- Constant Field Values
 
 - 
ENUMERATE_VALUES_IN_ORDERpublic static final int ENUMERATE_VALUES_IN_ORDER - See Also:
- Constant Field Values
 
 - 
messageProviderpublic static final ScriptRuntime.MessageProvider messageProvider 
 - 
emptyArgspublic static final java.lang.Object[] emptyArgs 
 - 
emptyStringspublic static final java.lang.String[] emptyStrings 
 
- 
 - 
Method Detail- 
typeErrorThrower@Deprecated public static BaseFunction typeErrorThrower() Deprecated.Returns representation of the [[ThrowTypeError]] object. See ECMA 5 spec, 13.2.3
 - 
typeErrorThrowerpublic static BaseFunction typeErrorThrower(Context cx) Returns representation of the [[ThrowTypeError]] object. See ECMA 5 spec, 13.2.3
 - 
isRhinoRuntimeTypepublic static boolean isRhinoRuntimeType(java.lang.Class<?> cl) 
 - 
initSafeStandardObjectspublic static ScriptableObject initSafeStandardObjects(Context cx, ScriptableObject scope, boolean sealed) 
 - 
initStandardObjectspublic static ScriptableObject initStandardObjects(Context cx, ScriptableObject scope, boolean sealed) 
 - 
getLibraryScopeOrNullpublic static ScriptableObject getLibraryScopeOrNull(Scriptable scope) 
 - 
isJSLineTerminatorpublic static boolean isJSLineTerminator(int c) 
 - 
isJSWhitespaceOrLineTerminatorpublic static boolean isJSWhitespaceOrLineTerminator(int c) 
 - 
wrapBooleanpublic static java.lang.Boolean wrapBoolean(boolean b) 
 - 
wrapIntpublic static java.lang.Integer wrapInt(int i) 
 - 
wrapNumberpublic static java.lang.Number wrapNumber(double x) 
 - 
toBooleanpublic static boolean toBoolean(java.lang.Object val) Convert the value to a boolean.See ECMA 9.2. 
 - 
toNumberpublic static double toNumber(java.lang.Object val) Convert the value to a number.See ECMA 9.3. 
 - 
toNumberpublic static double toNumber(java.lang.Object[] args, int index)
 - 
toNumberpublic static double toNumber(java.lang.String s) ToNumber applied to the String typeSee the #sec-tonumber-applied-to-the-string-type section of ECMA 
 - 
toBigIntpublic static java.math.BigInteger toBigInt(java.lang.Object val) Convert the value to a BigInt.
 - 
toBigIntpublic static java.math.BigInteger toBigInt(java.lang.String s) ToBigInt applied to the String type
 - 
toNumericpublic static java.lang.Number toNumeric(java.lang.Object val) Convert the value to a Numeric (Number or BigInt).toNumber does not allow java.math.BigInteger. toNumeric allows java.math.BigInteger. See ECMA 7.1.3 (v11.0). 
 - 
toIndexpublic static int toIndex(java.lang.Object val) 
 - 
padArgumentspublic static java.lang.Object[] padArguments(java.lang.Object[] args, int count)Helper function for builtin objects that use the varargs form. ECMA function formal arguments are undefined if not supplied; this function pads the argument array out to the expected length, if necessary.
 - 
padAndRestArgumentspublic static java.lang.Object[] padAndRestArguments(Context cx, Scriptable scope, java.lang.Object[] args, int argCount) Helper function for builtin objects that use the varargs form. ECMA function formal arguments are undefined if not supplied; this function pads the argument array out to the expected length, if necessary. Also the rest parameter array construction is done here.
 - 
escapeStringpublic static java.lang.String escapeString(java.lang.String s) 
 - 
escapeStringpublic static java.lang.String escapeString(java.lang.String s, char escapeQuote)For escaping strings printed by object and array literals; not quite the same as 'escape.'
 - 
toCharSequencepublic static java.lang.CharSequence toCharSequence(java.lang.Object val) 
 - 
toStringpublic static java.lang.String toString(java.lang.Object val) Convert the value to a string.See ECMA 9.8. 
 - 
toStringpublic static java.lang.String toString(java.lang.Object[] args, int index)
 - 
toStringpublic static java.lang.String toString(double val) Optimized version of toString(Object) for numbers.
 - 
numberToStringpublic static java.lang.String numberToString(double d, int base)
 - 
bigIntToStringpublic static java.lang.String bigIntToString(java.math.BigInteger n, int base)
 - 
toObjectpublic static Scriptable toObject(Scriptable scope, java.lang.Object val) 
 - 
toObjectOrNull@Deprecated public static Scriptable toObjectOrNull(Context cx, java.lang.Object obj) Deprecated.UsetoObjectOrNull(Context, Object, Scriptable)insteadWarning: This doesn't allow to resolve primitive prototype properly when many top scopes are involved
 - 
toObjectOrNullpublic static Scriptable toObjectOrNull(Context cx, java.lang.Object obj, Scriptable scope) - Parameters:
- scope- the scope that should be used to resolve primitive prototype
 
 - 
toObject@Deprecated public static Scriptable toObject(Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass) Deprecated.UsetoObject(Scriptable, Object)instead.
 - 
toObjectpublic static Scriptable toObject(Context cx, Scriptable scope, java.lang.Object val) Convert the value to an object.See ECMA 9.9. 
 - 
toObject@Deprecated public static Scriptable toObject(Context cx, Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass) Deprecated.UsetoObject(Context, Scriptable, Object)instead.
 - 
call@Deprecated public static java.lang.Object call(Context cx, java.lang.Object fun, java.lang.Object thisArg, java.lang.Object[] args, Scriptable scope) Deprecated.The method is only present for compatibility.
 - 
newObjectpublic static Scriptable newObject(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.Object[] args) 
 - 
newBuiltinObjectpublic static Scriptable newBuiltinObject(Context cx, Scriptable scope, TopLevel.Builtins type, java.lang.Object[] args) 
 - 
toIntegerpublic static double toInteger(java.lang.Object val) See ECMA 9.4.
 - 
toIntegerpublic static double toInteger(double d) 
 - 
toIntegerpublic static double toInteger(java.lang.Object[] args, int index)
 - 
toLengthpublic static long toLength(java.lang.Object[] args, int index)
 - 
toInt32public static int toInt32(java.lang.Object val) See ECMA 9.5.
 - 
toInt32public static int toInt32(java.lang.Object[] args, int index)
 - 
toInt32public static int toInt32(double d) 
 - 
toUint32public static long toUint32(double d) See ECMA 9.6.- Returns:
- long value representing 32 bits unsigned integer
 
 - 
toUint32public static long toUint32(java.lang.Object val) 
 - 
toUint16public static char toUint16(java.lang.Object val) See ECMA 9.7.
 - 
canonicalNumericIndexStringpublic static java.util.Optional<java.lang.Double> canonicalNumericIndexString(java.lang.String arg) If "arg" is a "canonical numeric index," which means any number constructed from a string that doesn't have extra whitespace or non-standard formatting, return it -- otherwise return an empty option. Defined in ECMA 7.1.21.
 - 
setDefaultNamespacepublic static java.lang.Object setDefaultNamespace(java.lang.Object namespace, Context cx)
 - 
searchDefaultNamespacepublic static java.lang.Object searchDefaultNamespace(Context cx) 
 - 
getTopLevelProppublic static java.lang.Object getTopLevelProp(Scriptable scope, java.lang.String id) 
 - 
indexFromStringpublic static long indexFromString(java.lang.String str) Return -1L if str is not an index, or the index value as lower 32 bits of the result. Note that the result needs to be cast to an int in order to produce the actual index, which may be negative.Note that this method on its own does not actually produce an index that is useful for an actual Object or Array, because it may be larger than Integer.MAX_VALUE. Most callers should instead call toStringOrIndex, which calls this under the covers. 
 - 
testUint32Stringpublic static long testUint32String(java.lang.String str) If str is a decimal presentation of Uint32 value, return it as long. Othewise return -1L;
 - 
toStringIdOrIndexpublic static ScriptRuntime.StringIdOrIndex toStringIdOrIndex(java.lang.Object id) If id is a number or a string presentation of an int32 value, then id the returning StringIdOrIndex has the index set, otherwise the stringId is set.
 - 
getObjectElem@Deprecated public static java.lang.Object getObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx)Deprecated.Call obj.[[Get]](id)
 - 
getObjectElempublic static java.lang.Object getObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope)Call obj.[[Get]](id)
 - 
getObjectElempublic static java.lang.Object getObjectElem(Scriptable obj, java.lang.Object elem, Context cx) 
 - 
getObjectProp@Deprecated public static java.lang.Object getObjectProp(java.lang.Object obj, java.lang.String property, Context cx)Deprecated.Version of getObjectElem when elem is a valid JS identifier name.
 - 
getObjectProppublic static java.lang.Object getObjectProp(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)Version of getObjectElem when elem is a valid JS identifier name.- Parameters:
- scope- the scope that should be used to resolve primitive prototype
 
 - 
getObjectProppublic static java.lang.Object getObjectProp(Scriptable obj, java.lang.String property, Context cx) 
 - 
getObjectPropNoWarn@Deprecated public static java.lang.Object getObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx)Deprecated.
 - 
getObjectPropNoWarnpublic static java.lang.Object getObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)
 - 
getObjectIndex@Deprecated public static java.lang.Object getObjectIndex(java.lang.Object obj, double dblIndex, Context cx)Deprecated.A cheaper and less general version of the above for well-known argument types.
 - 
getObjectIndexpublic static java.lang.Object getObjectIndex(java.lang.Object obj, double dblIndex, Context cx, Scriptable scope)A cheaper and less general version of the above for well-known argument types.
 - 
getObjectIndexpublic static java.lang.Object getObjectIndex(Scriptable obj, int index, Context cx) 
 - 
setObjectElem@Deprecated public static java.lang.Object setObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx)Deprecated.Call obj.[[Put]](id, value)
 - 
setObjectElempublic static java.lang.Object setObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx, Scriptable scope)Call obj.[[Put]](id, value)
 - 
setObjectElempublic static java.lang.Object setObjectElem(Scriptable obj, java.lang.Object elem, java.lang.Object value, Context cx) 
 - 
setObjectProp@Deprecated public static java.lang.Object setObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx)Deprecated.Version of setObjectElem when elem is a valid JS identifier name.
 - 
setObjectProppublic static java.lang.Object setObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx, Scriptable scope)Version of setObjectElem when elem is a valid JS identifier name.
 - 
setObjectProppublic static java.lang.Object setObjectProp(Scriptable obj, java.lang.String property, java.lang.Object value, Context cx) 
 - 
setObjectIndex@Deprecated public static java.lang.Object setObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx)Deprecated.A cheaper and less general version of the above for well-known argument types.
 - 
setObjectIndexpublic static java.lang.Object setObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx, Scriptable scope)A cheaper and less general version of the above for well-known argument types.
 - 
setObjectIndexpublic static java.lang.Object setObjectIndex(Scriptable obj, int index, java.lang.Object value, Context cx) 
 - 
deleteObjectElempublic static boolean deleteObjectElem(Scriptable target, java.lang.Object elem, Context cx) 
 - 
hasObjectElempublic static boolean hasObjectElem(Scriptable target, java.lang.Object elem, Context cx) 
 - 
refSet@Deprecated public static java.lang.Object refSet(Ref ref, java.lang.Object value, Context cx) Deprecated.UserefSet(Ref, Object, Context, Scriptable)instead
 - 
refSetpublic static java.lang.Object refSet(Ref ref, java.lang.Object value, Context cx, Scriptable scope) 
 - 
specialRef@Deprecated public static Ref specialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx) Deprecated.UsespecialRef(Object, String, Context, Scriptable)instead
 - 
specialRefpublic static Ref specialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx, Scriptable scope) 
 - 
delete@Deprecated public static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx)Deprecated.
 - 
delete@Deprecated public static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx, boolean isName)Deprecated.The delete operatorSee ECMA 11.4.1 In ECMA 0.19, the description of the delete operator (11.4.1) assumes that the [[Delete]] method returns a value. However, the definition of the [[Delete]] operator (8.6.2.5) does not define a return value. Here we assume that the [[Delete]] method doesn't return a value. 
 - 
deletepublic static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx, Scriptable scope, boolean isName)The delete operatorSee ECMA 11.4.1 In ECMA 0.19, the description of the delete operator (11.4.1) assumes that the [[Delete]] method returns a value. However, the definition of the [[Delete]] operator (8.6.2.5) does not define a return value. Here we assume that the [[Delete]] method doesn't return a value. 
 - 
namepublic static java.lang.Object name(Context cx, Scriptable scope, java.lang.String name) Looks up a name in the scope chain and returns its value.
 - 
bindpublic static Scriptable bind(Context cx, Scriptable scope, java.lang.String id) Returns the object in the scope chain that has a given property.The order of evaluation of an assignment expression involves evaluating the lhs to a reference, evaluating the rhs, and then modifying the reference with the rhs value. This method is used to 'bind' the given name to an object containing that property so that the side effects of evaluating the rhs do not affect which property is modified. Typically used in conjunction with setName. See ECMA 10.1.4 
 - 
setNamepublic static java.lang.Object setName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id) 
 - 
strictSetNamepublic static java.lang.Object strictSetName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id) 
 - 
setConstpublic static java.lang.Object setConst(Scriptable bound, java.lang.Object value, Context cx, java.lang.String id) 
 - 
toIteratorpublic static Scriptable toIterator(Context cx, Scriptable scope, Scriptable obj, boolean keyOnly) 
 - 
enumInit@Deprecated public static java.lang.Object enumInit(java.lang.Object value, Context cx, boolean enumValues)Deprecated.UseenumInit(Object, Context, Scriptable, int)insteadFor backwards compatibility with generated class files
 - 
enumInit@Deprecated public static java.lang.Object enumInit(java.lang.Object value, Context cx, int enumType)Deprecated.UseenumInit(Object, Context, Scriptable, int)instead
 - 
enumInitpublic static java.lang.Object enumInit(java.lang.Object value, Context cx, Scriptable scope, int enumType)
 - 
setEnumNumberspublic static void setEnumNumbers(java.lang.Object enumObj, boolean enumNumbers)
 - 
enumNext@Deprecated public static java.lang.Boolean enumNext(java.lang.Object enumObj) Deprecated.since 1.7.15. Use#enumNext(Context, Object)instead
 - 
enumNextpublic static java.lang.Boolean enumNext(java.lang.Object enumObj, Context cx)
 - 
enumIdpublic static java.lang.Object enumId(java.lang.Object enumObj, Context cx)
 - 
enumValuepublic static java.lang.Object enumValue(java.lang.Object enumObj, Context cx)
 - 
loadFromIterablepublic static boolean loadFromIterable(Context cx, Scriptable scope, java.lang.Object arg1, java.util.function.BiConsumer<java.lang.Object,java.lang.Object> setter) This is used to handle all the special cases that are required when invoking Object.fromEntries or constructing a NativeMap or NativeWeakMap from an iterable.- Parameters:
- cx- the current context
- scope- the current scope
- arg1- the iterable object.
- setter- the setter to set the value
- Returns:
- true, if arg1 was iterable.
 
 - 
getNameFunctionAndThispublic static Callable getNameFunctionAndThis(java.lang.String name, Context cx, Scriptable scope) Prepare for calling name(...): return function corresponding to name and make current top scope available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method.
 - 
getElemFunctionAndThis@Deprecated public static Callable getElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx) Deprecated.Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method.
 - 
getElemFunctionAndThispublic static Callable getElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope) Prepare for calling obj[id](...): return function corresponding to obj[id] and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method.
 - 
getPropFunctionAndThis@Deprecated public static Callable getPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx) Deprecated.Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method. Warning: this doesn't allow to resolve primitive prototype properly when many top scopes are involved.
 - 
getPropFunctionAndThispublic static Callable getPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope) Prepare for calling obj.property(...): return function corresponding to obj.property and make obj properly converted to Scriptable available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method.
 - 
getValueFunctionAndThispublic static Callable getValueFunctionAndThis(java.lang.Object value, Context cx) Prepare for calling <expression>(...): return function corresponding to <expression> and make parent scope of the function available as ScriptRuntime.lastStoredScriptable() for consumption as thisObj. The caller must call ScriptRuntime.lastStoredScriptable() immediately after calling this method.
 - 
callIteratorpublic static java.lang.Object callIterator(java.lang.Object obj, Context cx, Scriptable scope)Given an object, get the "Symbol.iterator" element, throw a TypeError if it is not present, then call the result, (throwing a TypeError if the result is not a function), and return that result, whatever it is.
 - 
isIteratorDonepublic static boolean isIteratorDone(Context cx, java.lang.Object result) Given an iterator result, return true if and only if there is a "done" property that's true.
 - 
callRefpublic static Ref callRef(Callable function, Scriptable thisObj, java.lang.Object[] args, Context cx) Perform function call in reference context. Should always return value that can be passed torefGet(Ref, Context)orrefSet(Ref, Object, Context)arbitrary number of times. The args array reference should not be stored in any object that is can be GC-reachable after this method returns. If this is necessary, store args.clone(), not args array itself.
 - 
newObjectpublic static Scriptable newObject(java.lang.Object fun, Context cx, Scriptable scope, java.lang.Object[] args) Operator new.See ECMA 11.2.2 
 - 
callSpecialpublic static java.lang.Object callSpecial(Context cx, Callable fun, Scriptable thisObj, java.lang.Object[] args, Scriptable scope, Scriptable callerThis, int callType, java.lang.String filename, int lineNumber) 
 - 
newSpecialpublic static java.lang.Object newSpecial(Context cx, java.lang.Object fun, java.lang.Object[] args, Scriptable scope, int callType) 
 - 
applyOrCallpublic static java.lang.Object applyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)Function.prototype.apply and Function.prototype.callSee Ecma 15.3.4.[34] 
 - 
evalSpecialpublic static java.lang.Object evalSpecial(Context cx, Scriptable scope, java.lang.Object thisArg, java.lang.Object[] args, java.lang.String filename, int lineNumber) The eval function property of the global object.See ECMA 15.1.2.1 
 - 
typeofpublic static java.lang.String typeof(java.lang.Object value) The typeof operator
 - 
typeofNamepublic static java.lang.String typeofName(Scriptable scope, java.lang.String id) The typeof operator that correctly handles the undefined case
 - 
isObjectpublic static boolean isObject(java.lang.Object value) 
 - 
addpublic static java.lang.Object add(java.lang.Object val1, java.lang.Object val2, Context cx)
 - 
add@Deprecated public static java.lang.CharSequence add(java.lang.CharSequence val1, java.lang.Object val2)Deprecated.Useadd(Object, Object, Context)insteadhttps://262.ecma-international.org/11.0/#sec-addition-operator-plus 5. Let lprim be ? ToPrimitive(lval). 7. If Type(lprim) is String or Type(rprim) is String, then a. Let lstr be ? ToString(lprim).Should call toPrimitive before toCharSequence 
 - 
add@Deprecated public static java.lang.CharSequence add(java.lang.Object val1, java.lang.CharSequence val2)Deprecated.Useadd(Object, Object, Context)insteadhttps://262.ecma-international.org/11.0/#sec-addition-operator-plus 6. Let rprim be ? ToPrimitive(rval). 7. If Type(lprim) is String or Type(rprim) is String, then b. Let rstr be ? ToString(rprim).Should call toPrimitive before toCharSequence 
 - 
subtractpublic static java.lang.Number subtract(java.lang.Number val1, java.lang.Number val2)
 - 
multiplypublic static java.lang.Number multiply(java.lang.Number val1, java.lang.Number val2)
 - 
dividepublic static java.lang.Number divide(java.lang.Number val1, java.lang.Number val2)
 - 
remainderpublic static java.lang.Number remainder(java.lang.Number val1, java.lang.Number val2)
 - 
exponentiatepublic static java.lang.Number exponentiate(java.lang.Number val1, java.lang.Number val2)
 - 
bitwiseANDpublic static java.lang.Number bitwiseAND(java.lang.Number val1, java.lang.Number val2)
 - 
bitwiseORpublic static java.lang.Number bitwiseOR(java.lang.Number val1, java.lang.Number val2)
 - 
bitwiseXORpublic static java.lang.Number bitwiseXOR(java.lang.Number val1, java.lang.Number val2)
 - 
leftShiftpublic static java.lang.Number leftShift(java.lang.Number val1, java.lang.Number val2)
 - 
signedRightShiftpublic static java.lang.Number signedRightShift(java.lang.Number val1, java.lang.Number val2)
 - 
bitwiseNOTpublic static java.lang.Number bitwiseNOT(java.lang.Number val) 
 - 
nameIncrDecr@Deprecated public static java.lang.Object nameIncrDecr(Scriptable scopeChain, java.lang.String id, int incrDecrMask) Deprecated.UsenameIncrDecr(Scriptable, String, Context, int)insteadThe method is only present for compatibility.
 - 
nameIncrDecrpublic static java.lang.Object nameIncrDecr(Scriptable scopeChain, java.lang.String id, Context cx, int incrDecrMask) 
 - 
propIncrDecr@Deprecated public static java.lang.Object propIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, int incrDecrMask)Deprecated.
 - 
propIncrDecrpublic static java.lang.Object propIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, Scriptable scope, int incrDecrMask)
 - 
elemIncrDecr@Deprecated public static java.lang.Object elemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, int incrDecrMask)Deprecated.
 - 
elemIncrDecrpublic static java.lang.Object elemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, Scriptable scope, int incrDecrMask)
 - 
refIncrDecr@Deprecated public static java.lang.Object refIncrDecr(Ref ref, Context cx, int incrDecrMask) Deprecated.UserefIncrDecr(Ref, Context, Scriptable, int)instead
 - 
refIncrDecrpublic static java.lang.Object refIncrDecr(Ref ref, Context cx, Scriptable scope, int incrDecrMask) 
 - 
negatepublic static java.lang.Number negate(java.lang.Number val) 
 - 
toPrimitivepublic static java.lang.Object toPrimitive(java.lang.Object val) 
 - 
toPrimitivepublic static java.lang.Object toPrimitive(java.lang.Object val, java.lang.Class<?> typeHint)
 - 
eqpublic static boolean eq(java.lang.Object x, java.lang.Object y)EqualitySee ECMA 11.9 
 - 
samepublic static boolean same(java.lang.Object x, java.lang.Object y)
 - 
sameZeropublic static boolean sameZero(java.lang.Object x, java.lang.Object y)Implement "SameValueZero" from ECMA 7.2.9
 - 
isNaNpublic static boolean isNaN(java.lang.Object n) 
 - 
isPrimitivepublic static boolean isPrimitive(java.lang.Object obj) 
 - 
shallowEqpublic static boolean shallowEq(java.lang.Object x, java.lang.Object y)
 - 
instanceOfpublic static boolean instanceOf(java.lang.Object a, java.lang.Object b, Context cx)The instanceof operator.- Returns:
- a instanceof b
 
 - 
jsDelegatesTopublic static boolean jsDelegatesTo(Scriptable lhs, Scriptable rhs) Delegates to- Returns:
- true iff rhs appears in lhs' proto chain
 
 - 
inpublic static boolean in(java.lang.Object a, java.lang.Object b, Context cx)The in operator.This is a new JS 1.3 language feature. The in operator mirrors the operation of the for .. in construct, and tests whether the rhs has the property given by the lhs. It is different from the for .. in construct in that: 
 - it doesn't perform ToObject on the right hand side
 - it returns true for DontEnum properties.- Parameters:
- a- the left hand operand
- b- the right hand operand
- Returns:
- true if property name or element number a is a property of b
 
 - 
comparepublic static boolean compare(java.lang.Object val1, java.lang.Object val2, int op)
 - 
comparepublic static boolean compare(java.lang.Number val1, java.lang.Number val2, int op)
 - 
getGlobalpublic static ScriptableObject getGlobal(Context cx) 
 - 
hasTopCallpublic static boolean hasTopCall(Context cx) 
 - 
getTopCallScopepublic static Scriptable getTopCallScope(Context cx) 
 - 
doTopCall@Deprecated public static java.lang.Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args) Deprecated.
 - 
doTopCallpublic static java.lang.Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args, boolean isTopLevelStrict) 
 - 
addInstructionCountpublic static void addInstructionCount(Context cx, int instructionsToAdd) 
 - 
initScriptpublic static void initScript(NativeFunction funObj, Scriptable thisObj, Context cx, Scriptable scope, boolean evalScript) 
 - 
createFunctionActivation@Deprecated public static Scriptable createFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args) Deprecated.
 - 
createFunctionActivation@Deprecated public static Scriptable createFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args, boolean isStrict) Deprecated.
 - 
createFunctionActivationpublic static Scriptable createFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, java.lang.Object[] args, boolean isStrict, boolean argsHasRest) 
 - 
createArrowFunctionActivation@Deprecated public static Scriptable createArrowFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args, boolean isStrict) Deprecated.
 - 
createArrowFunctionActivationpublic static Scriptable createArrowFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, java.lang.Object[] args, boolean isStrict, boolean argsHasRest) 
 - 
enterActivationFunctionpublic static void enterActivationFunction(Context cx, Scriptable scope) 
 - 
exitActivationFunctionpublic static void exitActivationFunction(Context cx) 
 - 
newCatchScopepublic static Scriptable newCatchScope(java.lang.Throwable t, Scriptable lastCatchScope, java.lang.String exceptionName, Context cx, Scriptable scope) 
 - 
wrapExceptionpublic static Scriptable wrapException(java.lang.Throwable t, Scriptable scope, Context cx) 
 - 
enterWithpublic static Scriptable enterWith(java.lang.Object obj, Context cx, Scriptable scope) 
 - 
leaveWithpublic static Scriptable leaveWith(Scriptable scope) 
 - 
enterDotQuerypublic static Scriptable enterDotQuery(java.lang.Object value, Scriptable scope) 
 - 
updateDotQuerypublic static java.lang.Object updateDotQuery(boolean value, Scriptable scope)
 - 
leaveDotQuerypublic static Scriptable leaveDotQuery(Scriptable scope) 
 - 
setFunctionProtoAndParent@Deprecated public static void setFunctionProtoAndParent(BaseFunction fn, Scriptable scope) Deprecated.
 - 
setFunctionProtoAndParentpublic static void setFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope) 
 - 
setFunctionProtoAndParent@Deprecated public static void setFunctionProtoAndParent(BaseFunction fn, Scriptable scope, boolean es6GeneratorFunction) Deprecated.
 - 
setFunctionProtoAndParentpublic static void setFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope, boolean es6GeneratorFunction) 
 - 
setObjectProtoAndParentpublic static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope) 
 - 
setBuiltinProtoAndParentpublic static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type) 
 - 
initFunctionpublic static void initFunction(Context cx, Scriptable scope, NativeFunction function, int type, boolean fromEvalCode) 
 - 
newArrayLiteralpublic static Scriptable newArrayLiteral(java.lang.Object[] objects, int[] skipIndices, Context cx, Scriptable scope) 
 - 
newObjectLiteral@Deprecated public static Scriptable newObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, Context cx, Scriptable scope) Deprecated.This method is here for backward compat with existing compiled code. It is called when an object literal is compiled. The next instance will be the version called from new code. This method only present for compatibility.
 - 
newObjectLiteralpublic static Scriptable newObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope) 
 - 
isArrayObjectpublic static boolean isArrayObject(java.lang.Object obj) 
 - 
getArrayElementspublic static java.lang.Object[] getArrayElements(Scriptable object) 
 - 
getMessage0@Deprecated public static java.lang.String getMessage0(java.lang.String messageId) Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessage1@Deprecated public static java.lang.String getMessage1(java.lang.String messageId, java.lang.Object arg1)Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessage2@Deprecated public static java.lang.String getMessage2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessage3@Deprecated public static java.lang.String getMessage3(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessage4@Deprecated public static java.lang.String getMessage4(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessage@Deprecated public static java.lang.String getMessage(java.lang.String messageId, java.lang.Object[] arguments)Deprecated.UsegetMessageById(String messageId, Object... args)instead
 - 
getMessageByIdpublic static java.lang.String getMessageById(java.lang.String messageId, java.lang.Object... args)
 - 
constructErrorpublic static EcmaError constructError(java.lang.String error, java.lang.String message) 
 - 
constructErrorpublic static EcmaError constructError(java.lang.String error, java.lang.String message, int lineNumberDelta) 
 - 
constructErrorpublic static EcmaError constructError(java.lang.String error, java.lang.String message, java.lang.String sourceName, int lineNumber, java.lang.String lineSource, int columnNumber) 
 - 
rangeErrorpublic static EcmaError rangeError(java.lang.String message) 
 - 
rangeErrorByIdpublic static EcmaError rangeErrorById(java.lang.String messageId, java.lang.Object... args) 
 - 
typeErrorpublic static EcmaError typeError(java.lang.String message) 
 - 
typeErrorByIdpublic static EcmaError typeErrorById(java.lang.String messageId, java.lang.Object... args) 
 - 
typeError0@Deprecated public static EcmaError typeError0(java.lang.String messageId) Deprecated.UsetypeErrorById(String messageId, Object... args)instead
 - 
typeError1@Deprecated public static EcmaError typeError1(java.lang.String messageId, java.lang.Object arg1) Deprecated.UsetypeErrorById(String messageId, Object... args)instead
 - 
typeError2@Deprecated public static EcmaError typeError2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2) Deprecated.UsetypeErrorById(String messageId, Object... args)instead
 - 
typeError3@Deprecated public static EcmaError typeError3(java.lang.String messageId, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) Deprecated.UsetypeErrorById(String messageId, Object... args)instead
 - 
undefReadErrorpublic static java.lang.RuntimeException undefReadError(java.lang.Object object, java.lang.Object id)
 - 
undefCallErrorpublic static java.lang.RuntimeException undefCallError(java.lang.Object object, java.lang.Object id)
 - 
undefWriteErrorpublic static java.lang.RuntimeException undefWriteError(java.lang.Object object, java.lang.Object id, java.lang.Object value)
 - 
notFoundErrorpublic static java.lang.RuntimeException notFoundError(Scriptable object, java.lang.String property) 
 - 
notFunctionErrorpublic static java.lang.RuntimeException notFunctionError(java.lang.Object value) 
 - 
notFunctionErrorpublic static java.lang.RuntimeException notFunctionError(java.lang.Object value, java.lang.Object messageHelper)
 - 
notFunctionErrorpublic static java.lang.RuntimeException notFunctionError(java.lang.Object obj, java.lang.Object value, java.lang.String propertyName)
 - 
syntaxErrorpublic static EcmaError syntaxError(java.lang.String message) 
 - 
syntaxErrorByIdpublic static EcmaError syntaxErrorById(java.lang.String messageId, java.lang.Object... args) 
 - 
getRegExpProxypublic static RegExpProxy getRegExpProxy(Context cx) 
 - 
setRegExpProxypublic static void setRegExpProxy(Context cx, RegExpProxy proxy) 
 - 
checkRegExpProxypublic static RegExpProxy checkRegExpProxy(Context cx) 
 - 
wrapRegExppublic static Scriptable wrapRegExp(Context cx, Scriptable scope, java.lang.Object compiled) 
 - 
getTemplateLiteralCallSitepublic static Scriptable getTemplateLiteralCallSite(Context cx, Scriptable scope, java.lang.Object[] strings, int index) 
 - 
escapeAttributeValuepublic static java.lang.String escapeAttributeValue(java.lang.Object value, Context cx)Escapes the reserved characters in a value of an attribute- Parameters:
- value- Unescaped text
- Returns:
- The escaped text
 
 - 
escapeTextValuepublic static java.lang.String escapeTextValue(java.lang.Object value, Context cx)Escapes the reserved characters in a value of a text node- Parameters:
- value- Unescaped text
- Returns:
- The escaped text
 
 - 
memberRefpublic static Ref memberRef(java.lang.Object obj, java.lang.Object elem, Context cx, int memberTypeFlags) 
 - 
memberRefpublic static Ref memberRef(java.lang.Object obj, java.lang.Object namespace, java.lang.Object elem, Context cx, int memberTypeFlags) 
 - 
nameRefpublic static Ref nameRef(java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags) 
 - 
nameRefpublic static Ref nameRef(java.lang.Object namespace, java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags) 
 - 
storeUint32Resultpublic static void storeUint32Result(Context cx, long value) 
 - 
lastUint32Resultpublic static long lastUint32Result(Context cx) 
 - 
lastStoredScriptablepublic static Scriptable lastStoredScriptable(Context cx) 
 - 
throwErrorpublic static JavaScriptException throwError(Context cx, Scriptable scope, java.lang.String message) Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript.- Parameters:
- cx- the current context
- scope- the current scope
- message- the message
- Returns:
- a JavaScriptException you should throw
 
 - 
throwCustomErrorpublic static JavaScriptException throwCustomError(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.String message) Equivalent to executing "new $constructorName(message, sourceFileName, sourceLineNo)" from JavaScript.- Parameters:
- cx- the current context
- scope- the current scope
- message- the message
- Returns:
- a JavaScriptException you should throw
 
 
- 
 
-