public final class JNICalls extends Object
JNICalls also perform JNI call tracing and exception handling. All JNI calls into HotSpot
must use this support to correctly merge HotSpot and native image stack traces.| Modifier and Type | Class and Description |
|---|---|
static interface |
JNICalls.JNIMethod
Represents a JNI method.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
callBoolean(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
boolean. |
byte |
callByte(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
byte. |
char |
callChar(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
char. |
double |
callDouble(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
double. |
float |
callFloat(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
float. |
int |
callInt(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
int. |
<R extends JNI.JObject> |
callJObject(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
Object. |
long |
callLong(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
long. |
<R extends JNI.JObject> |
callNewObject(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod constructor,
JNI.JValue args)
Creates a new object instance using a given constructor.
|
short |
callShort(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a method returning
short. |
boolean |
callStaticBoolean(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a static method returning
boolean. |
int |
callStaticInt(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a static method returning
int. |
<R extends JNI.JObject> |
callStaticJObject(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a static method returning
Object. |
long |
callStaticLong(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a static method returning
long. |
void |
callStaticVoid(JNI.JNIEnv env,
JNI.JClass clazz,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a static void method.
|
void |
callVoid(JNI.JNIEnv env,
JNI.JObject object,
JNICalls.JNIMethod method,
JNI.JValue args)
Performs a JNI call of a void method.
|
static JNICalls |
createWithExceptionHandler(JNIExceptionWrapper.ExceptionHandler handler)
Creates a new
JNICalls instance with a custom exception handler. |
static JNICalls |
getDefault()
Returns a
JNICalls instance with a default exception handler. |
public static JNICalls getDefault()
JNICalls instance with a default exception handler. The default exception
handler rethrows any pending JNI exception as a JNIExceptionWrapper.public static JNICalls createWithExceptionHandler(JNIExceptionWrapper.ExceptionHandler handler)
JNICalls instance with a custom exception handler. The given exception
handler is used to handle pending JNI exceptions.public void callStaticVoid(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod method, JNI.JValue args)
public boolean callStaticBoolean(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod method, JNI.JValue args)
boolean.public long callStaticLong(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod method, JNI.JValue args)
long.public int callStaticInt(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod method, JNI.JValue args)
int.public <R extends JNI.JObject> R callStaticJObject(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod method, JNI.JValue args)
Object.public <R extends JNI.JObject> R callNewObject(JNI.JNIEnv env, JNI.JClass clazz, JNICalls.JNIMethod constructor, JNI.JValue args)
public void callVoid(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
public <R extends JNI.JObject> R callJObject(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
Object.public boolean callBoolean(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
boolean.public short callShort(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
short.public int callInt(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
int.public long callLong(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
long.public double callDouble(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
double.public float callFloat(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
float.public byte callByte(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
byte.public char callChar(JNI.JNIEnv env, JNI.JObject object, JNICalls.JNIMethod method, JNI.JValue args)
char.