public abstract class BaseJavetConverter extends java.lang.Object implements IJavetConverter
| Modifier and Type | Field and Description |
|---|---|
protected JavetConverterConfig<?> |
config
The Config.
|
| Constructor and Description |
|---|
BaseJavetConverter()
Instantiates a new Base javet converter.
|
| Modifier and Type | Method and Description |
|---|---|
JavetConverterConfig<?> |
getConfig()
Gets config.
|
void |
setConfig(JavetConverterConfig<?> config)
Sets config.
|
<T> T |
toObject(V8Value v8Value)
To object from V8 value.
|
protected abstract <T> T |
toObject(V8Value v8Value,
int depth)
To object with stack depth.
|
<T extends V8Value> |
toV8Value(V8Runtime v8Runtime,
java.lang.Object object)
To V8 value from object.
|
protected abstract <T extends V8Value> |
toV8Value(V8Runtime v8Runtime,
java.lang.Object object,
int depth)
To V8 value with stack depth.
|
protected void |
validateDepth(int depth)
Validate the stack depth.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoObjectprotected JavetConverterConfig<?> config
public BaseJavetConverter()
public JavetConverterConfig<?> getConfig()
IJavetConvertergetConfig in interface IJavetConverterpublic void setConfig(JavetConverterConfig<?> config)
config - the configpublic final <T> T toObject(V8Value v8Value) throws JavetException
IJavetConverterDon't override this function, instead, override the one with depth as argument for circular structure detection.
toObject in interface IJavetConverterT - the type parameterv8Value - the V8 valueJavetException - the javet exceptionprotected abstract <T> T toObject(V8Value v8Value, int depth) throws JavetException
T - the type parameterv8Value - the V8 valuedepth - the stack depthJavetException - the javet exception@CheckReturnValue public final <T extends V8Value> T toV8Value(V8Runtime v8Runtime, java.lang.Object object) throws JavetException
IJavetConverterDon't override this function, instead, override the one with depth as argument for circular structure detection.
toV8Value in interface IJavetConverterT - the type parameterv8Runtime - the V8 runtimeobject - the objectJavetException - the javet exception@CheckReturnValue protected abstract <T extends V8Value> T toV8Value(V8Runtime v8Runtime, java.lang.Object object, int depth) throws JavetException
T - the type parameterv8Runtime - the V8 runtimeobject - the objectdepth - the stack depthJavetException - the javet exceptionprotected void validateDepth(int depth)
throws JavetException
depth - the stack depthJavetException - the javet exception