public class ScriptRuntime extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ScriptRuntime.LookupResult
This is returned from the various "getFooAndThis" methods, so it can return the result, the
appropriate "this" object, and the name of the property so that a proper exception can be
thrown if the result is not a function.
|
static interface |
ScriptRuntime.MessageProvider
This is an interface defining a message provider.
|
static class |
ScriptRuntime.StringIdOrIndex
Helper to return a string or an integer.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ScriptRuntime()
No instances should be created.
|
| Modifier and Type | Method and Description |
|---|---|
static CharSequence |
add(CharSequence val1,
Object val2)
Deprecated.
Use
add(Object, Object, Context) instead |
static Object |
add(Integer i1,
Integer i2) |
static CharSequence |
add(Object val1,
CharSequence val2)
Deprecated.
Use
add(Object, Object, Context) instead |
static Object |
add(Object lval,
Object rval,
Context cx) |
static void |
addInstructionCount(Context cx,
int instructionsToAdd) |
static long |
advanceStringIndex(String string,
long index,
boolean unicode)
Implements the abstract operation AdvanceStringIndex.
|
static Object |
applyOrCall(boolean isApply,
Context cx,
Scriptable scope,
Scriptable thisObj,
Object[] args)
Function.prototype.apply and Function.prototype.call
See Ecma 15.3.4.[34]
|
static String |
bigIntToString(BigInteger n,
int base) |
static Scriptable |
bind(Context cx,
Scriptable scope,
String id)
Returns the object in the scope chain that has a given property.
|
static double |
bitwiseAND(double val1,
double val2) |
static Number |
bitwiseAND(Number val1,
Number val2) |
static Number |
bitwiseNOT(Number val) |
static double |
bitwiseOR(double val1,
double val2) |
static Number |
bitwiseOR(Number val1,
Number val2) |
static double |
bitwiseXOR(double val1,
double val2) |
static Number |
bitwiseXOR(Number val1,
Number val2) |
static Object |
call(Context cx,
Object fun,
Object thisArg,
Object[] args,
Scriptable scope)
Deprecated.
The method is only present for compatibility.
|
static Object |
callIterator(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 Ref |
callRef(Callable function,
Scriptable thisObj,
Object[] args,
Context cx)
Perform function call in reference context.
|
static Object |
callSpecial(Context cx,
Callable fun,
Scriptable thisObj,
Object[] args,
Scriptable scope,
Scriptable callerThis,
int callType,
String filename,
int lineNumber,
boolean isOptionalChainingCall) |
static Optional<Double> |
canonicalNumericIndexString(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 RegExpProxy |
checkRegExpProxy(Context cx) |
static int |
clamp(int value,
int min,
int max)
Clamps value between min and max, inclusive.
|
static boolean |
compare(Number val1,
Number val2,
int op) |
static boolean |
compare(Object val1,
Object val2,
int op) |
static EcmaError |
constructError(String error,
String message) |
static EcmaError |
constructError(String error,
String message,
int lineNumberDelta) |
static EcmaError |
constructError(String error,
String message,
String sourceName,
int lineNumber,
String lineSource,
int columnNumber) |
static Scriptable |
createArrowFunctionActivation(NativeFunction funObj,
Context cx,
Scriptable scope,
Object[] args,
boolean isStrict,
boolean argsHasRest,
boolean requiresArgumentObject,
Scriptable homeObject) |
static Scriptable |
createArrowFunctionActivation(NativeFunction funObj,
Context cx,
Scriptable scope,
Object[] args,
boolean isStrict,
boolean argsHasRest,
Scriptable homeObject)
|
static Scriptable |
createArrowFunctionActivation(NativeFunction funObj,
Scriptable scope,
Object[] args,
boolean isStrict)
|
static Scriptable |
createFunctionActivation(NativeFunction funObj,
Context cx,
Scriptable scope,
Object[] args,
boolean isStrict,
boolean argsHasRest,
boolean requiresArgumentObject,
Scriptable homeObject) |
static Scriptable |
createFunctionActivation(NativeFunction funObj,
Context cx,
Scriptable scope,
Object[] args,
boolean isStrict,
boolean argsHasRest,
Scriptable homeObject)
|
static Scriptable |
createFunctionActivation(NativeFunction funObj,
Scriptable scope,
Object[] args)
|
static Scriptable |
createFunctionActivation(NativeFunction funObj,
Scriptable scope,
Object[] args,
boolean isStrict)
|
static Object |
delete(Object obj,
Object id,
Context cx)
Deprecated.
|
static Object |
delete(Object obj,
Object id,
Context cx,
boolean isName)
Deprecated.
|
static Object |
delete(Object obj,
Object id,
Context cx,
Scriptable scope,
boolean isName)
The delete operator
See 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.
|
static boolean |
deleteObjectElem(Scriptable target,
Object elem,
Context cx) |
static void |
discardLastStoredScriptable(Context cx)
Deprecated.
|
static Number |
divide(Number val1,
Number val2) |
static Object |
doTopCall(Callable callable,
Context cx,
Scriptable scope,
Scriptable thisObj,
Object[] args)
Deprecated.
|
static Object |
doTopCall(Callable callable,
Context cx,
Scriptable scope,
Scriptable thisObj,
Object[] args,
boolean isTopLevelStrict) |
static Object |
elemIncrDecr(Object obj,
Object index,
Context cx,
int incrDecrMask)
Deprecated.
|
static Object |
elemIncrDecr(Object obj,
Object index,
Context cx,
Scriptable scope,
int incrDecrMask) |
static void |
enterActivationFunction(Context cx,
Scriptable scope) |
static Scriptable |
enterDotQuery(Object value,
Scriptable scope) |
static Scriptable |
enterWith(Object obj,
Context cx,
Scriptable scope) |
static Object |
enumId(Object enumObj,
Context cx) |
static Object |
enumInit(Object value,
Context cx,
boolean enumValues)
Deprecated.
Use
enumInit(Object, Context, Scriptable, int) instead |
static Object |
enumInit(Object value,
Context cx,
int enumType)
Deprecated.
Use
enumInit(Object, Context, Scriptable, int) instead |
static Object |
enumInit(Object value,
Context cx,
Scriptable scope,
int enumType) |
static Boolean |
enumNext(Object enumObj)
Deprecated.
since 1.7.15. Use
enumNext(Object, Context) instead |
static Boolean |
enumNext(Object enumObj,
Context cx) |
static Object |
enumValue(Object enumObj,
Context cx) |
static boolean |
eq(Object x,
Object y)
Equality
See ECMA 11.9
|
static String |
escapeAttributeValue(Object value,
Context cx)
Escapes the reserved characters in a value of an attribute
|
static String |
escapeString(String s) |
static String |
escapeString(String s,
char escapeQuote)
For escaping strings printed by object and array literals; not quite the same as 'escape.'
|
static String |
escapeTextValue(Object value,
Context cx)
Escapes the reserved characters in a value of a text node
|
static Object |
evalSpecial(Context cx,
Scriptable scope,
Object thisArg,
Object[] args,
String filename,
int lineNumber)
The eval function property of the global object.
|
static void |
exitActivationFunction(Context cx) |
static Number |
exponentiate(Number val1,
Number val2) |
static void |
fillObjectLiteral(Scriptable object,
Object[] propertyIds,
Object[] propertyValues,
int[] getterSetters,
Context cx,
Scriptable scope) |
static Scriptable |
getApplyOrCallThis(Context cx,
Scriptable scope,
Object arg0,
int l,
Callable target) |
static Object[] |
getArrayElements(Scriptable object) |
static ScriptRuntime.LookupResult |
getElemAndThis(Object obj,
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 in the result.
|
static ScriptRuntime.LookupResult |
getElemAndThisOptional(Object obj,
Object elem,
Context cx,
Scriptable scope) |
static Callable |
getElemFunctionAndThis(Object obj,
Object elem,
Context cx)
Deprecated.
|
static Callable |
getElemFunctionAndThis(Object obj,
Object elem,
Context cx,
Scriptable scope)
Deprecated.
|
static Callable |
getElemFunctionAndThisOptional(Object obj,
Object elem,
Context cx,
Scriptable scope)
Deprecated.
|
static Function |
getExistingCtor(Context cx,
Scriptable scope,
String constructorName) |
static ScriptableObject |
getGlobal(Context cx) |
static ScriptableObject |
getLibraryScopeOrNull(Scriptable scope) |
static String |
getMessage(String messageId,
Object[] arguments)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessage0(String messageId)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessage1(String messageId,
Object arg1)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessage2(String messageId,
Object arg1,
Object arg2)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessage3(String messageId,
Object arg1,
Object arg2,
Object arg3)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessage4(String messageId,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Deprecated.
Use
getMessageById(String messageId, Object... args) instead |
static String |
getMessageById(String messageId,
Object... args) |
static ScriptRuntime.LookupResult |
getNameAndThis(String name,
Context cx,
Scriptable scope)
Prepare for calling name(...): return function corresponding to name and make current top
scope available as part of the result.
|
static ScriptRuntime.LookupResult |
getNameAndThisOptional(String name,
Context cx,
Scriptable scope) |
static Callable |
getNameFunctionAndThis(String name,
Context cx,
Scriptable scope)
Deprecated.
|
static Callable |
getNameFunctionAndThisOptional(String name,
Context cx,
Scriptable scope)
Deprecated.
|
static Object |
getObjectElem(Object obj,
Object elem,
Context cx)
Deprecated.
|
static Object |
getObjectElem(Object obj,
Object elem,
Context cx,
Scriptable scope)
Call obj.
|
static Object |
getObjectElem(Scriptable obj,
Object elem,
Context cx) |
static Object |
getObjectIndex(Object obj,
double dblIndex,
Context cx)
Deprecated.
|
static Object |
getObjectIndex(Object obj,
double dblIndex,
Context cx,
Scriptable scope)
A cheaper and less general version of the above for well-known argument types.
|
static Object |
getObjectIndex(Scriptable obj,
int index,
Context cx) |
static Object |
getObjectProp(Object obj,
String property,
Context cx)
Deprecated.
|
static Object |
getObjectProp(Object obj,
String property,
Context cx,
Scriptable scope)
Version of getObjectElem when elem is a valid JS identifier name.
|
static Object |
getObjectProp(Scriptable obj,
String property,
Context cx) |
static Object |
getObjectPropNoWarn(Object obj,
String property,
Context cx)
Deprecated.
|
static Object |
getObjectPropNoWarn(Object obj,
String property,
Context cx,
Scriptable scope) |
static ScriptRuntime.LookupResult |
getPropAndThis(Object obj,
String property,
Context cx,
Scriptable scope)
Prepare for calling obj.property(...): return function corresponding to obj.property and make
obj properly converted to Scriptable in the result.
|
static ScriptRuntime.LookupResult |
getPropAndThisOptional(Object obj,
String property,
Context cx,
Scriptable scope) |
static Callable |
getPropFunctionAndThis(Object obj,
String property,
Context cx)
Deprecated.
|
static Callable |
getPropFunctionAndThis(Object obj,
String property,
Context cx,
Scriptable scope)
Deprecated.
|
static Callable |
getPropFunctionAndThisOptional(Object obj,
String property,
Context cx,
Scriptable scope)
Deprecated.
|
static RegExpProxy |
getRegExpProxy(Context cx) |
static Object |
getSuperElem(Object superObject,
Object elem,
Context cx,
Scriptable scope,
Object thisObject) |
static Object |
getSuperElem(Object elem,
Scriptable superScriptable,
Scriptable thisScriptable) |
static Object |
getSuperIndex(Object superObject,
double dblIndex,
Context cx,
Scriptable scope,
Object thisObject) |
static Object |
getSuperProp(Object superObject,
String property,
Context cx,
Scriptable scope,
Object thisObject,
boolean noWarn) |
static Scriptable |
getTemplateLiteralCallSite(Context cx,
Scriptable scope,
Object[] strings,
int index) |
static Scriptable |
getTopCallScope(Context cx) |
static Object |
getTopLevelProp(Scriptable scope,
String id) |
static ScriptRuntime.LookupResult |
getValueAndThis(Object value,
Context cx)
Prepare for calling <expression>(...): return function corresponding to
<expression> and make parent scope of the function available in the result.
|
static ScriptRuntime.LookupResult |
getValueAndThisOptional(Object value,
Context cx) |
static Callable |
getValueFunctionAndThis(Object value,
Context cx)
Deprecated.
Use
getValueAndThis(Object, Context) instead |
static Callable |
getValueFunctionAndThisOptional(Object value,
Context cx)
Deprecated.
Use
getValueAndThisOptional(Object, Context) instead |
static boolean |
hasObjectElem(Scriptable target,
Object elem,
Context cx) |
static boolean |
hasTopCall(Context cx) |
static boolean |
in(Object a,
Object b,
Context cx)
The in operator.
|
static long |
indexFromString(String str)
Return -1L if str is not an index, or the index value as lower 32 bits of the result.
|
static void |
initFunction(Context cx,
Scriptable scope,
NativeFunction function,
int type,
boolean fromEvalCode) |
static ScriptableObject |
initSafeStandardObjects(Context cx,
ScriptableObject scope,
boolean sealed) |
static void |
initScript(NativeFunction funObj,
Scriptable thisObj,
Context cx,
Scriptable scope,
boolean evalScript) |
static ScriptableObject |
initStandardObjects(Context cx,
ScriptableObject scope,
boolean sealed) |
static boolean |
instanceOf(Object a,
Object b,
Context cx)
The instanceof operator.
|
static boolean |
isArrayLike(Scriptable obj) |
static boolean |
isArrayObject(Object obj) |
static boolean |
isIteratorDone(Context cx,
Object result)
Given an iterator result, return true if and only if there is a "done" property that's true.
|
static boolean |
isJSLineTerminator(int c) |
static boolean |
isJSWhitespaceOrLineTerminator(int c) |
static boolean |
isNaN(Object n) |
static boolean |
isObject(Object value) |
static boolean |
isPrimitive(Object obj) |
static boolean |
isRhinoRuntimeType(Class<?> cl) |
static boolean |
jsDelegatesTo(Scriptable lhs,
Scriptable rhs)
Delegates to
|
static Scriptable |
lastStoredScriptable(Context cx)
Deprecated.
|
static long |
lastUint32Result(Context cx) |
static Scriptable |
leaveDotQuery(Scriptable scope) |
static Scriptable |
leaveWith(Scriptable scope) |
static double |
leftShift(double val1,
double val2) |
static Number |
leftShift(Number val1,
Number val2) |
static boolean |
loadFromIterable(Context cx,
Scriptable scope,
Object arg1,
BiConsumer<Object,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 Ref |
memberRef(Object obj,
Object elem,
Context cx,
int memberTypeFlags) |
static Ref |
memberRef(Object obj,
Object namespace,
Object elem,
Context cx,
int memberTypeFlags) |
static Number |
multiply(Integer i1,
Integer i2) |
static Number |
multiply(Number val1,
Number val2) |
static Object |
name(Context cx,
Scriptable scope,
String name)
Looks up a name in the scope chain and returns its value.
|
static Object |
nameIncrDecr(Scriptable scopeChain,
String id,
Context cx,
int incrDecrMask) |
static Object |
nameIncrDecr(Scriptable scopeChain,
String id,
int incrDecrMask)
Deprecated.
Use
nameIncrDecr(Scriptable, String, Context, int) instead |
static Ref |
nameRef(Object name,
Context cx,
Scriptable scope,
int memberTypeFlags) |
static Ref |
nameRef(Object namespace,
Object name,
Context cx,
Scriptable scope,
int memberTypeFlags) |
static Number |
negate(Number val) |
static Scriptable |
newArrayLiteral(Object[] objects,
int[] skipIndices,
Context cx,
Scriptable scope) |
static Scriptable |
newBuiltinObject(Context cx,
Scriptable scope,
TopLevel.Builtins type,
Object[] args) |
static Scriptable |
newCatchScope(Throwable t,
Scriptable lastCatchScope,
String exceptionName,
Context cx,
Scriptable scope) |
static Scriptable |
newObject(Context cx,
Scriptable scope,
String constructorName,
Object[] args) |
static Scriptable |
newObject(Object ctor,
Context cx,
Scriptable scope,
Object[] args)
Operator new.
|
static Scriptable |
newObjectLiteral(Object[] propertyIds,
Object[] propertyValues,
Context cx,
Scriptable scope)
Deprecated.
|
static Scriptable |
newObjectLiteral(Object[] propertyIds,
Object[] propertyValues,
int[] getterSetters,
Context cx,
Scriptable scope)
|
static Object |
newSpecial(Context cx,
Object fun,
Object[] args,
Scriptable scope,
int callType) |
static RuntimeException |
notFoundError(Scriptable object,
String property) |
static RuntimeException |
notFunctionError(Object value) |
static RuntimeException |
notFunctionError(Object value,
Object messageHelper) |
static RuntimeException |
notFunctionError(Object obj,
Object value,
String propertyName) |
static String |
numberToString(double d,
int base) |
static Object[] |
padAndRestArguments(Context cx,
Scriptable scope,
Object[] args,
int argCount)
Helper function for builtin objects that use the varargs form.
|
static Object[] |
padArguments(Object[] args,
int count)
Helper function for builtin objects that use the varargs form.
|
static Object |
propIncrDecr(Object obj,
String id,
Context cx,
int incrDecrMask)
Deprecated.
|
static Object |
propIncrDecr(Object obj,
String id,
Context cx,
Scriptable scope,
int incrDecrMask) |
static EcmaError |
rangeError(String message) |
static EcmaError |
rangeErrorById(String messageId,
Object... args) |
static Object |
refDel(Ref ref,
Context cx) |
static EcmaError |
referenceError(String message) |
static Object |
refGet(Ref ref,
Context cx) |
static Object |
refIncrDecr(Ref ref,
Context cx,
int incrDecrMask)
Deprecated.
Use
refIncrDecr(Ref, Context, Scriptable, int) instead |
static Object |
refIncrDecr(Ref ref,
Context cx,
Scriptable scope,
int incrDecrMask) |
static Object |
refSet(Ref ref,
Object value,
Context cx)
Deprecated.
Use
refSet(Ref, Object, Context, Scriptable) instead |
static Object |
refSet(Ref ref,
Object value,
Context cx,
Scriptable scope) |
static Number |
remainder(Number val1,
Number val2) |
static boolean |
same(Object x,
Object y) |
static boolean |
sameZero(Object x,
Object y)
Implement "SameValueZero" from ECMA 7.2.9
|
static Object |
searchDefaultNamespace(Context cx) |
static void |
setBuiltinProtoAndParent(ScriptableObject object,
Scriptable scope,
TopLevel.Builtins type) |
static Object |
setConst(Scriptable bound,
Object value,
Context cx,
String id) |
static Object |
setDefaultNamespace(Object namespace,
Context cx) |
static void |
setEnumNumbers(Object enumObj,
boolean enumNumbers) |
static void |
setFunctionProtoAndParent(BaseFunction fn,
Context cx,
Scriptable scope) |
static void |
setFunctionProtoAndParent(BaseFunction fn,
Context cx,
Scriptable scope,
boolean es6GeneratorFunction) |
static void |
setFunctionProtoAndParent(BaseFunction fn,
Scriptable scope)
Deprecated.
|
static void |
setFunctionProtoAndParent(BaseFunction fn,
Scriptable scope,
boolean es6GeneratorFunction)
Deprecated.
|
static Object |
setName(Scriptable bound,
Object value,
Context cx,
Scriptable scope,
String id) |
static Object |
setObjectElem(Object obj,
Object elem,
Object value,
Context cx)
Deprecated.
|
static Object |
setObjectElem(Object obj,
Object elem,
Object value,
Context cx,
Scriptable scope)
Call obj.
|
static Object |
setObjectElem(Scriptable obj,
Object elem,
Object value,
Context cx) |
static Object |
setObjectIndex(Object obj,
double dblIndex,
Object value,
Context cx)
Deprecated.
|
static Object |
setObjectIndex(Object obj,
double dblIndex,
Object value,
Context cx,
Scriptable scope)
A cheaper and less general version of the above for well-known argument types.
|
static Object |
setObjectIndex(Scriptable obj,
int index,
Object value,
Context cx) |
static Object |
setObjectProp(Object obj,
String property,
Object value,
Context cx)
Deprecated.
|
static Object |
setObjectProp(Object obj,
String property,
Object value,
Context cx,
Scriptable scope)
Version of setObjectElem when elem is a valid JS identifier name.
|
static Object |
setObjectProp(Scriptable obj,
String property,
Object value,
Context cx) |
static void |
setObjectProtoAndParent(ScriptableObject object,
Scriptable scope) |
static void |
setRegExpProxy(Context cx,
RegExpProxy proxy) |
static Object |
setSuperElem(Object superObject,
Object elem,
Object value,
Context cx,
Scriptable scope,
Object thisObject)
Call super.
|
static Object |
setSuperElem(Scriptable superScriptable,
Scriptable thisScriptable,
Object elem,
Object value,
Context cx) |
static Object |
setSuperIndex(Object superObject,
double dblIndex,
Object value,
Context cx,
Scriptable scope,
Object thisObject)
A cheaper and less general version of the above for well-known argument types.
|
static Object |
setSuperIndex(Scriptable superScriptable,
Scriptable thisScriptable,
int index,
Object value,
Context cx) |
static Object |
setSuperProp(Object superObject,
String property,
Object value,
Context cx,
Scriptable scope,
Object thisObject)
Version of setSuperElem when elem is a valid JS identifier name.
|
static Object |
setSuperProp(Scriptable superScriptable,
Scriptable thisScriptable,
String property,
Object value,
Context cx) |
static boolean |
shallowEq(Object x,
Object y) |
static double |
signedRightShift(double val1,
double val2) |
static Number |
signedRightShift(Number val1,
Number val2) |
static Ref |
specialRef(Object obj,
String specialProperty,
Context cx)
Deprecated.
Use
specialRef(Object, String, Context, Scriptable) instead |
static Ref |
specialRef(Object obj,
String specialProperty,
Context cx,
Scriptable scope) |
static void |
storeUint32Result(Context cx,
long value) |
static Object |
strictSetName(Scriptable bound,
Object value,
Context cx,
Scriptable scope,
String id) |
static Number |
subtract(Integer i1,
Integer i2) |
static Number |
subtract(Number val1,
Number val2) |
static EcmaError |
syntaxError(String message) |
static EcmaError |
syntaxErrorById(String messageId,
Object... args) |
static long |
testUint32String(String str)
If str is a decimal presentation of Uint32 value, return it as long.
|
static JavaScriptException |
throwCustomError(Context cx,
Scriptable scope,
String constructorName,
String message)
Equivalent to executing "new $constructorName(message, sourceFileName, sourceLineNo)" from
JavaScript.
|
static void |
throwDeleteOnSuperPropertyNotAllowed()
Throws a ReferenceError "cannot delete a super property".
|
static JavaScriptException |
throwError(Context cx,
Scriptable scope,
String message)
Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript.
|
static BigInteger |
toBigInt(Object val)
Convert the value to a BigInt.
|
static BigInteger |
toBigInt(String s)
ToBigInt applied to the String type
|
static boolean |
toBoolean(Object val)
Convert the value to a boolean.
|
static CharSequence |
toCharSequence(Object val) |
static int |
toIndex(Object val) |
static int |
toInt32(double d) |
static int |
toInt32(Object val)
See ECMA 9.5.
|
static int |
toInt32(Object[] args,
int index) |
static double |
toInteger(double d) |
static double |
toInteger(Object val)
See ECMA 9.4.
|
static double |
toInteger(Object[] args,
int index) |
static double |
toIntegerOrInfinity(double d) |
static double |
toIntegerOrInfinity(Object val) |
static Scriptable |
toIterator(Context cx,
Scriptable scope,
Scriptable obj,
boolean keyOnly) |
static long |
toLength(Object value) |
static long |
toLength(Object[] args,
int index) |
static double |
toNumber(Object val)
Convert the value to a number.
|
static double |
toNumber(Object[] args,
int index) |
static double |
toNumber(String s)
ToNumber applied to the String type
See the #sec-tonumber-applied-to-the-string-type section of ECMA
|
static Number |
toNumeric(Object val)
Convert the value to a Numeric (Number or BigInt).
|
static Scriptable |
toObject(Context cx,
Scriptable scope,
Object val)
Convert the value to an object.
|
static Scriptable |
toObject(Context cx,
Scriptable scope,
Object val,
Class<?> staticClass)
Deprecated.
Use
toObject(Context, Scriptable, Object) instead. |
static Scriptable |
toObject(Scriptable scope,
Object val) |
static Scriptable |
toObject(Scriptable scope,
Object val,
Class<?> staticClass)
Deprecated.
Use
toObject(Scriptable, Object) instead. |
static Scriptable |
toObjectOrNull(Context cx,
Object obj)
Deprecated.
Use
toObjectOrNull(Context, Object, Scriptable) instead |
static Scriptable |
toObjectOrNull(Context cx,
Object obj,
Scriptable scope) |
static Object |
toPrimitive(Object input) |
static Object |
toPrimitive(Object input,
Class<?> preferredType)
The abstract operation ToPrimitive takes argument input (an ECMAScript language value) and
optional argument preferredType (string or number) and returns either a normal completion
containing an ECMAScript language value or a throw completion.
|
static String |
toString(double val)
Optimized version of toString(Object) for numbers.
|
static String |
toString(Object val)
Convert the value to a string.
|
static String |
toString(Object[] args,
int index) |
static ScriptRuntime.StringIdOrIndex |
toStringIdOrIndex(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 char |
toUint16(Object val)
See ECMA 9.7.
|
static long |
toUint32(double d)
See ECMA 9.6.
|
static long |
toUint32(Object val) |
static EcmaError |
typeError(String message) |
static EcmaError |
typeError0(String messageId)
Deprecated.
Use
typeErrorById(String messageId, Object... args) instead |
static EcmaError |
typeError1(String messageId,
Object arg1)
Deprecated.
Use
typeErrorById(String messageId, Object... args) instead |
static EcmaError |
typeError2(String messageId,
Object arg1,
Object arg2)
Deprecated.
Use
typeErrorById(String messageId, Object... args) instead |
static EcmaError |
typeError3(String messageId,
String arg1,
String arg2,
String arg3)
Deprecated.
Use
typeErrorById(String messageId, Object... args) instead |
static EcmaError |
typeErrorById(String messageId,
Object... args) |
static BaseFunction |
typeErrorThrower()
Deprecated.
|
static BaseFunction |
typeErrorThrower(Context cx)
Returns representation of the [[ThrowTypeError]] object.
|
static String |
typeof(Object value)
The typeof operator
|
static String |
typeofName(Scriptable scope,
String id)
The typeof operator that correctly handles the undefined case
|
static RuntimeException |
undefCallError(Object object,
Object id) |
static RuntimeException |
undefReadError(Object object,
Object id) |
static RuntimeException |
undefWriteError(Object object,
Object id,
Object value) |
static Object |
updateDotQuery(boolean value,
Scriptable scope) |
static Boolean |
wrapBoolean(boolean b) |
static Scriptable |
wrapException(Throwable t,
Scriptable scope,
Context cx) |
static Integer |
wrapInt(int i) |
static Number |
wrapNumber(double x) |
static Scriptable |
wrapRegExp(Context cx,
Scriptable scope,
Object compiled) |
public static final Class<?> BooleanClass
public static final Class<?> ByteClass
public static final Class<?> CharacterClass
public static final Class<?> ClassClass
public static final Class<?> DoubleClass
public static final Class<?> FloatClass
public static final Class<?> IntegerClass
public static final Class<?> LongClass
public static final Class<?> NumberClass
public static final Class<?> ObjectClass
public static final Class<?> ShortClass
public static final Class<?> StringClass
public static final Class<?> DateClass
public static final Class<?> BigIntegerClass
public static final Class<?> ContextClass
public static final Class<?> ContextFactoryClass
public static final Class<?> FunctionClass
public static final Class<?> ScriptableObjectClass
public static final Class<Scriptable> ScriptableClass
public static final double NaN
public static final Double NaNobj
public static final double negativeZero
public static final Integer zeroObj
public static final Double negativeZeroObj
public static final int ENUMERATE_KEYS
public static final int ENUMERATE_VALUES
public static final int ENUMERATE_ARRAY
public static final int ENUMERATE_KEYS_NO_ITERATOR
public static final int ENUMERATE_VALUES_NO_ITERATOR
public static final int ENUMERATE_ARRAY_NO_ITERATOR
public static final int ENUMERATE_VALUES_IN_ORDER
public static final ScriptRuntime.MessageProvider messageProvider
public static final Object[] emptyArgs
public static final String[] emptyStrings
@Deprecated public static BaseFunction typeErrorThrower()
typeErrorThrower(Context)BaseFunctionpublic static BaseFunction typeErrorThrower(Context cx)
public static boolean isRhinoRuntimeType(Class<?> cl)
public static ScriptableObject initSafeStandardObjects(Context cx, ScriptableObject scope, boolean sealed)
public static ScriptableObject initStandardObjects(Context cx, ScriptableObject scope, boolean sealed)
public static ScriptableObject getLibraryScopeOrNull(Scriptable scope)
public static boolean isJSLineTerminator(int c)
public static boolean isJSWhitespaceOrLineTerminator(int c)
public static Boolean wrapBoolean(boolean b)
public static Integer wrapInt(int i)
public static Number wrapNumber(double x)
public static boolean toBoolean(Object val)
See ECMA 9.2.
public static double toNumber(Object val)
See ECMA 9.3.
public static double toNumber(Object[] args, int index)
public static double toNumber(String s)
See the #sec-tonumber-applied-to-the-string-type section of ECMA
public static BigInteger toBigInt(Object val)
public static BigInteger toBigInt(String s)
public static Number toNumeric(Object val)
toNumber does not allow java.math.BigInteger. toNumeric allows java.math.BigInteger.
See ECMA 7.1.3 (v11.0).
public static int toIndex(Object val)
public static Object[] padArguments(Object[] args, int count)
public static Object[] padAndRestArguments(Context cx, Scriptable scope, Object[] args, int argCount)
public static String escapeString(String s, char escapeQuote)
public static CharSequence toCharSequence(Object val)
public static String toString(double val)
public static String numberToString(double d, int base)
public static String bigIntToString(BigInteger n, int base)
public static Scriptable toObject(Scriptable scope, Object val)
@Deprecated public static Scriptable toObjectOrNull(Context cx, Object obj)
toObjectOrNull(Context, Object, Scriptable) insteadpublic static Scriptable toObjectOrNull(Context cx, Object obj, Scriptable scope)
scope - the scope that should be used to resolve primitive prototype@Deprecated public static Scriptable toObject(Scriptable scope, Object val, Class<?> staticClass)
toObject(Scriptable, Object) instead.public static Scriptable toObject(Context cx, Scriptable scope, Object val)
See ECMA 9.9.
@Deprecated public static Scriptable toObject(Context cx, Scriptable scope, Object val, Class<?> staticClass)
toObject(Context, Scriptable, Object) instead.@Deprecated public static Object call(Context cx, Object fun, Object thisArg, Object[] args, Scriptable scope)
public static Scriptable newObject(Context cx, Scriptable scope, String constructorName, Object[] args)
public static Scriptable newBuiltinObject(Context cx, Scriptable scope, TopLevel.Builtins type, Object[] args)
public static double toInteger(Object val)
public static double toInteger(double d)
public static double toInteger(Object[] args, int index)
public static long toLength(Object[] args, int index)
public static long toLength(Object value)
public static int toInt32(Object val)
public static double toIntegerOrInfinity(Object val)
public static int toInt32(Object[] args, int index)
public static int toInt32(double d)
public static double toIntegerOrInfinity(double d)
public static long toUint32(double d)
public static long toUint32(Object val)
public static char toUint16(Object val)
public static Optional<Double> canonicalNumericIndexString(String arg)
public static long advanceStringIndex(String string, long index, boolean unicode)
public static Object getTopLevelProp(Scriptable scope, String id)
public static Function getExistingCtor(Context cx, Scriptable scope, String constructorName)
public static long indexFromString(String str)
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.
public static long testUint32String(String str)
public static ScriptRuntime.StringIdOrIndex toStringIdOrIndex(Object id)
@Deprecated public static Object getObjectElem(Object obj, Object elem, Context cx)
getObjectElem(Object, Object, Context, Scriptable) insteadpublic static Object getObjectElem(Object obj, Object elem, Context cx, Scriptable scope)
public static Object getObjectElem(Scriptable obj, Object elem, Context cx)
public static Object getSuperElem(Object superObject, Object elem, Context cx, Scriptable scope, Object thisObject)
public static Object getSuperElem(Object elem, Scriptable superScriptable, Scriptable thisScriptable)
@Deprecated public static Object getObjectProp(Object obj, String property, Context cx)
getObjectProp(Object, String, Context, Scriptable) insteadpublic static Object getObjectProp(Object obj, String property, Context cx, Scriptable scope)
scope - the scope that should be used to resolve primitive prototypepublic static Object getObjectProp(Scriptable obj, String property, Context cx)
@Deprecated public static Object getObjectPropNoWarn(Object obj, String property, Context cx)
getObjectPropNoWarn(Object, String, Context, Scriptable) insteadpublic static Object getObjectPropNoWarn(Object obj, String property, Context cx, Scriptable scope)
public static Object getSuperProp(Object superObject, String property, Context cx, Scriptable scope, Object thisObject, boolean noWarn)
@Deprecated public static Object getObjectIndex(Object obj, double dblIndex, Context cx)
getObjectIndex(Object, double, Context, Scriptable) insteadpublic static Object getObjectIndex(Object obj, double dblIndex, Context cx, Scriptable scope)
public static Object getObjectIndex(Scriptable obj, int index, Context cx)
public static Object getSuperIndex(Object superObject, double dblIndex, Context cx, Scriptable scope, Object thisObject)
@Deprecated public static Object setObjectElem(Object obj, Object elem, Object value, Context cx)
setObjectElem(Object, Object, Object, Context, Scriptable) insteadpublic static Object setObjectElem(Object obj, Object elem, Object value, Context cx, Scriptable scope)
public static Object setObjectElem(Scriptable obj, Object elem, Object value, Context cx)
public static Object setSuperElem(Object superObject, Object elem, Object value, Context cx, Scriptable scope, Object thisObject)
public static Object setSuperElem(Scriptable superScriptable, Scriptable thisScriptable, Object elem, Object value, Context cx)
@Deprecated public static Object setObjectProp(Object obj, String property, Object value, Context cx)
setObjectProp(Object, String, Object, Context, Scriptable) insteadpublic static Object setObjectProp(Object obj, String property, Object value, Context cx, Scriptable scope)
public static Object setObjectProp(Scriptable obj, String property, Object value, Context cx)
public static Object setSuperProp(Object superObject, String property, Object value, Context cx, Scriptable scope, Object thisObject)
public static Object setSuperProp(Scriptable superScriptable, Scriptable thisScriptable, String property, Object value, Context cx)
@Deprecated public static Object setObjectIndex(Object obj, double dblIndex, Object value, Context cx)
setObjectIndex(Object, double, Object, Context, Scriptable) insteadpublic static Object setObjectIndex(Object obj, double dblIndex, Object value, Context cx, Scriptable scope)
public static Object setObjectIndex(Scriptable obj, int index, Object value, Context cx)
public static Object setSuperIndex(Object superObject, double dblIndex, Object value, Context cx, Scriptable scope, Object thisObject)
public static Object setSuperIndex(Scriptable superScriptable, Scriptable thisScriptable, int index, Object value, Context cx)
public static boolean deleteObjectElem(Scriptable target, Object elem, Context cx)
public static boolean hasObjectElem(Scriptable target, Object elem, Context cx)
@Deprecated public static Object refSet(Ref ref, Object value, Context cx)
refSet(Ref, Object, Context, Scriptable) insteadpublic static Object refSet(Ref ref, Object value, Context cx, Scriptable scope)
@Deprecated public static Ref specialRef(Object obj, String specialProperty, Context cx)
specialRef(Object, String, Context, Scriptable) insteadpublic static Ref specialRef(Object obj, String specialProperty, Context cx, Scriptable scope)
@Deprecated public static Object delete(Object obj, Object id, Context cx)
delete(Object, Object, Context, Scriptable, boolean) instead@Deprecated public static Object delete(Object obj, Object id, Context cx, boolean isName)
delete(Object, Object, Context, Scriptable, boolean) insteadSee 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.
public static Object delete(Object obj, Object id, Context cx, Scriptable scope, boolean isName)
See 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.
public static Object name(Context cx, Scriptable scope, String name)
public static Scriptable bind(Context cx, Scriptable scope, String id)
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
public static Object setName(Scriptable bound, Object value, Context cx, Scriptable scope, String id)
public static Object strictSetName(Scriptable bound, Object value, Context cx, Scriptable scope, String id)
public static Object setConst(Scriptable bound, Object value, Context cx, String id)
public static Scriptable toIterator(Context cx, Scriptable scope, Scriptable obj, boolean keyOnly)
@Deprecated public static Object enumInit(Object value, Context cx, boolean enumValues)
enumInit(Object, Context, Scriptable, int) instead@Deprecated public static Object enumInit(Object value, Context cx, int enumType)
enumInit(Object, Context, Scriptable, int) insteadpublic static Object enumInit(Object value, Context cx, Scriptable scope, int enumType)
public static void setEnumNumbers(Object enumObj, boolean enumNumbers)
@Deprecated public static Boolean enumNext(Object enumObj)
enumNext(Object, Context) insteadpublic static boolean loadFromIterable(Context cx, Scriptable scope, Object arg1, BiConsumer<Object,Object> setter)
cx - the current contextscope - the current scopearg1 - the iterable object.setter - the setter to set the value@Deprecated public static Callable getNameFunctionAndThis(String name, Context cx, Scriptable scope)
getNameAndThis(String, Context, Scriptable)@Deprecated public static Callable getNameFunctionAndThisOptional(String name, Context cx, Scriptable scope)
getNameAndThisOptional(String, Context, Scriptable)public static ScriptRuntime.LookupResult getNameAndThis(String name, Context cx, Scriptable scope)
public static ScriptRuntime.LookupResult getNameAndThisOptional(String name, Context cx, Scriptable scope)
@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx)
getElemFunctionAndThis(Object, Object, Context, Scriptable) instead@Deprecated public static Callable getElemFunctionAndThis(Object obj, Object elem, Context cx, Scriptable scope)
getElemAndThis(Object, Object, Context, Scriptable)@Deprecated public static Callable getElemFunctionAndThisOptional(Object obj, Object elem, Context cx, Scriptable scope)
getElemAndThisOptional(Object, Object, Context, Scriptable)public static ScriptRuntime.LookupResult getElemAndThis(Object obj, Object elem, Context cx, Scriptable scope)
public static ScriptRuntime.LookupResult getElemAndThisOptional(Object obj, Object elem, Context cx, Scriptable scope)
@Deprecated public static Callable getPropFunctionAndThis(Object obj, String property, Context cx)
getPropFunctionAndThis(Object, String, Context, Scriptable) instead@Deprecated public static Callable getPropFunctionAndThis(Object obj, String property, Context cx, Scriptable scope)
getPropAndThis(Object, String, Context, Scriptable) instead@Deprecated public static Callable getPropFunctionAndThisOptional(Object obj, String property, Context cx, Scriptable scope)
getPropAndThis(Object, String, Context, Scriptable) insteadpublic static ScriptRuntime.LookupResult getPropAndThis(Object obj, String property, Context cx, Scriptable scope)
public static ScriptRuntime.LookupResult getPropAndThisOptional(Object obj, String property, Context cx, Scriptable scope)
@Deprecated public static Callable getValueFunctionAndThis(Object value, Context cx)
getValueAndThis(Object, Context) instead@Deprecated public static Callable getValueFunctionAndThisOptional(Object value, Context cx)
getValueAndThisOptional(Object, Context) insteadpublic static ScriptRuntime.LookupResult getValueAndThis(Object value, Context cx)
public static ScriptRuntime.LookupResult getValueAndThisOptional(Object value, Context cx)
public static Object callIterator(Object obj, Context cx, Scriptable scope)
public static boolean isIteratorDone(Context cx, Object result)
public static Ref callRef(Callable function, Scriptable thisObj, Object[] args, Context cx)
refGet(Ref, Context) or refSet(Ref, Object, Context) arbitrary number of
times. The args array reference should not be stored in any object that can be GC-reachable
after this method returns. If this is necessary, store args.clone(), not args array itself.public static Scriptable newObject(Object ctor, Context cx, Scriptable scope, Object[] args)
See ECMA 11.2.2
public static Object callSpecial(Context cx, Callable fun, Scriptable thisObj, Object[] args, Scriptable scope, Scriptable callerThis, int callType, String filename, int lineNumber, boolean isOptionalChainingCall)
public static Object newSpecial(Context cx, Object fun, Object[] args, Scriptable scope, int callType)
public static Object applyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
See Ecma 15.3.4.[34]
public static Scriptable getApplyOrCallThis(Context cx, Scriptable scope, Object arg0, int l, Callable target)
public static boolean isArrayLike(Scriptable obj)
public static Object evalSpecial(Context cx, Scriptable scope, Object thisArg, Object[] args, String filename, int lineNumber)
See ECMA 15.1.2.1
public static String typeofName(Scriptable scope, String id)
public static boolean isObject(Object value)
@Deprecated public static CharSequence add(CharSequence val1, Object val2)
add(Object, Object, Context) insteadShould call toPrimitive before toCharSequence
@Deprecated public static CharSequence add(Object val1, CharSequence val2)
add(Object, Object, Context) insteadShould call toPrimitive before toCharSequence
public static double bitwiseAND(double val1,
double val2)
public static double bitwiseOR(double val1,
double val2)
public static double bitwiseXOR(double val1,
double val2)
public static double leftShift(double val1,
double val2)
public static double signedRightShift(double val1,
double val2)
@Deprecated public static Object nameIncrDecr(Scriptable scopeChain, String id, int incrDecrMask)
nameIncrDecr(Scriptable, String, Context, int) insteadpublic static Object nameIncrDecr(Scriptable scopeChain, String id, Context cx, int incrDecrMask)
@Deprecated public static Object propIncrDecr(Object obj, String id, Context cx, int incrDecrMask)
propIncrDecr(Object, String, Context, Scriptable, int) insteadpublic static Object propIncrDecr(Object obj, String id, Context cx, Scriptable scope, int incrDecrMask)
@Deprecated public static Object elemIncrDecr(Object obj, Object index, Context cx, int incrDecrMask)
elemIncrDecr(Object, Object, Context, Scriptable, int) insteadpublic static Object elemIncrDecr(Object obj, Object index, Context cx, Scriptable scope, int incrDecrMask)
@Deprecated public static Object refIncrDecr(Ref ref, Context cx, int incrDecrMask)
refIncrDecr(Ref, Context, Scriptable, int) insteadpublic static Object refIncrDecr(Ref ref, Context cx, Scriptable scope, int incrDecrMask)
public static Object toPrimitive(Object input, Class<?> preferredType)
public static boolean sameZero(Object x, Object y)
public static boolean isNaN(Object n)
public static boolean isPrimitive(Object obj)
public static boolean instanceOf(Object a, Object b, Context cx)
public static boolean jsDelegatesTo(Scriptable lhs, Scriptable rhs)
public static boolean in(Object a, Object b, Context cx)
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.
a - the left hand operandb - the right hand operandpublic static ScriptableObject getGlobal(Context cx)
public static boolean hasTopCall(Context cx)
public static Scriptable getTopCallScope(Context cx)
@Deprecated public static Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args)
doTopCall(Callable, Context, Scriptable, Scriptable, Object[],
boolean) insteadpublic static Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, Object[] args, boolean isTopLevelStrict)
public static void addInstructionCount(Context cx, int instructionsToAdd)
public static void initScript(NativeFunction funObj, Scriptable thisObj, Context cx, Scriptable scope, boolean evalScript)
@Deprecated public static Scriptable createFunctionActivation(NativeFunction funObj, Scriptable scope, Object[] args)
@Deprecated public static Scriptable createFunctionActivation(NativeFunction funObj, Scriptable scope, Object[] args, boolean isStrict)
@Deprecated public static Scriptable createFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest, Scriptable homeObject)
public static Scriptable createFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest, boolean requiresArgumentObject, Scriptable homeObject)
@Deprecated public static Scriptable createArrowFunctionActivation(NativeFunction funObj, Scriptable scope, Object[] args, boolean isStrict)
@Deprecated public static Scriptable createArrowFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest, Scriptable homeObject)
public static Scriptable createArrowFunctionActivation(NativeFunction funObj, Context cx, Scriptable scope, Object[] args, boolean isStrict, boolean argsHasRest, boolean requiresArgumentObject, Scriptable homeObject)
public static void enterActivationFunction(Context cx, Scriptable scope)
public static void exitActivationFunction(Context cx)
public static Scriptable newCatchScope(Throwable t, Scriptable lastCatchScope, String exceptionName, Context cx, Scriptable scope)
public static Scriptable wrapException(Throwable t, Scriptable scope, Context cx)
public static Scriptable enterWith(Object obj, Context cx, Scriptable scope)
public static Scriptable leaveWith(Scriptable scope)
public static Scriptable enterDotQuery(Object value, Scriptable scope)
public static Object updateDotQuery(boolean value, Scriptable scope)
public static Scriptable leaveDotQuery(Scriptable scope)
@Deprecated public static void setFunctionProtoAndParent(BaseFunction fn, Scriptable scope)
setFunctionProtoAndParent(BaseFunction, Context, Scriptable) insteadpublic static void setFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope)
@Deprecated public static void setFunctionProtoAndParent(BaseFunction fn, Scriptable scope, boolean es6GeneratorFunction)
setFunctionProtoAndParent(BaseFunction, Context, Scriptable,
boolean) insteadpublic static void setFunctionProtoAndParent(BaseFunction fn, Context cx, Scriptable scope, boolean es6GeneratorFunction)
public static void setObjectProtoAndParent(ScriptableObject object, Scriptable scope)
public static void setBuiltinProtoAndParent(ScriptableObject object, Scriptable scope, TopLevel.Builtins type)
public static void initFunction(Context cx, Scriptable scope, NativeFunction function, int type, boolean fromEvalCode)
public static Scriptable newArrayLiteral(Object[] objects, int[] skipIndices, Context cx, Scriptable scope)
@Deprecated public static Scriptable newObjectLiteral(Object[] propertyIds, Object[] propertyValues, Context cx, Scriptable scope)
fillObjectLiteral(Scriptable, Object[], Object[], int[], Context,
Scriptable) instead@Deprecated public static Scriptable newObjectLiteral(Object[] propertyIds, Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope)
public static void fillObjectLiteral(Scriptable object, Object[] propertyIds, Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope)
public static boolean isArrayObject(Object obj)
public static Object[] getArrayElements(Scriptable object)
@Deprecated public static String getMessage0(String messageId)
getMessageById(String messageId, Object... args) instead@Deprecated public static String getMessage1(String messageId, Object arg1)
getMessageById(String messageId, Object... args) instead@Deprecated public static String getMessage2(String messageId, Object arg1, Object arg2)
getMessageById(String messageId, Object... args) instead@Deprecated public static String getMessage3(String messageId, Object arg1, Object arg2, Object arg3)
getMessageById(String messageId, Object... args) instead@Deprecated public static String getMessage4(String messageId, Object arg1, Object arg2, Object arg3, Object arg4)
getMessageById(String messageId, Object... args) instead@Deprecated public static String getMessage(String messageId, Object[] arguments)
getMessageById(String messageId, Object... args) insteadpublic static EcmaError constructError(String error, String message, int lineNumberDelta)
public static EcmaError constructError(String error, String message, String sourceName, int lineNumber, String lineSource, int columnNumber)
@Deprecated public static EcmaError typeError0(String messageId)
typeErrorById(String messageId, Object... args) instead@Deprecated public static EcmaError typeError1(String messageId, Object arg1)
typeErrorById(String messageId, Object... args) instead@Deprecated public static EcmaError typeError2(String messageId, Object arg1, Object arg2)
typeErrorById(String messageId, Object... args) instead@Deprecated public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3)
typeErrorById(String messageId, Object... args) insteadpublic static RuntimeException undefReadError(Object object, Object id)
public static RuntimeException undefCallError(Object object, Object id)
public static RuntimeException undefWriteError(Object object, Object id, Object value)
public static RuntimeException notFoundError(Scriptable object, String property)
public static RuntimeException notFunctionError(Object value)
public static RuntimeException notFunctionError(Object value, Object messageHelper)
public static RuntimeException notFunctionError(Object obj, Object value, String propertyName)
public static RegExpProxy getRegExpProxy(Context cx)
public static void setRegExpProxy(Context cx, RegExpProxy proxy)
public static RegExpProxy checkRegExpProxy(Context cx)
public static Scriptable wrapRegExp(Context cx, Scriptable scope, Object compiled)
public static Scriptable getTemplateLiteralCallSite(Context cx, Scriptable scope, Object[] strings, int index)
public static String escapeAttributeValue(Object value, Context cx)
value - Unescaped textpublic static String escapeTextValue(Object value, Context cx)
value - Unescaped textpublic static Ref memberRef(Object obj, Object namespace, Object elem, Context cx, int memberTypeFlags)
public static Ref nameRef(Object name, Context cx, Scriptable scope, int memberTypeFlags)
public static Ref nameRef(Object namespace, Object name, Context cx, Scriptable scope, int memberTypeFlags)
public static void storeUint32Result(Context cx, long value)
public static long lastUint32Result(Context cx)
@Deprecated public static Scriptable lastStoredScriptable(Context cx)
@Deprecated public static void discardLastStoredScriptable(Context cx)
public static JavaScriptException throwError(Context cx, Scriptable scope, String message)
cx - the current contextscope - the current scopemessage - the messagepublic static JavaScriptException throwCustomError(Context cx, Scriptable scope, String constructorName, String message)
cx - the current contextscope - the current scopemessage - the messagepublic static void throwDeleteOnSuperPropertyNotAllowed()
public static int clamp(int value,
int min,
int max)
Copyright © 2025 HtmlUnit. All rights reserved.