public class JavetProxyPluginSet extends BaseJavetProxyPluginSingle<java.util.Set<java.lang.Object>>
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ADD
The JavaScript method name 'add'.
|
protected static java.lang.String |
CLEAR
The JavaScript method name 'clear'.
|
protected static java.lang.String[] |
DEFAULT_PROXYABLE_METHODS
The constant DEFAULT_PROXYABLE_METHODS.
|
protected static java.lang.String |
DELETE
The JavaScript method name 'delete'.
|
protected static java.lang.String |
DIFFERENCE
The JavaScript method name 'difference'.
|
protected static java.lang.String |
ENTRIES
The JavaScript method name 'entries'.
|
protected static java.lang.String |
ERROR_TARGET_OBJECT_MUST_BE_AN_INSTANCE_OF_SET
The error message for invalid target object.
|
protected static java.lang.String |
FOR_EACH
The JavaScript method name 'forEach'.
|
protected static java.lang.String |
HAS
The JavaScript method name 'has'.
|
protected static java.lang.String |
INTERSECTION
The JavaScript method name 'intersection'.
|
protected static java.lang.String |
IS_DISJOINT_FROM
The JavaScript method name 'isDisjointFrom'.
|
protected static java.lang.String |
IS_SUBSET_OF
The JavaScript method name 'isSubsetOf'.
|
protected static java.lang.String |
IS_SUPERSET_OF
The JavaScript method name 'isSupersetOf'.
|
protected static java.lang.String |
KEYS
The JavaScript method name 'keys'.
|
static java.lang.String |
NAME
The constant NAME.
|
protected static java.lang.String |
OBJECT_SET
The string representation '[object Set]'.
|
protected java.util.Set<java.lang.String> |
proxyableMethods
The Override methods.
|
protected static java.lang.String |
SIZE
The JavaScript property name 'size'.
|
protected static java.lang.String |
SYMMETRIC_DIFFERENCE
The JavaScript method name 'symmetricDifference'.
|
protected static java.lang.String |
UNION
The JavaScript method name 'union'.
|
protected static java.lang.String |
VALUES
The JavaScript method name 'values'.
|
proxyGetByStringMap, proxyGetBySymbolMapHINT_BOOLEAN, HINT_DEFAULT, HINT_NUMBER, HINT_STRING, OBJECT_CONVERTER, PROXY_CONVERTER, TO_JSON, TO_STRING, VALUE_OF| Constructor and Description |
|---|
JavetProxyPluginSet()
Instantiates a new Javet proxy plugin for
Set with default proxyable methods. |
| Modifier and Type | Method and Description |
|---|---|
V8Value |
add(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.add().
|
V8Value |
clear(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.clear().
|
protected V8Value |
createTargetObject(V8Runtime v8Runtime,
java.lang.Object targetObject)
Create target object.
|
V8Value |
delete(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.delete().
|
V8Value |
difference(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.difference().
|
V8Value |
entries(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.entries().
|
V8Value |
forEach(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.forEach()
The forEach() method of Set instances executes a provided function once for each value in this set,
in insertion order.
|
static JavetProxyPluginSet |
getInstance()
Gets instance.
|
java.lang.String |
getName()
Gets the plugin name.
|
java.lang.Object[] |
getProxyOwnKeys(java.lang.Object targetObject)
Get proxy own keys for Object.getOwnPropertyNames().
|
<T> IJavetEntityPropertyDescriptor<T> |
getProxyOwnPropertyDescriptor(java.lang.Object targetObject,
java.lang.Object propertyName)
Gets proxy own property descriptor.
|
V8Value |
has(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.has().
|
boolean |
hasByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
Has by object property.
|
V8Value |
intersection(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.intersection().
|
V8Value |
isDisjointFrom(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.isDisjointFrom().
|
boolean |
isHasSupported(java.lang.Class<?> targetClass)
Is has() supported.
|
boolean |
isMethodProxyable(java.lang.String methodName,
java.lang.Class<?> targetClass)
Is method proxyable.
|
boolean |
isOwnKeysSupported(java.lang.Class<?> targetClass)
Is ownKeys() supported.
|
boolean |
isProxyable(java.lang.Class<?> targetClass)
Is the target class proxyable.
|
V8Value |
isSubsetOf(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.isSubsetOf().
|
V8Value |
isSupersetOf(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.isSupersetOf().
|
boolean |
isUniqueKeySupported(java.lang.Class<?> targetClass)
Is unique key supported.
|
void |
populateUniqueKeys(java.util.Set<java.lang.String> uniqueKeySet,
java.lang.Object targetObject)
Populate unique keys.
|
V8Value |
size(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.size
The size accessor property of Set instances returns the number of (unique) elements in this set.
|
V8Value |
symmetricDifference(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.symmetricDifference().
|
V8Value |
toJSON(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.toJSON().
|
protected java.util.Set<java.lang.Object> |
toOtherSet(V8Runtime v8Runtime,
V8Value[] v8Values)
Converts the first argument to a Java Set.
|
V8Value |
toString(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Object.prototype.toString()
The toString() method of Set instances always returns [object Set].
|
V8Value |
union(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.union().
|
protected java.util.Set<java.lang.Object> |
validateTargetObject(java.lang.Object targetObject)
Validate and return target object.
|
V8Value |
valueOf(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Object.prototype.valueOf().
|
V8Value |
values(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.prototype.values().
|
getProxyGetByString, getProxyGetBySymbol, getTargetObjectConstructorcallWithObjectConverter, deleteByObject, getByIndex, getProxySymbolToPrimitive, isDeleteSupported, isIndexSupported, setByIndex, symbolToPrimitive, typeErrorFunctionIsNotSupportedpublic static final java.lang.String NAME
protected static final java.lang.String ADD
protected static final java.lang.String CLEAR
protected static final java.lang.String DELETE
protected static final java.lang.String DIFFERENCE
protected static final java.lang.String ENTRIES
protected static final java.lang.String ERROR_TARGET_OBJECT_MUST_BE_AN_INSTANCE_OF_SET
protected static final java.lang.String FOR_EACH
protected static final java.lang.String HAS
protected static final java.lang.String INTERSECTION
protected static final java.lang.String IS_DISJOINT_FROM
protected static final java.lang.String IS_SUBSET_OF
protected static final java.lang.String IS_SUPERSET_OF
protected static final java.lang.String KEYS
protected static final java.lang.String OBJECT_SET
protected static final java.lang.String SIZE
protected static final java.lang.String[] DEFAULT_PROXYABLE_METHODS
protected static final java.lang.String SYMMETRIC_DIFFERENCE
protected static final java.lang.String UNION
protected static final java.lang.String VALUES
protected final java.util.Set<java.lang.String> proxyableMethods
public JavetProxyPluginSet()
Set with default proxyable methods.public static JavetProxyPluginSet getInstance()
public V8Value add(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value clear(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionprotected V8Value createTargetObject(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
BaseJavetProxyPluginSinglecreateTargetObject in class BaseJavetProxyPluginSingle<java.util.Set<java.lang.Object>>v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value delete(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value difference(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value entries(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value forEach(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic java.lang.String getName()
IClassProxyPluginpublic java.lang.Object[] getProxyOwnKeys(java.lang.Object targetObject)
IClassProxyPlugingetProxyOwnKeys in interface IClassProxyPlugingetProxyOwnKeys in class BaseJavetProxyPlugintargetObject - the target objectpublic <T> IJavetEntityPropertyDescriptor<T> getProxyOwnPropertyDescriptor(java.lang.Object targetObject, java.lang.Object propertyName)
IClassProxyPlugingetProxyOwnPropertyDescriptor in interface IClassProxyPlugingetProxyOwnPropertyDescriptor in class BaseJavetProxyPluginT - the type parametertargetObject - the target objectpropertyName - the property namepublic V8Value has(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic boolean hasByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
IClassProxyPluginhasByObject in interface IClassProxyPluginhasByObject in class BaseJavetProxyPlugintargetObject - the target objectpropertyKey - the property keypublic V8Value intersection(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value isDisjointFrom(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic boolean isHasSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisHasSupported in interface IClassProxyPluginisHasSupported in class BaseJavetProxyPlugintargetClass - the target classpublic boolean isMethodProxyable(java.lang.String methodName,
java.lang.Class<?> targetClass)
IClassProxyPluginmethodName - the method nametargetClass - the target classpublic boolean isOwnKeysSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisOwnKeysSupported in interface IClassProxyPluginisOwnKeysSupported in class BaseJavetProxyPlugintargetClass - the target classpublic boolean isProxyable(java.lang.Class<?> targetClass)
IClassProxyPlugintargetClass - the target classpublic V8Value isSubsetOf(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value isSupersetOf(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic boolean isUniqueKeySupported(java.lang.Class<?> targetClass)
IClassProxyPluginisUniqueKeySupported in interface IClassProxyPluginisUniqueKeySupported in class BaseJavetProxyPlugintargetClass - the target classpublic void populateUniqueKeys(java.util.Set<java.lang.String> uniqueKeySet,
java.lang.Object targetObject)
IClassProxyPluginpopulateUniqueKeys in interface IClassProxyPluginpopulateUniqueKeys in class BaseJavetProxyPluginuniqueKeySet - the unique key settargetObject - the target objectpublic V8Value size(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value symmetricDifference(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value toJSON(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionprotected java.util.Set<java.lang.Object> toOtherSet(V8Runtime v8Runtime, V8Value[] v8Values) throws JavetException
v8Runtime - the V8 runtimev8Values - the V8 valuesJavetException - the javet exceptionpublic V8Value toString(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value union(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionprotected java.util.Set<java.lang.Object> validateTargetObject(java.lang.Object targetObject)
BaseJavetProxyPluginSinglevalidateTargetObject in class BaseJavetProxyPluginSingle<java.util.Set<java.lang.Object>>targetObject - the target objectpublic V8Value valueOf(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic V8Value values(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exception