T
- the type parameterpublic class JavetReflectionProxyClassHandler<T extends java.lang.Class<?>,E extends java.lang.Exception> extends BaseJavetReflectionProxyHandler<T,E>
IJavetDirectCallable.DirectCall, IJavetDirectCallable.GetterAndNoThis<E extends java.lang.Exception>, IJavetDirectCallable.GetterAndThis<E extends java.lang.Exception>, IJavetDirectCallable.NoThisAndNoResult<E extends java.lang.Exception>, IJavetDirectCallable.NoThisAndResult<E extends java.lang.Exception>, IJavetDirectCallable.SetterAndNoThis<E extends java.lang.Exception>, IJavetDirectCallable.SetterAndThis<E extends java.lang.Exception>, IJavetDirectCallable.ThisAndNoResult<E extends java.lang.Exception>, IJavetDirectCallable.ThisAndResult<E extends java.lang.Exception>
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
METHOD_NAME_CONSTRUCTOR
The constant METHOD_NAME_CONSTRUCTOR.
|
classDescriptor, GETTER_PREFIX_ARRAY, PATTERN_CAPITALIZED_PREFIX, SETTER_PREFIX_ARRAY
callbackContexts, targetObject, v8Runtime
FUNCTION_NAME_TO_JSON, FUNCTION_NAME_TO_V8_VALUE, PROXY_FUNCTION_NAME_APPLY, PROXY_FUNCTION_NAME_CONSTRUCT, PROXY_FUNCTION_NAME_DELETE_PROPERTY, PROXY_FUNCTION_NAME_GET, PROXY_FUNCTION_NAME_GET_OWN_PROPERTY_DESCRIPTOR, PROXY_FUNCTION_NAME_GET_PROTOTYPE_OF, PROXY_FUNCTION_NAME_HAS, PROXY_FUNCTION_NAME_OWN_KEYS, PROXY_FUNCTION_NAME_SET
Constructor and Description |
---|
JavetReflectionProxyClassHandler(V8Runtime v8Runtime,
T targetObject)
Instantiates a new Javet reflection proxy handler.
|
Modifier and Type | Method and Description |
---|---|
V8Value |
construct(V8Value target,
V8ValueArray arguments,
V8Value newTarget)
handler.construct()
The handler.construct() method is a trap for the [[Construct]] object internal method,
which is used by operations such as the new operator.
|
JavetCallbackContext[] |
getCallbackContexts()
Get supported callback contexts.
|
V8ProxyMode |
getProxyMode()
Gets proxy mode.
|
V8ValueBoolean |
has(V8Value target,
V8Value property)
handler.has()
The handler.has() method is a trap for the [[HasProperty]] object internal method,
which is used by operations such as the in operator.
|
protected void |
initialize()
Initialize.
|
protected void |
initializeFieldsAndMethods(java.lang.Class<?> currentClass,
boolean staticMode)
Initialize fields and methods.
|
protected V8Value |
internalGet(V8Value target,
V8Value property)
Internal get.
|
V8ValueArray |
ownKeys(V8Value target)
handler.ownKeys()
The handler.ownKeys() method is a trap for the [[OwnPropertyKeys]] object internal method,
which is used by operations such as Object.keys(), Reflect.ownKeys(), etc.
|
V8ValueBoolean |
set(V8Value target,
V8Value propertyKey,
V8Value propertyValue,
V8Value receiver)
handler.set()
The handler.set() method is a trap for the [[Set]] object internal method,
which is used by operations such as using property accessors to set a property's value.
|
addMethod, execute, get, getByField, getByGetter, getByMethod, getGetterPrefixLength, getOwnPropertyDescriptor, getPrototypeOf, getSetterPrefixLength, hasFromGeneric, hasFromRegular, initializeConstructors, initializePublicFields, initializePublicMethods, isAllowed, isApplyFunction, isGenericGetter, isGenericSetter, setToField, setToSetter
getTargetObject, getV8Runtime
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, defineProperty, deleteProperty, isExtensible, preventExtensions, setPrototypeOf
setV8Runtime
protected static final java.lang.String METHOD_NAME_CONSTRUCTOR
public V8Value construct(V8Value target, V8ValueArray arguments, V8Value newTarget) throws JavetException
IJavetProxyHandler
target
- the targetarguments
- the argumentsnewTarget
- the new targetJavetException
- the javet exceptionpublic JavetCallbackContext[] getCallbackContexts()
IJavetDirectCallable
public V8ProxyMode getProxyMode()
BaseJavetReflectionProxyHandler
getProxyMode
in class BaseJavetReflectionProxyHandler<T extends java.lang.Class<?>,E extends java.lang.Exception>
public V8ValueBoolean has(V8Value target, V8Value property) throws JavetException
IJavetProxyHandler
target
- the targetproperty
- the propertyJavetException
- the javet exceptionprotected void initialize()
BaseJavetReflectionProxyHandler
initialize
in class BaseJavetReflectionProxyHandler<T extends java.lang.Class<?>,E extends java.lang.Exception>
protected void initializeFieldsAndMethods(java.lang.Class<?> currentClass, boolean staticMode)
currentClass
- the current classstaticMode
- the static modeprotected V8Value internalGet(V8Value target, V8Value property) throws JavetException, E extends java.lang.Exception
BaseJavetReflectionProxyHandler
internalGet
in class BaseJavetReflectionProxyHandler<T extends java.lang.Class<?>,E extends java.lang.Exception>
target
- the targetproperty
- the propertyJavetException
- the javet exceptionE
- the custom exceptionE extends java.lang.Exception
public V8ValueArray ownKeys(V8Value target) throws JavetException
IJavetProxyHandler
target
- the targetJavetException
- the javet exceptionpublic V8ValueBoolean set(V8Value target, V8Value propertyKey, V8Value propertyValue, V8Value receiver) throws JavetException
IJavetProxyHandler
target
- the targetpropertyKey
- the property keypropertyValue
- the property valuereceiver
- the receiverJavetException
- the javet exception