public interface ShellJavaScriptHost
Modifier and Type | Method and Description |
---|---|
void |
createNativeMethods(TreeLogger logger,
List<JsniMethod> jsniMethods,
DispatchIdOracle dispatchIdOracle)
Define one or more JSNI methods.
|
void |
exceptionCaught(Object exception)
Call this when a JavaScript exception is caught.
|
boolean |
invokeNativeBoolean(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a boolean value.
|
byte |
invokeNativeByte(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a byte value.
|
char |
invokeNativeChar(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a character value.
|
double |
invokeNativeDouble(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a double value.
|
float |
invokeNativeFloat(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a float value.
|
int |
invokeNativeInt(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns an integer value.
|
long |
invokeNativeLong(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a long value.
|
Object |
invokeNativeObject(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns an object value.
|
short |
invokeNativeShort(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns a short value.
|
void |
invokeNativeVoid(String name,
Object jthis,
Class<?>[] types,
Object[] args)
Invoke a native JavaScript function that returns no value.
|
void |
log(String message,
Throwable e)
Logs to the dev shell logger.
|
<T> T |
rebindAndCreate(String requestedTypeName)
Resolves a deferred binding request and create the requested object.
|
void createNativeMethods(TreeLogger logger, List<JsniMethod> jsniMethods, DispatchIdOracle dispatchIdOracle)
logger
- compiledClass
- jsniMethods
- dispatchIdOracle
- void exceptionCaught(Object exception)
boolean invokeNativeBoolean(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
byte invokeNativeByte(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
char invokeNativeChar(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
double invokeNativeDouble(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
float invokeNativeFloat(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
int invokeNativeInt(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
long invokeNativeLong(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
Object invokeNativeObject(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
short invokeNativeShort(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
void invokeNativeVoid(String name, Object jthis, Class<?>[] types, Object[] args) throws Throwable
Throwable
<T> T rebindAndCreate(String requestedTypeName) throws UnableToCompleteException
UnableToCompleteException
Copyright © 2018. All rights reserved.