public class JavetProxyPluginSet extends BaseJavetProxyPluginSingle<java.util.Set<java.lang.Object>>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
ADD |
protected static java.lang.String |
CLEAR |
protected static java.lang.String[] |
DEFAULT_PROXYABLE_METHODS
The constant DEFAULT_PROXYABLE_METHODS.
|
protected static java.lang.String |
DELETE |
protected static java.lang.String |
ENTRIES |
protected static java.lang.String |
ERROR_TARGET_OBJECT_MUST_BE_AN_INSTANCE_OF_SET |
protected static java.lang.String |
FOR_EACH |
protected static java.lang.String |
HAS |
protected static java.lang.String |
KEYS |
static java.lang.String |
NAME
The constant NAME.
|
protected static java.lang.String |
OBJECT_SET |
protected java.util.Set<java.lang.String> |
proxyableMethods
The Override methods.
|
protected static java.lang.String |
SIZE |
protected static java.lang.String |
VALUES |
proxyGetByStringMap, proxyGetBySymbolMap
HINT_BOOLEAN, HINT_DEFAULT, HINT_NUMBER, HINT_STRING, OBJECT_CONVERTER, PROXY_CONVERTER, TO_JSON, TO_STRING, VALUE_OF
Constructor and Description |
---|
JavetProxyPluginSet() |
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 |
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.
|
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.
|
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 |
toJSON(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Set.toJSON().
|
V8Value |
toString(V8Runtime v8Runtime,
java.lang.Object targetObject)
Polyfill Object.prototype.toString()
The toString() method of Set instances always returns [object Set].
|
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, getTargetObjectConstructor
callWithObjectConverter, deleteByObject, getByIndex, getProxySymbolToPrimitive, isDeleteSupported, isIndexSupported, setByIndex, symbolToPrimitive, typeErrorFunctionIsNotSupported
public 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 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 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 VALUES
protected final java.util.Set<java.lang.String> proxyableMethods
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
BaseJavetProxyPluginSingle
createTargetObject
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 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()
IClassProxyPlugin
public java.lang.Object[] getProxyOwnKeys(java.lang.Object targetObject)
IClassProxyPlugin
getProxyOwnKeys
in interface IClassProxyPlugin
getProxyOwnKeys
in class BaseJavetProxyPlugin
targetObject
- the target objectpublic <T> IJavetEntityPropertyDescriptor<T> getProxyOwnPropertyDescriptor(java.lang.Object targetObject, java.lang.Object propertyName)
IClassProxyPlugin
getProxyOwnPropertyDescriptor
in interface IClassProxyPlugin
getProxyOwnPropertyDescriptor
in class BaseJavetProxyPlugin
T
- 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)
IClassProxyPlugin
hasByObject
in interface IClassProxyPlugin
hasByObject
in class BaseJavetProxyPlugin
targetObject
- the target objectpropertyKey
- the property keypublic boolean isHasSupported(java.lang.Class<?> targetClass)
IClassProxyPlugin
isHasSupported
in interface IClassProxyPlugin
isHasSupported
in class BaseJavetProxyPlugin
targetClass
- the target classpublic boolean isMethodProxyable(java.lang.String methodName, java.lang.Class<?> targetClass)
IClassProxyPlugin
methodName
- the method nametargetClass
- the target classpublic boolean isOwnKeysSupported(java.lang.Class<?> targetClass)
IClassProxyPlugin
isOwnKeysSupported
in interface IClassProxyPlugin
isOwnKeysSupported
in class BaseJavetProxyPlugin
targetClass
- the target classpublic boolean isProxyable(java.lang.Class<?> targetClass)
IClassProxyPlugin
targetClass
- the target classpublic boolean isUniqueKeySupported(java.lang.Class<?> targetClass)
IClassProxyPlugin
isUniqueKeySupported
in interface IClassProxyPlugin
isUniqueKeySupported
in class BaseJavetProxyPlugin
targetClass
- the target classpublic void populateUniqueKeys(java.util.Set<java.lang.String> uniqueKeySet, java.lang.Object targetObject)
IClassProxyPlugin
populateUniqueKeys
in interface IClassProxyPlugin
populateUniqueKeys
in class BaseJavetProxyPlugin
uniqueKeySet
- 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 toJSON(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime
- the V8 runtimetargetObject
- the target objectJavetException
- the javet exceptionpublic V8Value toString(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)
BaseJavetProxyPluginSingle
validateTargetObject
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