Loading...
Searching...
No Matches
functions.hpp File Reference

Go to the source code of this file.

## Namespaces

namespace | jni

## Functions

jint | jni::GetVersion (JNIEnv &env)
jclass & | jni::DefineClass (JNIEnv &env, const char *name, jobject &loader, const jbyte *buf, jsize size)
template<class Array>
auto | jni::DefineClass (JNIEnv &env, const char *name, jobject &loader, const Array &buf) -> std::enable_if_t< IsArraylike< Array >::value, jclass & >
jclass & | jni::FindClass (JNIEnv &env, const char *name)
jmethodID * | jni::FromReflectedMethod (JNIEnv &env, jobject *obj)
jfieldID * | jni::FromReflectedField (JNIEnv &env, jobject *obj)
jobject & | jni::ToReflectedMethod (JNIEnv &env, jclass &clazz, jmethodID &method, bool isStatic)
jobject & | jni::ToReflectedField (JNIEnv &env, jclass &clazz, jfieldID &field, bool isStatic)
jclass * | jni::GetSuperclass (JNIEnv &env, jclass &clazz)
bool | jni::IsAssignableFrom (JNIEnv &env, jclass &clazz1, jclass &clazz2)
void | jni::Throw (JNIEnv &env, jthrowable &obj)
void | jni::ThrowNew (JNIEnv &env, jclass &clazz, const char *msg=nullptr)
bool | jni::ExceptionCheck (JNIEnv &env)
jthrowable * | jni::ExceptionOccurred (JNIEnv &env)
void | jni::ExceptionDescribe (JNIEnv &env)
void | jni::ExceptionClear (JNIEnv &env)
void | jni::FatalError (JNIEnv &env, const char *msg)
UniqueLocalFrame | jni::PushLocalFrame (JNIEnv &env, jint capacity)
jobject * | jni::PopLocalFrame (JNIEnv &env, UniqueLocalFrame &&frame, jobject *result=nullptr)
template<template< RefDeletionMethod > class Deleter, class T>
UniqueGlobalRef< T, Deleter > | jni::NewGlobalRef (JNIEnv &env, T *t)
template<class T>
UniqueGlobalRef< T > | jni::NewGlobalRef (JNIEnv &env, T *t)
template<template< RefDeletionMethod > class Deleter, class T, template< RefDeletionMethod > class WeakDeleter>
UniqueGlobalRef< T, Deleter > | jni::NewGlobalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T, template< RefDeletionMethod > class WeakDeleter>
UniqueGlobalRef< T > | jni::NewGlobalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T, template< RefDeletionMethod > class Deleter>
void | jni::DeleteGlobalRef (JNIEnv &env, UniqueGlobalRef< T, Deleter > &&ref)
template<class T>
UniqueLocalRef< T > | jni::NewLocalRef (JNIEnv &env, T *t)
template<class T, template< RefDeletionMethod > class WeakDeleter>
UniqueLocalRef< T > | jni::NewLocalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T>
void | jni::DeleteLocalRef (JNIEnv &env, UniqueLocalRef< T > &&ref)
void | jni::EnsureLocalCapacity (JNIEnv &env, jint capacity)
template<template< RefDeletionMethod > class Deleter, class T>
UniqueWeakGlobalRef< T, Deleter > | jni::NewWeakGlobalRef (JNIEnv &env, T *t)
template<class T>
UniqueWeakGlobalRef< T > | jni::NewWeakGlobalRef (JNIEnv &env, T *t)
template<class T, template< RefDeletionMethod > class Deleter>
void | jni::DeleteWeakGlobalRef (JNIEnv &env, UniqueWeakGlobalRef< T, Deleter > &&ref)
bool | jni::IsSameObject (JNIEnv &env, jobject *ref1, jobject *ref2)
jobject & | jni::AllocObject (JNIEnv &env, jclass &clazz)
template<class... Args>
jobject & | jni::NewObject (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
jclass & | jni::GetObjectClass (JNIEnv &env, jobject &obj)
bool | jni::IsInstanceOf (JNIEnv &env, jobject *obj, jclass &clazz)
jmethodID & | jni::GetMethodID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class R, class... Args>
std::enable_if_t<!std::is_void< R >::value, R > | jni::CallMethod (JNIEnv &env, jobject *obj, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t< std::is_void< R >::value, R > | jni::CallMethod (JNIEnv &env, jobject *obj, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t<!std::is_void< R >::value, R > | jni::CallNonvirtualMethod (JNIEnv &env, jobject *obj, jclass &clazz, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t< std::is_void< R >::value, R > | jni::CallNonvirtualMethod (JNIEnv &env, jobject *obj, jclass &clazz, jmethodID &method, Args &&... args)
jfieldID & | jni::GetFieldID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class T>
T | jni::GetField (JNIEnv &env, jobject *obj, jfieldID &field)
template<class T>
void | jni::SetField (JNIEnv &env, jobject *obj, jfieldID &field, T value)
jmethodID & | jni::GetStaticMethodID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class R, class... Args>
std::enable_if_t<!std::is_void< R >::value, R > | jni::CallStaticMethod (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t< std::is_void< R >::value, R > | jni::CallStaticMethod (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
jfieldID & | jni::GetStaticFieldID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class T>
T | jni::GetStaticField (JNIEnv &env, jclass &clazz, jfieldID &field)
template<class T>
void | jni::SetStaticField (JNIEnv &env, jclass &clazz, jfieldID &field, T value)
jstring & | jni::NewString (JNIEnv &env, const char16_t *chars, jsize len)
template<class Array>
auto | jni::NewString (JNIEnv &env, const Array &chars) -> std::enable_if_t< IsArraylike< Array >::value, jstring & >
jsize | jni::GetStringLength (JNIEnv &env, jstring &string)
std::tuple< UniqueStringChars, bool > | jni::GetStringChars (JNIEnv &env, jstring &string)
void | jni::ReleaseStringChars (JNIEnv &env, jstring &string, UniqueStringChars &&chars)
jstring & | jni::NewStringUTF (JNIEnv &env, const char *bytes)
jsize | jni::GetStringUTFLength (JNIEnv &env, jstring &string)
std::tuple< UniqueStringUTFChars, bool > | jni::GetStringUTFChars (JNIEnv &env, jstring &string)
void | jni::ReleaseStringUTFChars (JNIEnv &env, jstring &string, UniqueStringUTFChars &&chars)
void | jni::GetStringRegion (JNIEnv &env, jstring &string, jsize start, jsize len, char16_t *buf)
template<class Array>
auto | jni::GetStringRegion (JNIEnv &env, jstring &string, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
void | jni::GetStringUTFRegion (JNIEnv &env, jstring &string, jsize start, jsize len, char *buf)
template<class Array>
auto | jni::GetStringUTFRegion (JNIEnv &env, jstring &string, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
std::tuple< UniqueStringCritical, bool > | jni::GetStringCritical (JNIEnv &env, jstring &string)
void | jni::ReleaseStringCritical (JNIEnv &env, jstring &string, UniqueStringCritical &&chars)
template<class E>
jsize | jni::GetArrayLength (JNIEnv &env, jarray< E > &array)
template<class E>
jarray< E > & | jni::NewArray (JNIEnv &env, jsize length)
template<class E>
std::tuple< UniqueArrayElements< E >, bool > | jni::GetArrayElements (JNIEnv &env, jarray< E > &array)
template<class E>
void | jni::ReleaseArrayElements (JNIEnv &env, jarray< E > &array, E *elems)
template<class E>
void | jni::ReleaseArrayElements (JNIEnv &env, jarray< E > &array, UniqueArrayElements< E > &&elems)
template<class E>
std::tuple< UniquePrimitiveArrayCritical< E >, bool > | jni::GetPrimitiveArrayCritical (JNIEnv &env, jarray< E > &array)
template<class E>
void | jni::ReleasePrimitiveArrayCritical (JNIEnv &env, jarray< E > &array, void *carray)
template<class E>
void | jni::ReleasePrimitiveArrayCritical (JNIEnv &env, jarray< E > &array, UniquePrimitiveArrayCritical< E > &&carray)
template<class T>
void | jni::GetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, jsize len, T *buf)
template<class T, class Array>
auto | jni::GetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
template<class T>
void | jni::SetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, jsize len, const T *buf)
template<class T, class Array>
auto | jni::SetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, const Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
jarray< jobject > & | jni::NewObjectArray (JNIEnv &env, jsize length, jclass &elementClass, jobject *initialElement=nullptr)
jobject * | jni::GetObjectArrayElement (JNIEnv &env, jarray< jobject > &array, jsize index)
void | jni::SetObjectArrayElement (JNIEnv &env, jarray< jobject > &array, jsize index, jobject *value)
template<class... Methods>
void | jni::RegisterNatives (JNIEnv &env, jclass &clazz, const Methods &... methods)
void | jni::UnregisterNatives (JNIEnv &env, jclass &clazz)
UniqueMonitor | jni::MonitorEnter (JNIEnv &env, jobject *obj)
void | jni::MonitorExit (JNIEnv &env, UniqueMonitor &&monitor)
JavaVM & | jni::GetJavaVM (JNIEnv &env)
jobject & | jni::NewDirectByteBuffer (JNIEnv &env, void *address, jlong capacity)
void * | jni::GetDirectBufferAddress (JNIEnv &env, jobject &buf)
jlong | jni::GetDirectBufferCapacity (JNIEnv &env, jobject &buf)
jobjectRefType | jni::GetObjectRefType (JNIEnv &env, jobject *obj)
UniqueEnv | jni::AttachCurrentThread (JavaVM &vm)
void | jni::DetachCurrentThread (JavaVM &vm, UniqueEnv &&env)
JNIEnv & | jni::GetEnv (JavaVM &vm, version version=jni_version_1_1)