public class ScriptRuntime
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ScriptRuntime.MessageProvider
This is an interface defining a message provider.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<?> |
BooleanClass |
static java.lang.Class<?> |
ByteClass |
static java.lang.Class<?> |
CharacterClass |
static java.lang.Class<?> |
ClassClass |
static java.lang.Class<?> |
ContextClass |
static java.lang.Class<?> |
ContextFactoryClass |
static java.lang.Class<?> |
DateClass |
static java.lang.Class<?> |
DoubleClass |
static java.lang.Object[] |
emptyArgs |
static java.lang.String[] |
emptyStrings |
static int |
ENUMERATE_ARRAY |
static int |
ENUMERATE_ARRAY_NO_ITERATOR |
static int |
ENUMERATE_KEYS |
static int |
ENUMERATE_KEYS_NO_ITERATOR |
static int |
ENUMERATE_VALUES |
static int |
ENUMERATE_VALUES_NO_ITERATOR |
static java.lang.Class<?> |
FloatClass |
static java.lang.Class<?> |
FunctionClass |
static java.lang.Class<?> |
IntegerClass |
static java.lang.Class<?> |
LongClass |
static ScriptRuntime.MessageProvider |
messageProvider |
static double |
NaN |
static java.lang.Double |
NaNobj |
static double |
negativeZero |
static java.lang.Class<?> |
NumberClass |
static java.lang.Class<?> |
ObjectClass |
static java.util.Locale |
ROOT_LOCALE |
static java.lang.Class<Scriptable> |
ScriptableClass |
static java.lang.Class<?> |
ScriptableObjectClass |
static java.lang.Class<?> |
ShortClass |
static java.lang.Class<?> |
StringClass |
Modifier and Type | Method and Description |
---|---|
static java.lang.CharSequence |
add(java.lang.CharSequence val1,
java.lang.Object val2) |
static java.lang.CharSequence |
add(java.lang.Object val1,
java.lang.CharSequence val2) |
static java.lang.Object |
add(java.lang.Object val1,
java.lang.Object val2,
Context cx) |
static void |
addInstructionCount(Context cx,
int instructionsToAdd) |
static java.lang.Object |
applyOrCall(boolean isApply,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args)
Function.prototype.apply and Function.prototype.call
See Ecma 15.3.4.[34]
|
static Scriptable |
bind(Context cx,
Scriptable scope,
java.lang.String id)
Returns the object in the scope chain that has a given property.
|
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.
|
static Ref |
callRef(Callable function,
Scriptable thisObj,
java.lang.Object[] args,
Context cx)
Perform function call in reference context.
|
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) |
static RegExpProxy |
checkRegExpProxy(Context cx) |
static boolean |
cmp_LE(java.lang.Object val1,
java.lang.Object val2) |
static boolean |
cmp_LT(java.lang.Object val1,
java.lang.Object val2) |
static EcmaError |
constructError(java.lang.String error,
java.lang.String message) |
static EcmaError |
constructError(java.lang.String error,
java.lang.String message,
int lineNumberDelta) |
static EcmaError |
constructError(java.lang.String error,
java.lang.String message,
java.lang.String sourceName,
int lineNumber,
java.lang.String lineSource,
int columnNumber) |
static Scriptable |
createFunctionActivation(NativeFunction funObj,
Scriptable scope,
java.lang.Object[] args) |
static java.lang.Object |
delete(java.lang.Object obj,
java.lang.Object id,
Context cx)
Deprecated.
|
static java.lang.Object |
delete(java.lang.Object obj,
java.lang.Object id,
Context cx,
boolean isName)
Deprecated.
|
static java.lang.Object |
delete(java.lang.Object obj,
java.lang.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,
java.lang.Object elem,
Context cx) |
static java.lang.Object |
doTopCall(Callable callable,
Context cx,
Scriptable scope,
Scriptable thisObj,
java.lang.Object[] args) |
static java.lang.Object |
elemIncrDecr(java.lang.Object obj,
java.lang.Object index,
Context cx,
int incrDecrMask)
Deprecated.
|
static java.lang.Object |
elemIncrDecr(java.lang.Object obj,
java.lang.Object index,
Context cx,
Scriptable scope,
int incrDecrMask) |
static void |
enterActivationFunction(Context cx,
Scriptable scope) |
static Scriptable |
enterDotQuery(java.lang.Object value,
Scriptable scope) |
static Scriptable |
enterWith(java.lang.Object obj,
Context cx,
Scriptable scope) |
static java.lang.Object |
enumId(java.lang.Object enumObj,
Context cx) |
static java.lang.Object |
enumInit(java.lang.Object value,
Context cx,
boolean enumValues)
Deprecated.
Use
enumInit(Object, Context, Scriptable, int) instead |
static java.lang.Object |
enumInit(java.lang.Object value,
Context cx,
int enumType)
Deprecated.
Use
enumInit(Object, Context, Scriptable, int) instead |
static java.lang.Object |
enumInit(java.lang.Object value,
Context cx,
Scriptable scope,
int enumType) |
static java.lang.Boolean |
enumNext(java.lang.Object enumObj) |
static java.lang.Object |
enumValue(java.lang.Object enumObj,
Context cx) |
static boolean |
eq(java.lang.Object x,
java.lang.Object y)
Equality
See ECMA 11.9
|
static java.lang.String |
escapeAttributeValue(java.lang.Object value,
Context cx)
Escapes the reserved characters in a value of an attribute
|
static java.lang.String |
escapeString(java.lang.String s) |
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.'
|
static java.lang.String |
escapeTextValue(java.lang.Object value,
Context cx)
Escapes the reserved characters in a value of a text node
|
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.
|
static void |
exitActivationFunction(Context cx) |
static java.lang.Object[] |
getArrayElements(Scriptable object) |
static Callable |
getElemFunctionAndThis(java.lang.Object obj,
java.lang.Object elem,
Context cx)
Deprecated.
|
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.
|
static ScriptableObject |
getGlobal(Context cx) |
static ScriptableObject |
getLibraryScopeOrNull(Scriptable scope) |
static java.lang.String |
getMessage(java.lang.String messageId,
java.lang.Object[] arguments) |
static java.lang.String |
getMessage0(java.lang.String messageId) |
static java.lang.String |
getMessage1(java.lang.String messageId,
java.lang.Object arg1) |
static java.lang.String |
getMessage2(java.lang.String messageId,
java.lang.Object arg1,
java.lang.Object arg2) |
static java.lang.String |
getMessage3(java.lang.String messageId,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3) |
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) |
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.
|
static java.lang.Object |
getObjectElem(java.lang.Object obj,
java.lang.Object elem,
Context cx)
Deprecated.
|
static java.lang.Object |
getObjectElem(java.lang.Object obj,
java.lang.Object elem,
Context cx,
Scriptable scope)
Call obj.[[Get]](id)
|
static java.lang.Object |
getObjectElem(Scriptable obj,
java.lang.Object elem,
Context cx) |
static java.lang.Object |
getObjectIndex(java.lang.Object obj,
double dblIndex,
Context cx)
Deprecated.
|
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.
|
static java.lang.Object |
getObjectIndex(Scriptable obj,
int index,
Context cx) |
static java.lang.Object |
getObjectProp(java.lang.Object obj,
java.lang.String property,
Context cx)
Deprecated.
|
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.
|
static java.lang.Object |
getObjectProp(Scriptable obj,
java.lang.String property,
Context cx) |
static java.lang.Object |
getObjectPropNoWarn(java.lang.Object obj,
java.lang.String property,
Context cx)
Deprecated.
|
static java.lang.Object |
getObjectPropNoWarn(java.lang.Object obj,
java.lang.String property,
Context cx,
Scriptable scope) |
static Callable |
getPropFunctionAndThis(java.lang.Object obj,
java.lang.String property,
Context cx)
Deprecated.
|
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.
|
static RegExpProxy |
getRegExpProxy(Context cx) |
static Scriptable |
getTopCallScope(Context cx) |
static java.lang.Object |
getTopLevelProp(Scriptable scope,
java.lang.String id) |
static Callable |
getValueFunctionAndThis(java.lang.Object value,
Context cx)
Prepare for calling
|
static boolean |
hasObjectElem(Scriptable target,
java.lang.Object elem,
Context cx) |
static boolean |
hasTopCall(Context cx) |
static boolean |
in(java.lang.Object a,
java.lang.Object b,
Context cx)
The in operator.
|
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.
|
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(java.lang.Object a,
java.lang.Object b,
Context cx)
The instanceof operator.
|
static boolean |
isArrayObject(java.lang.Object obj) |
static boolean |
isJSLineTerminator(int c) |
static boolean |
isJSWhitespaceOrLineTerminator(int c) |
static boolean |
isPrimitive(java.lang.Object obj) |
static boolean |
isRhinoRuntimeType(java.lang.Class<?> cl) |
static boolean |
jsDelegatesTo(Scriptable lhs,
Scriptable rhs)
Delegates to
|
static Scriptable |
lastStoredScriptable(Context cx) |
static long |
lastUint32Result(Context cx) |
static Scriptable |
leaveDotQuery(Scriptable scope) |
static Scriptable |
leaveWith(Scriptable scope) |
static Ref |
memberRef(java.lang.Object obj,
java.lang.Object elem,
Context cx,
int memberTypeFlags) |
static Ref |
memberRef(java.lang.Object obj,
java.lang.Object namespace,
java.lang.Object elem,
Context cx,
int memberTypeFlags) |
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.
|
static java.lang.Object |
nameIncrDecr(Scriptable scopeChain,
java.lang.String id,
Context cx,
int incrDecrMask) |
static java.lang.Object |
nameIncrDecr(Scriptable scopeChain,
java.lang.String id,
int incrDecrMask)
Deprecated.
Use
nameIncrDecr(Scriptable, String, Context, int) instead |
static Ref |
nameRef(java.lang.Object name,
Context cx,
Scriptable scope,
int memberTypeFlags) |
static Ref |
nameRef(java.lang.Object namespace,
java.lang.Object name,
Context cx,
Scriptable scope,
int memberTypeFlags) |
static Scriptable |
newArrayLiteral(java.lang.Object[] objects,
int[] skipIndices,
Context cx,
Scriptable scope) |
static Scriptable |
newBuiltinObject(Context cx,
Scriptable scope,
TopLevel.Builtins type,
java.lang.Object[] args) |
static Scriptable |
newCatchScope(java.lang.Throwable t,
Scriptable lastCatchScope,
java.lang.String exceptionName,
Context cx,
Scriptable scope) |
static Scriptable |
newObject(Context cx,
Scriptable scope,
java.lang.String constructorName,
java.lang.Object[] args) |
static Scriptable |
newObject(java.lang.Object fun,
Context cx,
Scriptable scope,
java.lang.Object[] args)
Operator new.
|
static Scriptable |
newObjectLiteral(java.lang.Object[] propertyIds,
java.lang.Object[] propertyValues,
Context cx,
Scriptable scope)
Deprecated.
|
static Scriptable |
newObjectLiteral(java.lang.Object[] propertyIds,
java.lang.Object[] propertyValues,
int[] getterSetters,
Context cx,
Scriptable scope) |
static java.lang.Object |
newSpecial(Context cx,
java.lang.Object fun,
java.lang.Object[] args,
Scriptable scope,
int callType) |
static java.lang.RuntimeException |
notFoundError(Scriptable object,
java.lang.String property) |
static java.lang.RuntimeException |
notFunctionError(java.lang.Object value) |
static java.lang.RuntimeException |
notFunctionError(java.lang.Object value,
java.lang.Object messageHelper) |
static java.lang.RuntimeException |
notFunctionError(java.lang.Object obj,
java.lang.Object value,
java.lang.String propertyName) |
static java.lang.String |
numberToString(double d,
int base) |
static java.lang.Object[] |
padArguments(java.lang.Object[] args,
int count)
Helper function for builtin objects that use the varargs form.
|
static java.lang.Object |
propIncrDecr(java.lang.Object obj,
java.lang.String id,
Context cx,
int incrDecrMask)
Deprecated.
|
static java.lang.Object |
propIncrDecr(java.lang.Object obj,
java.lang.String id,
Context cx,
Scriptable scope,
int incrDecrMask) |
static EcmaError |
rangeError(java.lang.String message) |
static java.lang.Object |
refDel(Ref ref,
Context cx) |
static java.lang.Object |
refGet(Ref ref,
Context cx) |
static java.lang.Object |
refIncrDecr(Ref ref,
Context cx,
int incrDecrMask)
Deprecated.
Use
refIncrDecr(Ref, Context, Scriptable, int) instead |
static java.lang.Object |
refIncrDecr(Ref ref,
Context cx,
Scriptable scope,
int incrDecrMask) |
static java.lang.Object |
refSet(Ref ref,
java.lang.Object value,
Context cx)
Deprecated.
Use
refSet(Ref, Object, Context, Scriptable) instead |
static java.lang.Object |
refSet(Ref ref,
java.lang.Object value,
Context cx,
Scriptable scope) |
static Scriptable |
requireObjectCoercible(Scriptable val,
IdFunctionObject idFuncObj) |
static java.lang.Object |
searchDefaultNamespace(Context cx) |
static void |
setBuiltinProtoAndParent(ScriptableObject object,
Scriptable scope,
TopLevel.Builtins type) |
static java.lang.Object |
setConst(Scriptable bound,
java.lang.Object value,
Context cx,
java.lang.String id) |
static java.lang.Object |
setDefaultNamespace(java.lang.Object namespace,
Context cx) |
static void |
setEnumNumbers(java.lang.Object enumObj,
boolean enumNumbers) |
static void |
setFunctionProtoAndParent(BaseFunction fn,
Scriptable scope) |
static java.lang.Object |
setName(Scriptable bound,
java.lang.Object value,
Context cx,
Scriptable scope,
java.lang.String id) |
static java.lang.Object |
setObjectElem(java.lang.Object obj,
java.lang.Object elem,
java.lang.Object value,
Context cx)
Deprecated.
|
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)
|
static java.lang.Object |
setObjectElem(Scriptable obj,
java.lang.Object elem,
java.lang.Object value,
Context cx) |
static java.lang.Object |
setObjectIndex(java.lang.Object obj,
double dblIndex,
java.lang.Object value,
Context cx)
Deprecated.
|
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.
|
static java.lang.Object |
setObjectIndex(Scriptable obj,
int index,
java.lang.Object value,
Context cx) |
static java.lang.Object |
setObjectProp(java.lang.Object obj,
java.lang.String property,
java.lang.Object value,
Context cx)
Deprecated.
|
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.
|
static java.lang.Object |
setObjectProp(Scriptable obj,
java.lang.String property,
java.lang.Object value,
Context cx) |
static void |
setObjectProtoAndParent(ScriptableObject object,
Scriptable scope) |
static void |
setRegExpProxy(Context cx,
RegExpProxy proxy) |
static boolean |
shallowEq(java.lang.Object x,
java.lang.Object y) |
static Ref |
specialRef(java.lang.Object obj,
java.lang.String specialProperty,
Context cx)
Deprecated.
Use
specialRef(Object, String, Context, Scriptable) instead |
static Ref |
specialRef(java.lang.Object obj,
java.lang.String specialProperty,
Context cx,
Scriptable scope) |
static void |
storeUint32Result(Context cx,
long value) |
static java.lang.Object |
strictSetName(Scriptable bound,
java.lang.Object value,
Context cx,
Scriptable scope,
java.lang.String id) |
static long |
testUint32String(java.lang.String str)
If str is a decimal presentation of Uint32 value, return it as long.
|
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.
|
static JavaScriptException |
throwError(Context cx,
Scriptable scope,
java.lang.String message)
Equivalent to executing "new Error(message, sourceFileName, sourceLineNo)" from JavaScript.
|
static boolean |
toBoolean(java.lang.Object val)
Convert the value to a boolean.
|
static java.lang.CharSequence |
toCharSequence(java.lang.Object val) |
static int |
toInt32(double d) |
static int |
toInt32(java.lang.Object val)
See ECMA 9.5.
|
static int |
toInt32(java.lang.Object[] args,
int index) |
static double |
toInteger(double d) |
static double |
toInteger(java.lang.Object val)
See ECMA 9.4.
|
static double |
toInteger(java.lang.Object[] args,
int index) |
static Scriptable |
toIterator(Context cx,
Scriptable scope,
Scriptable obj,
boolean keyOnly) |
static double |
toNumber(java.lang.Object val)
Convert the value to a number.
|
static double |
toNumber(java.lang.Object[] args,
int index) |
static double |
toNumber(java.lang.String s)
ToNumber applied to the String type
See ECMA 9.3.1
|
static Scriptable |
toObject(Context cx,
Scriptable scope,
java.lang.Object val)
Convert the value to an object.
|
static Scriptable |
toObject(Context cx,
Scriptable scope,
java.lang.Object val,
java.lang.Class<?> staticClass)
Deprecated.
Use
toObject(Context, Scriptable, Object) instead. |
static Scriptable |
toObject(Scriptable scope,
java.lang.Object val) |
static Scriptable |
toObject(Scriptable scope,
java.lang.Object val,
java.lang.Class<?> staticClass)
Deprecated.
Use
toObject(Scriptable, Object) instead. |
static Scriptable |
toObjectOrNull(Context cx,
java.lang.Object obj)
Deprecated.
Use
toObjectOrNull(Context, Object, Scriptable) instead |
static Scriptable |
toObjectOrNull(Context cx,
java.lang.Object obj,
Scriptable scope) |
static java.lang.Object |
toPrimitive(java.lang.Object val) |
static java.lang.Object |
toPrimitive(java.lang.Object val,
java.lang.Class<?> typeHint) |
static java.lang.String |
toString(double val)
Optimized version of toString(Object) for numbers.
|
static java.lang.String |
toString(java.lang.Object val)
Convert the value to a string.
|
static java.lang.String |
toString(java.lang.Object[] args,
int index) |
static char |
toUint16(java.lang.Object val)
See ECMA 9.7.
|
static long |
toUint32(double d)
See ECMA 9.6.
|
static long |
toUint32(java.lang.Object val) |
static EcmaError |
typeError(java.lang.String message) |
static EcmaError |
typeError0(java.lang.String messageId) |
static EcmaError |
typeError1(java.lang.String messageId,
java.lang.Object arg1) |
static EcmaError |
typeError2(java.lang.String messageId,
java.lang.Object arg1,
java.lang.Object arg2) |
static EcmaError |
typeError3(java.lang.String messageId,
java.lang.String arg1,
java.lang.String arg2,
java.lang.String arg3) |
static BaseFunction |
typeErrorThrower()
Deprecated.
|
static BaseFunction |
typeErrorThrower(Context cx)
Returns representation of the [[ThrowTypeError]] object.
|
static java.lang.String |
typeof(java.lang.Object value)
The typeof operator
|
static java.lang.String |
typeofName(Scriptable scope,
java.lang.String id)
The typeof operator that correctly handles the undefined case
|
static java.lang.RuntimeException |
undefCallError(java.lang.Object object,
java.lang.Object id) |
static java.lang.RuntimeException |
undefReadError(java.lang.Object object,
java.lang.Object id) |
static java.lang.RuntimeException |
undefWriteError(java.lang.Object object,
java.lang.Object id,
java.lang.Object value) |
static java.lang.Object |
updateDotQuery(boolean value,
Scriptable scope) |
static java.lang.Boolean |
wrapBoolean(boolean b) |
static Scriptable |
wrapException(java.lang.Throwable t,
Scriptable scope,
Context cx) |
static java.lang.Integer |
wrapInt(int i) |
static java.lang.Number |
wrapNumber(double x) |
static Scriptable |
wrapRegExp(Context cx,
Scriptable scope,
java.lang.Object compiled) |
public static final java.lang.Class<?> BooleanClass
public static final java.lang.Class<?> ByteClass
public static final java.lang.Class<?> CharacterClass
public static final java.lang.Class<?> ClassClass
public static final java.lang.Class<?> DoubleClass
public static final java.lang.Class<?> FloatClass
public static final java.lang.Class<?> IntegerClass
public static final java.lang.Class<?> LongClass
public static final java.lang.Class<?> NumberClass
public static final java.lang.Class<?> ObjectClass
public static final java.lang.Class<?> ShortClass
public static final java.lang.Class<?> StringClass
public static final java.lang.Class<?> DateClass
public static final java.lang.Class<?> ContextClass
public static final java.lang.Class<?> ContextFactoryClass
public static final java.lang.Class<?> FunctionClass
public static final java.lang.Class<?> ScriptableObjectClass
public static final java.lang.Class<Scriptable> ScriptableClass
public static java.util.Locale ROOT_LOCALE
public static final double NaN
public static final double negativeZero
public static final java.lang.Double NaNobj
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 ScriptRuntime.MessageProvider messageProvider
public static final java.lang.Object[] emptyArgs
public static final java.lang.String[] emptyStrings
@Deprecated public static BaseFunction typeErrorThrower()
typeErrorThrower(Context)
public static BaseFunction typeErrorThrower(Context cx)
public static boolean isRhinoRuntimeType(java.lang.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 java.lang.Boolean wrapBoolean(boolean b)
public static java.lang.Integer wrapInt(int i)
public static java.lang.Number wrapNumber(double x)
public static boolean toBoolean(java.lang.Object val)
public static double toNumber(java.lang.Object val)
public static double toNumber(java.lang.Object[] args, int index)
public static double toNumber(java.lang.String s)
public static java.lang.Object[] padArguments(java.lang.Object[] args, int count)
public static java.lang.String escapeString(java.lang.String s)
public static java.lang.String escapeString(java.lang.String s, char escapeQuote)
public static java.lang.CharSequence toCharSequence(java.lang.Object val)
public static java.lang.String toString(java.lang.Object val)
public static java.lang.String toString(java.lang.Object[] args, int index)
public static java.lang.String toString(double val)
public static java.lang.String numberToString(double d, int base)
public static Scriptable toObject(Scriptable scope, java.lang.Object val)
@Deprecated public static Scriptable toObjectOrNull(Context cx, java.lang.Object obj)
toObjectOrNull(Context, Object, Scriptable)
insteadpublic static Scriptable toObjectOrNull(Context cx, java.lang.Object obj, Scriptable scope)
scope
- the scope that should be used to resolve primitive prototype@Deprecated public static Scriptable toObject(Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass)
toObject(Scriptable, Object)
instead.public static Scriptable toObject(Context cx, Scriptable scope, java.lang.Object val)
@Deprecated public static Scriptable toObject(Context cx, Scriptable scope, java.lang.Object val, java.lang.Class<?> staticClass)
toObject(Context, Scriptable, Object)
instead.@Deprecated public static java.lang.Object call(Context cx, java.lang.Object fun, java.lang.Object thisArg, java.lang.Object[] args, Scriptable scope)
public static Scriptable newObject(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.Object[] args)
public static Scriptable newBuiltinObject(Context cx, Scriptable scope, TopLevel.Builtins type, java.lang.Object[] args)
public static double toInteger(java.lang.Object val)
public static double toInteger(double d)
public static double toInteger(java.lang.Object[] args, int index)
public static int toInt32(java.lang.Object val)
public static int toInt32(java.lang.Object[] args, int index)
public static int toInt32(double d)
public static long toUint32(double d)
public static long toUint32(java.lang.Object val)
public static char toUint16(java.lang.Object val)
public static java.lang.Object setDefaultNamespace(java.lang.Object namespace, Context cx)
public static java.lang.Object searchDefaultNamespace(Context cx)
public static java.lang.Object getTopLevelProp(Scriptable scope, java.lang.String id)
public static long indexFromString(java.lang.String str)
public static long testUint32String(java.lang.String str)
@Deprecated public static java.lang.Object getObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx)
getObjectElem(Object, Object, Context, Scriptable)
insteadpublic static java.lang.Object getObjectElem(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope)
public static java.lang.Object getObjectElem(Scriptable obj, java.lang.Object elem, Context cx)
@Deprecated public static java.lang.Object getObjectProp(java.lang.Object obj, java.lang.String property, Context cx)
getObjectProp(Object, String, Context, Scriptable)
insteadpublic static java.lang.Object getObjectProp(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)
scope
- the scope that should be used to resolve primitive prototypepublic static java.lang.Object getObjectProp(Scriptable obj, java.lang.String property, Context cx)
@Deprecated public static java.lang.Object getObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx)
getObjectPropNoWarn(Object, String, Context, Scriptable)
insteadpublic static java.lang.Object getObjectPropNoWarn(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)
@Deprecated public static java.lang.Object getObjectIndex(java.lang.Object obj, double dblIndex, Context cx)
getObjectIndex(Object, double, Context, Scriptable)
insteadpublic static java.lang.Object getObjectIndex(java.lang.Object obj, double dblIndex, Context cx, Scriptable scope)
public static java.lang.Object getObjectIndex(Scriptable obj, int index, Context cx)
@Deprecated public static java.lang.Object setObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx)
setObjectElem(Object, Object, Object, Context, Scriptable)
insteadpublic static java.lang.Object setObjectElem(java.lang.Object obj, java.lang.Object elem, java.lang.Object value, Context cx, Scriptable scope)
public static java.lang.Object setObjectElem(Scriptable obj, java.lang.Object elem, java.lang.Object value, Context cx)
@Deprecated public static java.lang.Object setObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx)
setObjectProp(Object, String, Object, Context, Scriptable)
insteadpublic static java.lang.Object setObjectProp(java.lang.Object obj, java.lang.String property, java.lang.Object value, Context cx, Scriptable scope)
public static java.lang.Object setObjectProp(Scriptable obj, java.lang.String property, java.lang.Object value, Context cx)
@Deprecated public static java.lang.Object setObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx)
setObjectIndex(Object, double, Object, Context, Scriptable)
insteadpublic static java.lang.Object setObjectIndex(java.lang.Object obj, double dblIndex, java.lang.Object value, Context cx, Scriptable scope)
public static java.lang.Object setObjectIndex(Scriptable obj, int index, java.lang.Object value, Context cx)
public static boolean deleteObjectElem(Scriptable target, java.lang.Object elem, Context cx)
public static boolean hasObjectElem(Scriptable target, java.lang.Object elem, Context cx)
@Deprecated public static java.lang.Object refSet(Ref ref, java.lang.Object value, Context cx)
refSet(Ref, Object, Context, Scriptable)
insteadpublic static java.lang.Object refSet(Ref ref, java.lang.Object value, Context cx, Scriptable scope)
@Deprecated public static Ref specialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx)
specialRef(Object, String, Context, Scriptable)
insteadpublic static Ref specialRef(java.lang.Object obj, java.lang.String specialProperty, Context cx, Scriptable scope)
@Deprecated public static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx)
delete(Object, Object, Context, Scriptable, boolean)
instead@Deprecated public static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx, boolean isName)
delete(Object, Object, Context, Scriptable, boolean)
insteadpublic static java.lang.Object delete(java.lang.Object obj, java.lang.Object id, Context cx, Scriptable scope, boolean isName)
public static java.lang.Object name(Context cx, Scriptable scope, java.lang.String name)
public static Scriptable bind(Context cx, Scriptable scope, java.lang.String id)
public static java.lang.Object setName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id)
public static java.lang.Object strictSetName(Scriptable bound, java.lang.Object value, Context cx, Scriptable scope, java.lang.String id)
public static java.lang.Object setConst(Scriptable bound, java.lang.Object value, Context cx, java.lang.String id)
public static Scriptable toIterator(Context cx, Scriptable scope, Scriptable obj, boolean keyOnly)
@Deprecated public static java.lang.Object enumInit(java.lang.Object value, Context cx, boolean enumValues)
enumInit(Object, Context, Scriptable, int)
instead@Deprecated public static java.lang.Object enumInit(java.lang.Object value, Context cx, int enumType)
enumInit(Object, Context, Scriptable, int)
insteadpublic static java.lang.Object enumInit(java.lang.Object value, Context cx, Scriptable scope, int enumType)
public static void setEnumNumbers(java.lang.Object enumObj, boolean enumNumbers)
public static java.lang.Boolean enumNext(java.lang.Object enumObj)
public static java.lang.Object enumId(java.lang.Object enumObj, Context cx)
public static java.lang.Object enumValue(java.lang.Object enumObj, Context cx)
public static Callable getNameFunctionAndThis(java.lang.String name, Context cx, Scriptable scope)
@Deprecated public static Callable getElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx)
getElemFunctionAndThis(Object, Object, Context, Scriptable)
insteadpublic static Callable getElemFunctionAndThis(java.lang.Object obj, java.lang.Object elem, Context cx, Scriptable scope)
@Deprecated public static Callable getPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx)
getPropFunctionAndThis(Object, String, Context, Scriptable)
insteadpublic static Callable getPropFunctionAndThis(java.lang.Object obj, java.lang.String property, Context cx, Scriptable scope)
public static Callable getValueFunctionAndThis(java.lang.Object value, Context cx)
public static Ref callRef(Callable function, Scriptable thisObj, java.lang.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 is
can be GC-reachable after this method returns. If this is necessary,
store args.clone(), not args array itself.public static Scriptable newObject(java.lang.Object fun, Context cx, Scriptable scope, java.lang.Object[] args)
public 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)
public static java.lang.Object newSpecial(Context cx, java.lang.Object fun, java.lang.Object[] args, Scriptable scope, int callType)
public static java.lang.Object applyOrCall(boolean isApply, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
public static java.lang.Object evalSpecial(Context cx, Scriptable scope, java.lang.Object thisArg, java.lang.Object[] args, java.lang.String filename, int lineNumber)
public static java.lang.String typeof(java.lang.Object value)
public static java.lang.String typeofName(Scriptable scope, java.lang.String id)
public static java.lang.Object add(java.lang.Object val1, java.lang.Object val2, Context cx)
public static java.lang.CharSequence add(java.lang.CharSequence val1, java.lang.Object val2)
public static java.lang.CharSequence add(java.lang.Object val1, java.lang.CharSequence val2)
@Deprecated public static java.lang.Object nameIncrDecr(Scriptable scopeChain, java.lang.String id, int incrDecrMask)
nameIncrDecr(Scriptable, String, Context, int)
insteadpublic static java.lang.Object nameIncrDecr(Scriptable scopeChain, java.lang.String id, Context cx, int incrDecrMask)
@Deprecated public static java.lang.Object propIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, int incrDecrMask)
propIncrDecr(Object, String, Context, Scriptable, int)
insteadpublic static java.lang.Object propIncrDecr(java.lang.Object obj, java.lang.String id, Context cx, Scriptable scope, int incrDecrMask)
@Deprecated public static java.lang.Object elemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, int incrDecrMask)
elemIncrDecr(Object, Object, Context, Scriptable, int)
insteadpublic static java.lang.Object elemIncrDecr(java.lang.Object obj, java.lang.Object index, Context cx, Scriptable scope, int incrDecrMask)
@Deprecated public static java.lang.Object refIncrDecr(Ref ref, Context cx, int incrDecrMask)
refIncrDecr(Ref, Context, Scriptable, int)
insteadpublic static java.lang.Object refIncrDecr(Ref ref, Context cx, Scriptable scope, int incrDecrMask)
public static java.lang.Object toPrimitive(java.lang.Object val)
public static java.lang.Object toPrimitive(java.lang.Object val, java.lang.Class<?> typeHint)
public static boolean eq(java.lang.Object x, java.lang.Object y)
public static boolean isPrimitive(java.lang.Object obj)
public static boolean shallowEq(java.lang.Object x, java.lang.Object y)
public static boolean instanceOf(java.lang.Object a, java.lang.Object b, Context cx)
public static boolean jsDelegatesTo(Scriptable lhs, Scriptable rhs)
public static boolean in(java.lang.Object a, java.lang.Object b, Context cx)
a
- the left hand operandb
- the right hand operandpublic static boolean cmp_LT(java.lang.Object val1, java.lang.Object val2)
public static boolean cmp_LE(java.lang.Object val1, java.lang.Object val2)
public static ScriptableObject getGlobal(Context cx)
public static boolean hasTopCall(Context cx)
public static Scriptable getTopCallScope(Context cx)
public static java.lang.Object doTopCall(Callable callable, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
public static void addInstructionCount(Context cx, int instructionsToAdd)
public static void initScript(NativeFunction funObj, Scriptable thisObj, Context cx, Scriptable scope, boolean evalScript)
public static Scriptable createFunctionActivation(NativeFunction funObj, Scriptable scope, java.lang.Object[] args)
public static void enterActivationFunction(Context cx, Scriptable scope)
public static void exitActivationFunction(Context cx)
public static Scriptable newCatchScope(java.lang.Throwable t, Scriptable lastCatchScope, java.lang.String exceptionName, Context cx, Scriptable scope)
public static Scriptable wrapException(java.lang.Throwable t, Scriptable scope, Context cx)
public static Scriptable enterWith(java.lang.Object obj, Context cx, Scriptable scope)
public static Scriptable leaveWith(Scriptable scope)
public static Scriptable enterDotQuery(java.lang.Object value, Scriptable scope)
public static java.lang.Object updateDotQuery(boolean value, Scriptable scope)
public static Scriptable leaveDotQuery(Scriptable scope)
public static void setFunctionProtoAndParent(BaseFunction fn, Scriptable scope)
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(java.lang.Object[] objects, int[] skipIndices, Context cx, Scriptable scope)
@Deprecated public static Scriptable newObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, Context cx, Scriptable scope)
newObjectLiteral(Object[], Object[], int[], Context, Scriptable)
insteadpublic static Scriptable newObjectLiteral(java.lang.Object[] propertyIds, java.lang.Object[] propertyValues, int[] getterSetters, Context cx, Scriptable scope)
public static boolean isArrayObject(java.lang.Object obj)
public static java.lang.Object[] getArrayElements(Scriptable object)
public static java.lang.String getMessage0(java.lang.String messageId)
public static java.lang.String getMessage1(java.lang.String messageId, java.lang.Object arg1)
public static java.lang.String getMessage2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)
public static java.lang.String getMessage3(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
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)
public static java.lang.String getMessage(java.lang.String messageId, java.lang.Object[] arguments)
public static EcmaError constructError(java.lang.String error, java.lang.String message)
public static EcmaError constructError(java.lang.String error, java.lang.String message, int lineNumberDelta)
public static EcmaError constructError(java.lang.String error, java.lang.String message, java.lang.String sourceName, int lineNumber, java.lang.String lineSource, int columnNumber)
public static EcmaError rangeError(java.lang.String message)
public static EcmaError typeError(java.lang.String message)
public static EcmaError typeError0(java.lang.String messageId)
public static EcmaError typeError1(java.lang.String messageId, java.lang.Object arg1)
public static EcmaError typeError2(java.lang.String messageId, java.lang.Object arg1, java.lang.Object arg2)
public static EcmaError typeError3(java.lang.String messageId, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
public static java.lang.RuntimeException undefReadError(java.lang.Object object, java.lang.Object id)
public static java.lang.RuntimeException undefCallError(java.lang.Object object, java.lang.Object id)
public static java.lang.RuntimeException undefWriteError(java.lang.Object object, java.lang.Object id, java.lang.Object value)
public static java.lang.RuntimeException notFoundError(Scriptable object, java.lang.String property)
public static java.lang.RuntimeException notFunctionError(java.lang.Object value)
public static java.lang.RuntimeException notFunctionError(java.lang.Object value, java.lang.Object messageHelper)
public static java.lang.RuntimeException notFunctionError(java.lang.Object obj, java.lang.Object value, java.lang.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, java.lang.Object compiled)
public static java.lang.String escapeAttributeValue(java.lang.Object value, Context cx)
value
- Unescaped textpublic static java.lang.String escapeTextValue(java.lang.Object value, Context cx)
value
- Unescaped textpublic static Ref memberRef(java.lang.Object obj, java.lang.Object elem, Context cx, int memberTypeFlags)
public static Ref memberRef(java.lang.Object obj, java.lang.Object namespace, java.lang.Object elem, Context cx, int memberTypeFlags)
public static Ref nameRef(java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags)
public static Ref nameRef(java.lang.Object namespace, java.lang.Object name, Context cx, Scriptable scope, int memberTypeFlags)
public static void storeUint32Result(Context cx, long value)
public static long lastUint32Result(Context cx)
public static Scriptable lastStoredScriptable(Context cx)
public static JavaScriptException throwError(Context cx, Scriptable scope, java.lang.String message)
cx
- the current contextscope
- the current scopemessage
- the messagepublic static JavaScriptException throwCustomError(Context cx, Scriptable scope, java.lang.String constructorName, java.lang.String message)
cx
- the current contextscope
- the current scopemessage
- the messagepublic static Scriptable requireObjectCoercible(Scriptable val, IdFunctionObject idFuncObj)
Copyright © 2010 - 2020 Adobe. All Rights Reserved