Class NativeObject
java.lang.Object
org.mozilla.javascript.ScriptableObject
org.mozilla.javascript.IdScriptableObject
org.mozilla.javascript.NativeObject
- All Implemented Interfaces:
Serializable, Map, ConstProperties, DebuggableObject, IdFunctionCall, Scriptable, SymbolScriptable
- Direct Known Subclasses:
NativeIterator.StopIteration
This class implements the Object native object. See ECMA 15.2.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class
(package private) class
(package private) class
Nested classes/interfaces inherited from class ScriptableObject
ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final Object
private static final long
Fields inherited from class ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface Scriptable
NOT_FOUND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
boolean
containsKey
(Object key) boolean
containsValue
(Object value) entrySet()
execIdCall
(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) 'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.protected void
protected int
Return the name of the class.private static Scriptable
getCompatibleObject
(Context cx, Scriptable scope, Object arg) (package private) static void
init
(Scriptable scope, boolean sealed) protected void
initPrototypeId
(int id) private boolean
isEnumerable
(int index, Object obj) private boolean
isEnumerable
(String key, Object obj) private boolean
isEnumerable
(Symbol sym, Object obj) keySet()
void
toString()
values()
Methods inherited from class IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, findInstanceIdInfo, findInstanceIdInfo, findPrototypeId, get, get, getAttributes, getAttributes, getIds, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, has, hasPrototypeMap, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValue
Methods inherited from class ScriptableObject
addLazilyInitializedValue, applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildClassCtor, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, checkValidAttributes, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAll, size
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
OBJECT_TAG
-
ConstructorId_getPrototypeOf
private static final int ConstructorId_getPrototypeOf- See Also:
-
ConstructorId_keys
private static final int ConstructorId_keys- See Also:
-
ConstructorId_getOwnPropertyNames
private static final int ConstructorId_getOwnPropertyNames- See Also:
-
ConstructorId_getOwnPropertyDescriptor
private static final int ConstructorId_getOwnPropertyDescriptor- See Also:
-
ConstructorId_defineProperty
private static final int ConstructorId_defineProperty- See Also:
-
ConstructorId_isExtensible
private static final int ConstructorId_isExtensible- See Also:
-
ConstructorId_preventExtensions
private static final int ConstructorId_preventExtensions- See Also:
-
ConstructorId_defineProperties
private static final int ConstructorId_defineProperties- See Also:
-
ConstructorId_create
private static final int ConstructorId_create- See Also:
-
ConstructorId_isSealed
private static final int ConstructorId_isSealed- See Also:
-
ConstructorId_isFrozen
private static final int ConstructorId_isFrozen- See Also:
-
ConstructorId_seal
private static final int ConstructorId_seal- See Also:
-
ConstructorId_freeze
private static final int ConstructorId_freeze- See Also:
-
ConstructorId_getOwnPropertySymbols
private static final int ConstructorId_getOwnPropertySymbols- See Also:
-
ConstructorId_assign
private static final int ConstructorId_assign- See Also:
-
ConstructorId_is
private static final int ConstructorId_is- See Also:
-
ConstructorId_setPrototypeOf
private static final int ConstructorId_setPrototypeOf- See Also:
-
ConstructorId_entries
private static final int ConstructorId_entries- See Also:
-
ConstructorId_fromEntries
private static final int ConstructorId_fromEntries- See Also:
-
ConstructorId_values
private static final int ConstructorId_values- See Also:
-
Id_constructor
private static final int Id_constructor- See Also:
-
Id_toString
private static final int Id_toString- See Also:
-
Id_toLocaleString
private static final int Id_toLocaleString- See Also:
-
Id_valueOf
private static final int Id_valueOf- See Also:
-
Id_hasOwnProperty
private static final int Id_hasOwnProperty- See Also:
-
Id_propertyIsEnumerable
private static final int Id_propertyIsEnumerable- See Also:
-
Id_isPrototypeOf
private static final int Id_isPrototypeOf- See Also:
-
Id_toSource
private static final int Id_toSource- See Also:
-
Id___defineGetter__
private static final int Id___defineGetter__- See Also:
-
Id___defineSetter__
private static final int Id___defineSetter__- See Also:
-
Id___lookupGetter__
private static final int Id___lookupGetter__- See Also:
-
Id___lookupSetter__
private static final int Id___lookupSetter__- See Also:
-
MAX_PROTOTYPE_ID
private static final int MAX_PROTOTYPE_ID- See Also:
-
-
Constructor Details
-
NativeObject
public NativeObject()
-
-
Method Details
-
init
-
getClassName
Description copied from class:ScriptableObject
Return the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassName
in interfaceScriptable
- Specified by:
getClassName
in classScriptableObject
-
toString
-
fillConstructorProperties
- Overrides:
fillConstructorProperties
in classIdScriptableObject
-
initPrototypeId
protected void initPrototypeId(int id) - Overrides:
initPrototypeId
in classIdScriptableObject
-
execIdCall
public Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, Object[] args) Description copied from class:IdScriptableObject
'thisObj' will be null if invoked as constructor, in which case * instance of Scriptable should be returned.- Specified by:
execIdCall
in interfaceIdFunctionCall
- Overrides:
execIdCall
in classIdScriptableObject
-
isEnumerable
-
isEnumerable
-
isEnumerable
-
getCompatibleObject
-
containsKey
- Specified by:
containsKey
in interfaceMap
-
containsValue
- Specified by:
containsValue
in interfaceMap
-
remove
-
keySet
-
values
-
entrySet
-
put
-
putAll
-
clear
-
findPrototypeId
- Overrides:
findPrototypeId
in classIdScriptableObject
-