Package org.mozilla.javascript
Class NativeSet
- java.lang.Object
-
- org.mozilla.javascript.ScriptableObject
-
- org.mozilla.javascript.IdScriptableObject
-
- org.mozilla.javascript.NativeSet
-
- All Implemented Interfaces:
java.io.Serializable
,ConstProperties
,DebuggableObject
,IdFunctionCall
,Scriptable
,SymbolScriptable
public class NativeSet extends IdScriptableObject
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.mozilla.javascript.ScriptableObject
ScriptableObject.GetterSlot, ScriptableObject.KeyComparator, ScriptableObject.Slot, ScriptableObject.SlotAccess
-
-
Field Summary
Fields Modifier and Type Field Description private Hashtable
entries
(package private) static SymbolKey
GETSIZE
private static int
Id_add
private static int
Id_clear
private static int
Id_constructor
private static int
Id_delete
private static int
Id_entries
private static int
Id_forEach
private static int
Id_has
private static int
Id_keys
private static int
Id_values
private boolean
instanceOfSet
(package private) static java.lang.String
ITERATOR_TAG
private static int
MAX_PROTOTYPE_ID
private static long
serialVersionUID
private static java.lang.Object
SET_TAG
private static int
SymbolId_getSize
private static int
SymbolId_toStringTag
-
Fields inherited from class org.mozilla.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
-
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
-
-
Constructor Summary
Constructors Constructor Description NativeSet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.protected int
findPrototypeId(java.lang.String s)
protected int
findPrototypeId(Symbol k)
java.lang.String
getClassName()
Return the name of the class.(package private) static void
init(Context cx, Scriptable scope, boolean sealed)
protected void
initPrototypeId(int id)
private java.lang.Object
js_add(java.lang.Object k)
private java.lang.Object
js_clear()
private java.lang.Object
js_delete(java.lang.Object arg)
private java.lang.Object
js_forEach(Context cx, Scriptable scope, java.lang.Object arg1, java.lang.Object arg2)
private java.lang.Object
js_getSize()
private java.lang.Object
js_has(java.lang.Object arg)
private java.lang.Object
js_iterator(Scriptable scope, NativeCollectionIterator.Type type)
(package private) static void
loadFromIterable(Context cx, Scriptable scope, ScriptableObject set, java.lang.Object arg1)
If an "iterable" object was passed to the constructor, there are many many things to do.private static NativeSet
realThis(Scriptable thisObj, IdFunctionObject f)
-
Methods inherited from class org.mozilla.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findInstanceIdInfo, get, get, getAttributes, getAttributes, getIds, getInstanceIdName, getInstanceIdValue, getMaxInstanceId, getOwnPropertyDescriptor, has, has, hasPrototypeMap, incompatibleCallError, initPrototypeConstructor, initPrototypeMethod, initPrototypeMethod, initPrototypeMethod, initPrototypeValue, initPrototypeValue, instanceIdInfo, put, put, setAttributes, setInstanceIdAttributes, setInstanceIdValue
-
Methods inherited from class org.mozilla.javascript.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, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, 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, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
SET_TAG
private static final java.lang.Object SET_TAG
-
ITERATOR_TAG
static final java.lang.String ITERATOR_TAG
- See Also:
- Constant Field Values
-
GETSIZE
static final SymbolKey GETSIZE
-
entries
private final Hashtable entries
-
instanceOfSet
private boolean instanceOfSet
-
Id_constructor
private static final int Id_constructor
- See Also:
- Constant Field Values
-
Id_add
private static final int Id_add
- See Also:
- Constant Field Values
-
Id_delete
private static final int Id_delete
- See Also:
- Constant Field Values
-
Id_has
private static final int Id_has
- See Also:
- Constant Field Values
-
Id_clear
private static final int Id_clear
- See Also:
- Constant Field Values
-
Id_keys
private static final int Id_keys
- See Also:
- Constant Field Values
-
Id_values
private static final int Id_values
- See Also:
- Constant Field Values
-
Id_entries
private static final int Id_entries
- See Also:
- Constant Field Values
-
Id_forEach
private static final int Id_forEach
- See Also:
- Constant Field Values
-
SymbolId_getSize
private static final int SymbolId_getSize
- See Also:
- Constant Field Values
-
SymbolId_toStringTag
private static final int SymbolId_toStringTag
- See Also:
- Constant Field Values
-
MAX_PROTOTYPE_ID
private static final int MAX_PROTOTYPE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
static void init(Context cx, Scriptable scope, boolean sealed)
-
getClassName
public java.lang.String 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
-
execIdCall
public java.lang.Object execIdCall(IdFunctionObject f, Context cx, Scriptable scope, Scriptable thisObj, java.lang.Object[] args)
Description copied from class:IdScriptableObject
'thisObj' will be null if invoked as constructor, in which case instance of Scriptable should be returned.- Specified by:
execIdCall
in interfaceIdFunctionCall
- Overrides:
execIdCall
in classIdScriptableObject
-
js_add
private java.lang.Object js_add(java.lang.Object k)
-
js_delete
private java.lang.Object js_delete(java.lang.Object arg)
-
js_has
private java.lang.Object js_has(java.lang.Object arg)
-
js_clear
private java.lang.Object js_clear()
-
js_getSize
private java.lang.Object js_getSize()
-
js_iterator
private java.lang.Object js_iterator(Scriptable scope, NativeCollectionIterator.Type type)
-
js_forEach
private java.lang.Object js_forEach(Context cx, Scriptable scope, java.lang.Object arg1, java.lang.Object arg2)
-
loadFromIterable
static void loadFromIterable(Context cx, Scriptable scope, ScriptableObject set, java.lang.Object arg1)
If an "iterable" object was passed to the constructor, there are many many things to do. This is common code with NativeWeakSet.
-
realThis
private static NativeSet realThis(Scriptable thisObj, IdFunctionObject f)
-
initPrototypeId
protected void initPrototypeId(int id)
- Overrides:
initPrototypeId
in classIdScriptableObject
-
findPrototypeId
protected int findPrototypeId(Symbol k)
- Overrides:
findPrototypeId
in classIdScriptableObject
-
findPrototypeId
protected int findPrototypeId(java.lang.String s)
- Overrides:
findPrototypeId
in classIdScriptableObject
-
-