public interface IV8Module extends IV8Cacheable, IV8ValueReference, IV8Executable, IV8ValueNonProxyable
Modifier and Type | Field and Description |
---|---|
static int |
Errored
The constant Errored.
|
static int |
Evaluated
The constant Evaluated.
|
static int |
Evaluating
The constant Evaluating.
|
static int |
Instantiated
The constant Instantiated.
|
static int |
Instantiating
The constant Instantiating.
|
static int |
Uninstantiated
The constant Uninstantiated.
|
Modifier and Type | Method and Description |
---|---|
default <T extends V8Value> |
evaluate()
Evaluate the module.
|
<T extends V8Value> |
evaluate(boolean resultRequired)
Evaluate the module.
|
default <T extends V8Value> |
execute(boolean resultRequired)
Execute and return V8 value if required.
|
V8ValueError |
getException()
Gets exception.
|
int |
getIdentityHash()
Returns the identity hash for this object.
|
V8Value |
getNamespace()
Gets namespace.
|
java.lang.String |
getResourceName()
Gets resource name.
|
int |
getScriptId()
Gets script id.
|
int |
getStatus()
Gets status.
|
boolean |
instantiate()
Instantiate.
|
boolean |
isSourceTextModule()
Is source text module.
|
boolean |
isSyntheticModule()
Is synthetic module.
|
default <T,V extends V8Value> |
toObject(V v8Value)
Convert from V8 value to object.
|
default <T,V extends V8Value> |
toV8Value(T object)
Convert object to V8 value.
|
getCachedData
clearWeak, close, getHandle, getType, isClosed, isWeak, isWeak, setWeak
asBoolean, asDouble, asInt, asLong, asString, equals, getV8Runtime, isNull, isNullOrUndefined, isUndefined, sameValue, strictEquals
close
toClone, toClone
execute, executeBigInteger, executeBoolean, executeDouble, executeInteger, executeLong, executeObject, executeString, executeVoid, executeZonedDateTime
toObject
static final int Uninstantiated
static final int Instantiating
static final int Instantiated
static final int Evaluating
static final int Evaluated
static final int Errored
@CheckReturnValue default <T extends V8Value> T evaluate() throws JavetException
T
- the type parameterJavetException
- the javet exception@CheckReturnValue <T extends V8Value> T evaluate(boolean resultRequired) throws JavetException
T
- the type parameterresultRequired
- the result requiredJavetException
- the javet exception@CheckReturnValue default <T extends V8Value> T execute(boolean resultRequired) throws JavetException
IV8Executable
execute
in interface IV8Executable
T
- the type parameterresultRequired
- the result requiredJavetException
- the javet exception@CheckReturnValue V8ValueError getException() throws JavetException
JavetException
- the javet exceptionint getIdentityHash() throws JavetException
The return value will never be 0. Also, it is not guaranteed to be unique.
JavetException
- the javet exception@CheckReturnValue V8Value getNamespace() throws JavetException
The module's status must be at least kInstantiated. Otherwise, undefined is returned.
JavetException
- the javet exceptionjava.lang.String getResourceName() throws JavetException
JavetException
- the javet exceptionint getScriptId() throws JavetException
The module must be a SourceTextModule and must not have a kErrored status. Otherwise, -1 is returned.
JavetException
- the javet exceptionint getStatus() throws JavetException
JavetException
- the javet exceptionboolean instantiate() throws JavetException
JavetException
- the javet exceptionboolean isSourceTextModule() throws JavetException
JavetException
- the javet exceptionboolean isSyntheticModule() throws JavetException
JavetException
- the javet exceptiondefault <T,V extends V8Value> T toObject(V v8Value) throws JavetException
IV8Convertible
toObject
in interface IV8Convertible
T
- the type parameterV
- the type parameterv8Value
- the V8 valueJavetException
- the javet exception@CheckReturnValue default <T,V extends V8Value> V toV8Value(T object) throws JavetException
IV8Convertible
toV8Value
in interface IV8Convertible
T
- the type parameterV
- the type parameterobject
- the objectJavetException
- the javet exception