public abstract class BaseJavetProxyPlugin extends java.lang.Object implements IClassProxyPlugin
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
HINT_BOOLEAN
The constant HINT_BOOLEAN.
|
protected static java.lang.String |
HINT_DEFAULT
The constant HINT_DEFAULT.
|
protected static java.lang.String |
HINT_NUMBER
The constant HINT_NUMBER.
|
protected static java.lang.String |
HINT_STRING
The constant HINT_STRING.
|
protected static JavetObjectConverter |
OBJECT_CONVERTER
The constant OBJECT_CONVERTER.
|
protected static JavetProxyConverter |
PROXY_CONVERTER
The constant PROXY_CONVERTER.
|
protected static java.lang.String |
TO_JSON
The constant TO_JSON.
|
protected static java.lang.String |
TO_STRING
The constant TO_STRING.
|
protected static java.lang.String |
VALUE_OF
The constant VALUE_OF.
|
| Constructor and Description |
|---|
BaseJavetProxyPlugin()
Instantiates a new Base javet proxy plugin.
|
| Modifier and Type | Method and Description |
|---|---|
protected V8Value |
callWithObjectConverter(java.lang.String functionName,
V8Runtime v8Runtime,
java.lang.Object targetObject)
Call function with the object converter by name.
|
boolean |
deleteByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
Delete by object property.
|
java.lang.Object |
getByIndex(java.lang.Object targetObject,
int index)
Gets by index.
|
<E extends java.lang.Exception> |
getProxyGetBySymbol(java.lang.Class<?> targetClass,
java.lang.String symbolName)
Gets proxy get function by symbol property.
|
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.
|
<E extends java.lang.Exception> |
getProxySymbolToPrimitive()
Gets proxy symbol to primitive function.
|
<E extends java.lang.Exception> |
getTargetObjectConstructor(java.lang.Class<?> targetClass)
Gets target object constructor.
|
boolean |
hasByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
Has by object property.
|
boolean |
isDeleteSupported(java.lang.Class<?> targetClass)
Is keyword delete supported.
|
boolean |
isHasSupported(java.lang.Class<?> targetClass)
Is has() supported.
|
boolean |
isIndexSupported(java.lang.Class<?> targetClass)
Is index supported.
|
boolean |
isOwnKeysSupported(java.lang.Class<?> targetClass)
Is ownKeys() supported.
|
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.
|
boolean |
setByIndex(java.lang.Object targetObject,
int index,
java.lang.Object value)
Sets by index.
|
V8Value |
symbolToPrimitive(V8Runtime v8Runtime,
java.lang.Object targetObject)
Convert to primitive.
|
protected V8Value |
typeErrorFunctionIsNotSupported(java.lang.String functionName,
V8Runtime v8Runtime)
TypeError: ${functionName}() is not supported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getProxyGetByString, isMethodProxyable, isProxyableprotected static final java.lang.String HINT_BOOLEAN
protected static final java.lang.String HINT_DEFAULT
protected static final java.lang.String HINT_NUMBER
protected static final java.lang.String HINT_STRING
protected static final JavetObjectConverter OBJECT_CONVERTER
protected static final JavetProxyConverter PROXY_CONVERTER
protected static final java.lang.String TO_JSON
protected static final java.lang.String TO_STRING
protected static final java.lang.String VALUE_OF
public BaseJavetProxyPlugin()
protected V8Value callWithObjectConverter(java.lang.String functionName, V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
functionName - the function namev8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exceptionpublic boolean deleteByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
IClassProxyPlugindeleteByObject in interface IClassProxyPlugintargetObject - the target objectpropertyKey - the property keypublic java.lang.Object getByIndex(java.lang.Object targetObject,
int index)
IClassProxyPlugingetByIndex in interface IClassProxyPlugintargetObject - the target objectindex - the indexpublic <E extends java.lang.Exception> IClassProxyPluginFunction<E> getProxyGetBySymbol(java.lang.Class<?> targetClass, java.lang.String symbolName)
IClassProxyPlugingetProxyGetBySymbol in interface IClassProxyPluginE - the type parametertargetClass - the target classsymbolName - the symbol namepublic java.lang.Object[] getProxyOwnKeys(java.lang.Object targetObject)
IClassProxyPlugingetProxyOwnKeys in interface IClassProxyPlugintargetObject - the target objectpublic <T> IJavetEntityPropertyDescriptor<T> getProxyOwnPropertyDescriptor(java.lang.Object targetObject, java.lang.Object propertyName)
IClassProxyPlugingetProxyOwnPropertyDescriptor in interface IClassProxyPluginT - the type parametertargetObject - the target objectpropertyName - the property namepublic <E extends java.lang.Exception> IClassProxyPluginFunction<E> getProxySymbolToPrimitive()
IClassProxyPlugingetProxySymbolToPrimitive in interface IClassProxyPluginE - the type parameterpublic <E extends java.lang.Exception> IClassProxyPluginFunction<E> getTargetObjectConstructor(java.lang.Class<?> targetClass)
IClassProxyPlugingetTargetObjectConstructor in interface IClassProxyPluginE - the type parametertargetClass - the target classpublic boolean hasByObject(java.lang.Object targetObject,
java.lang.Object propertyKey)
IClassProxyPluginhasByObject in interface IClassProxyPlugintargetObject - the target objectpropertyKey - the property keypublic boolean isDeleteSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisDeleteSupported in interface IClassProxyPlugintargetClass - the target classpublic boolean isHasSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisHasSupported in interface IClassProxyPlugintargetClass - the target classpublic boolean isIndexSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisIndexSupported in interface IClassProxyPlugintargetClass - the target classpublic boolean isOwnKeysSupported(java.lang.Class<?> targetClass)
IClassProxyPluginisOwnKeysSupported in interface IClassProxyPlugintargetClass - the target classpublic boolean isUniqueKeySupported(java.lang.Class<?> targetClass)
IClassProxyPluginisUniqueKeySupported in interface IClassProxyPlugintargetClass - the target classpublic void populateUniqueKeys(java.util.Set<java.lang.String> uniqueKeySet,
java.lang.Object targetObject)
IClassProxyPluginpopulateUniqueKeys in interface IClassProxyPluginuniqueKeySet - the unique key settargetObject - the target objectpublic boolean setByIndex(java.lang.Object targetObject,
int index,
java.lang.Object value)
IClassProxyPluginsetByIndex in interface IClassProxyPlugintargetObject - the target objectindex - the indexvalue - the valuepublic V8Value symbolToPrimitive(V8Runtime v8Runtime, java.lang.Object targetObject) throws JavetException
v8Runtime - the V8 runtimetargetObject - the target objectJavetException - the javet exception