Package org.htmlunit.corejs.javascript
Class NativeSet
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.corejs.javascript.IdScriptableObject
-
- org.htmlunit.corejs.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.htmlunit.corejs.javascript.ScriptableObject
ScriptableObject.KeyComparator
-
-
Field Summary
Fields Modifier and Type Field Description private Hashtableentries(package private) static SymbolKeyGETSIZEprivate static intId_addprivate static intId_clearprivate static intId_constructorprivate static intId_deleteprivate static intId_entriesprivate static intId_forEachprivate static intId_hasprivate static intId_keysprivate static intId_valuesprivate booleaninstanceOfSet(package private) static java.lang.StringITERATOR_TAGprivate static intMAX_PROTOTYPE_IDprivate static longserialVersionUIDprivate static java.lang.ObjectSET_TAGprivate static intSymbolId_getSizeprivate static intSymbolId_toStringTag-
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
-
Fields inherited from interface org.htmlunit.corejs.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.ObjectexecIdCall(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 intfindPrototypeId(java.lang.String s)protected intfindPrototypeId(Symbol k)java.lang.StringgetClassName()Return the name of the class.(package private) static voidinit(Context cx, Scriptable scope, boolean sealed)protected voidinitPrototypeId(int id)private java.lang.Objectjs_add(java.lang.Object k)private java.lang.Objectjs_clear()private java.lang.Objectjs_delete(java.lang.Object arg)private java.lang.Objectjs_forEach(Context cx, Scriptable scope, java.lang.Object arg1, java.lang.Object arg2)private java.lang.Objectjs_getSize()private java.lang.Objectjs_has(java.lang.Object arg)private java.lang.Objectjs_iterator(Scriptable scope, NativeCollectionIterator.Type type)(package private) static voidloadFromIterable(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 NativeSetrealThis(Scriptable thisObj, IdFunctionObject f)-
Methods inherited from class org.htmlunit.corejs.javascript.IdScriptableObject
activatePrototypeMap, addIdFunctionProperty, defaultGet, defaultHas, defaultPut, defineOwnProperty, delete, delete, ensureType, exportAsJSClass, fillConstructorProperties, findInstanceIdInfo, findInstanceIdInfo, 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 org.htmlunit.corejs.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, defineProperty, defineProperty, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getBase, getBase, 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, putImpl, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, 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:ScriptableObjectReturn the name of the class.This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
- Specified by:
getClassNamein interfaceScriptable- Specified by:
getClassNamein 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:
execIdCallin interfaceIdFunctionCall- Overrides:
execIdCallin 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:
initPrototypeIdin classIdScriptableObject
-
findPrototypeId
protected int findPrototypeId(Symbol k)
- Overrides:
findPrototypeIdin classIdScriptableObject
-
findPrototypeId
protected int findPrototypeId(java.lang.String s)
- Overrides:
findPrototypeIdin classIdScriptableObject
-
-