Loading...
Searching...
No Matches
jni Namespace Reference

## Classes

class | EnvGettingDeleter
class | EnvAttachingDeleter
class | EnvIgnoringDeleter
class | Array
class | Array< E, std::enable_if_t< IsPrimitive< E >::value > >
class | Array< Object< TheTag > >
struct | IsArraylike
struct | IsArraylike< E[n] >
struct | IsArraylike< std::array< E, n > >
struct | IsArraylike< std::vector< E, A > >
struct | IsArraylike< std::basic_string< C, T, A > >
struct | ArraylikeElementType
struct | ArraylikeElementType< E[n] >
struct | ArraylikeElementType< std::array< E, n > >
struct | ArraylikeElementType< std::vector< E, A > >
struct | ArraylikeElementType< std::basic_string< C, T, A > >
struct | Boxer
struct | Unboxer
struct | BooleanTag
struct | CharacterTag
struct | NumberTag
struct | ByteTag
struct | ShortTag
struct | IntegerTag
struct | LongTag
struct | FloatTag
struct | DoubleTag
struct | PrimitiveTypeBoxer
struct | Boxer< jboolean >
struct | Boxer< jbyte >
struct | Boxer< jchar >
struct | Boxer< jshort >
struct | Boxer< jint >
struct | Boxer< jlong >
struct | Boxer< jfloat >
struct | Boxer< jdouble >
struct | PrimitiveTypeUnboxer
struct | Unboxer< BooleanTag >
struct | Unboxer< ByteTag >
struct | Unboxer< CharacterTag >
struct | Unboxer< ShortTag >
struct | Unboxer< IntegerTag >
struct | Unboxer< LongTag >
struct | Unboxer< FloatTag >
struct | Unboxer< DoubleTag >
struct | Boxer< jni::Object< Tag > >
class | Constructor
class | Field
class | StaticField
class | Method
class | StaticMethod
class | Class
class | PendingJavaException
struct | ThingToMake
class | Method< TheTag, R(Args...) >
struct | NativeMethodTraits
struct | NativeMethodTraits< R(Args...) >
struct | NativeMethodTraits< R(*)(Args...) >
struct | NativeMethodTraits< R(T::*)(Args...) const >
struct | NativeMethodTraits< R(T::*)(Args...) >
struct | NativeMethodTraits< M, std::enable_if_t< std::is_class< M >::value > >
struct | NativeMethodMaker
| High-level, lambda. More...
struct | NativeMethodMaker< R(T::*)(JNIEnv &, Subject, Args...) const >
struct | NativeMethodMaker< void(T::*)(JNIEnv &, Subject, Args...) const >
struct | NativeMethodMaker< R(JNIEnv &, Subject, Args...), method >
| High-level, function pointer. More...
struct | NativeMethodMaker< void(JNIEnv &, Subject, Args...), method >
class | NativePeerLambdaMethod
| High-level peer, lambda. More...
class | NativePeerLambdaMethod< L, R(L::*)(JNIEnv &, P &, Args...) const >
class | NativePeerFunctionPointerMethod
| High-level peer, function pointer. More...
class | NativePeerFunctionPointerMethod< R(JNIEnv &, P &, Args...), method >
class | NativePeerMemberFunctionMethod
| High-level peer, member function pointer. More...
class | NativePeerMemberFunctionMethod< R(P::*)(JNIEnv &, Args...), method >
struct | NativePeerHelper
struct | NativePeerHelper< Peer, TagType, std::unique_ptr< Peer >(JNIEnv &, Args...) >
class | ObjectBase
class | Object
struct | LocalFrameDeleter
class | DefaultRefDeleter
class | StringCharsDeleter
class | StringUTFCharsDeleter
class | StringCriticalDeleter
class | ArrayElementsDeleter
class | PrimitiveArrayCriticalDeleter
class | MonitorDeleter
class | JNIEnvDeleter
class | StaticMethod< TheTag, R(Args...) >
struct | TypeSignature
struct | ObjectTag
struct | StringTag
struct | ClassTag
struct | ArrayTag
struct | SuperTag
struct | SuperTag< Tag, decltype(std::declval< typename Tag::SuperTag >(), 0) >
struct | TagTraits
struct | TagTraits< ObjectTag >
struct | TagTraits< StringTag >
struct | TagTraits< ClassTag >
struct | TagTraits< ArrayTag< E >, std::enable_if_t< IsPrimitive< E >::value > >
struct | TagTraits< ArrayTag< Object< Tag > > >
struct | IsPrimitive
struct | IsPrimitive< jboolean >
struct | IsPrimitive< jbyte >
struct | IsPrimitive< jchar >
struct | IsPrimitive< jshort >
struct | IsPrimitive< jint >
struct | IsPrimitive< jlong >
struct | IsPrimitive< jfloat >
struct | IsPrimitive< jdouble >
struct | IsReference
struct | IsReference< jobject >
struct | IsReference< jclass >
struct | IsReference< jstring >
struct | IsReference< jthrowable >
struct | IsArray
struct | IsArray< jarray< E > >
struct | Conjunction
struct | Conjunction< B1 >
struct | Conjunction< B1, Bn... >
struct | StringLiteral
struct | TagLiteralImpl
struct | TagLiteralImpl< Tag, std::index_sequence< Is... > >
struct | TypeSignature< jboolean >
struct | TypeSignature< jbyte >
struct | TypeSignature< jchar >
struct | TypeSignature< jshort >
struct | TypeSignature< jint >
struct | TypeSignature< jlong >
struct | TypeSignature< jfloat >
struct | TypeSignature< jdouble >
struct | TypeSignature< void >
struct | TypeSignature< Object< TheTag > >
struct | TypeSignature< Array< E > >
struct | TypeSignature< R(Args...) >
struct | TypedMethods
struct | TypedMethods< jobject * >
struct | TypedMethods< jboolean >
struct | TypedMethods< jbyte >
struct | TypedMethods< jchar >
struct | TypedMethods< jshort >
struct | TypedMethods< jint >
struct | TypedMethods< jlong >
struct | TypedMethods< jfloat >
struct | TypedMethods< jdouble >
struct | jobject
struct | jclass
struct | jstring
struct | jthrowable
struct | jarray
struct | JNINativeMethod
struct | JNINativeMethod< R(JNIEnv *, jclass *, Args...) >
struct | JNINativeMethod< R(JNIEnv *, jobject *, Args...) >
class | Unique
struct | NullDeleter
struct | RemoveUnique
struct | RemoveUnique< Unique< T, D > >
struct | WeakReferenceTag
class | WeakReference
struct | Wrapper
struct | PrimitiveTypeWrapper
struct | Wrapper< jboolean >
struct | Wrapper< jbyte >
struct | Wrapper< jchar >
struct | Wrapper< jshort >
struct | Wrapper< jint >
struct | Wrapper< jlong >
struct | Wrapper< jfloat >
struct | Wrapper< jdouble >
struct | Wrapper< const char16_t * >
struct | Wrapper< char16_t * >
struct | Wrapper< jsize >
struct | ReferenceTypeWrapper
struct | Wrapper< jobject * >
struct | Wrapper< jclass * >
struct | Wrapper< jstring * >
struct | Wrapper< jthrowable * >
struct | Wrapper< jarray< jobject > * >
struct | Wrapper< jarray< jboolean > * >
struct | Wrapper< jarray< jbyte > * >
struct | Wrapper< jarray< jchar > * >
struct | Wrapper< jarray< jshort > * >
struct | Wrapper< jarray< jint > * >
struct | Wrapper< jarray< jlong > * >
struct | Wrapper< jarray< jfloat > * >
struct | Wrapper< jarray< jdouble > * >
struct | Wrapper< jfieldID * >
struct | Wrapper< jmethodID * >
struct | ReferenceTypeUnwrapper
struct | Wrapper< jobject >
struct | Wrapper< jclass >
struct | Wrapper< jstring >
struct | Wrapper< jthrowable >
struct | Wrapper< jarray< jobject > >
struct | Wrapper< jarray< jboolean > >
struct | Wrapper< jarray< jbyte > >
struct | Wrapper< jarray< jchar > >
struct | Wrapper< jarray< jshort > >
struct | Wrapper< jarray< jint > >
struct | Wrapper< jarray< jlong > >
struct | Wrapper< jarray< jfloat > >
struct | Wrapper< jarray< jdouble > >
struct | Wrapper< jfieldID >
struct | Wrapper< jmethodID >
struct | Wrapper< JNINativeMethod< R(JNIEnv *, T *, Args...) > >
struct | Wrapper< version >

## Typedefs

template<class T>
using | ArraylikeElement = typename ArraylikeElementType<T>::type
using | Boolean = Object<BooleanTag>
using | Character = Object<CharacterTag>
using | Number = Object<NumberTag>
using | Byte = Object<ByteTag>
using | Short = Object<ShortTag>
using | Integer = Object<IntegerTag>
using | Long = Object<LongTag>
using | Float = Object<FloatTag>
using | Double = Object<DoubleTag>
using | UniqueLocalFrame = std::unique_ptr< JNIEnv, LocalFrameDeleter >
using | RefDeletionMethod = void (JNIEnv::*)(::jobject)
template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>
using | UniqueGlobalRef = std::unique_ptr< T, Deleter<&JNIEnv::DeleteGlobalRef> >
template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>
using | UniqueWeakGlobalRef = std::unique_ptr< T, Deleter<&JNIEnv::DeleteWeakGlobalRef> >
template<class T>
using | UniqueLocalRef = std::unique_ptr< T, DefaultRefDeleter<&JNIEnv::DeleteLocalRef> >
using | UniqueStringChars = std::unique_ptr< const char16_t, StringCharsDeleter >
using | UniqueStringUTFChars = std::unique_ptr< const char, StringUTFCharsDeleter >
using | UniqueStringCritical = std::unique_ptr< const char16_t, StringCriticalDeleter >
template<class E>
using | UniqueArrayElements = std::unique_ptr< E, ArrayElementsDeleter<E> >
template<class E>
using | UniquePrimitiveArrayCritical = std::unique_ptr< void, PrimitiveArrayCriticalDeleter<E> >
using | UniqueMonitor = std::unique_ptr< jobject, MonitorDeleter >
using | UniqueEnv = std::unique_ptr< JNIEnv, JNIEnvDeleter >
using | String = Object<StringTag>
template<class T>
using | UntaggedType = decltype(Untag(std::declval<T>()))
template<class Tag>
using | TagLiteral = typename TagLiteralImpl< Tag, std::make_index_sequence<StringLiteralLength(Tag::Name())> >::Value
using | jsize = std::size_t
using | jobjectArray = jarray< jobject >
using | jbooleanArray = jarray< jboolean >
using | jbyteArray = jarray< jbyte >
using | jcharArray = jarray< jchar >
using | jshortArray = jarray< jshort >
using | jintArray = jarray< jint >
using | jlongArray = jarray< jlong >
using | jfloatArray = jarray< jfloat >
using | jdoubleArray = jarray< jdouble >
using | jfieldID = std::pointer_traits< ::jfieldID >::element_type
using | jmethodID = std::pointer_traits< ::jmethodID >::element_type
template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>
using | Global = Unique< T, Deleter<&JNIEnv::DeleteGlobalRef> >
template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>
using | Weak = Unique< T, Deleter<&JNIEnv::DeleteWeakGlobalRef> >
template<class T>
using | Local = Unique< T, DefaultRefDeleter<&JNIEnv::DeleteLocalRef> >
template<class T>
using | Input = Unique< T, NullDeleter >
template<class T>
using | RemoveUniqueType = typename RemoveUnique<T>::Type
template<class T>
using | UnwrappedType = decltype(Unwrap<T>(std::declval<T>()))

## Enumerations

enum | version : jint { jni_version_1_1 = version(JNI_VERSION_1_1) , jni_version_1_2 = version(JNI_VERSION_1_2) , jni_version_1_4 = version(JNI_VERSION_1_4) , jni_version_1_6 = version(JNI_VERSION_1_6) }
enum | error : jint { jni_ok = error(JNI_OK) , jni_err = error(JNI_ERR) , jni_edetached = error(JNI_EDETACHED) , jni_eversion = error(JNI_EVERSION) }

## Functions

template<class T>
std::vector< T > | MakeAnything (ThingToMake< std::vector< T > >, JNIEnv &env, const Array< T > &array)
template<class T>
Local< Array< T > > | MakeAnything (ThingToMake< Array< T > >, JNIEnv &env, const std::vector< T > &array)
std::string | MakeAnything (ThingToMake< std::string >, JNIEnv &env, const Array< jbyte > &array)
Local< Array< jbyte > > | MakeAnything (ThingToMake< Array< jbyte > >, JNIEnv &env, const std::string &string)
template<class E, std::size_t n>
E * | ArraylikeData (E(&a)[n])
template<class E, std::size_t n>
E * | ArraylikeData (std::array< E, n > &a)
template<class E, std::size_t n>
E const * | ArraylikeData (const std::array< E, n > &a)
template<class E, class A>
E * | ArraylikeData (std::vector< E, A > &a)
template<class E, class A>
E const * | ArraylikeData (const std::vector< E, A > &a)
template<class C, class T, class A>
C * | ArraylikeData (std::basic_string< C, T, A > &a)
template<class C, class T, class A>
C const * | ArraylikeData (const std::basic_string< C, T, A > &a)
template<class E, std::size_t n>
std::size_t | ArraylikeSize (E(&)[n])
template<class E, std::size_t n>
std::size_t | ArraylikeSize (const std::array< E, n > &)
template<class E, class A>
std::size_t | ArraylikeSize (const std::vector< E, A > &a)
template<class C, class T, class A>
std::size_t | ArraylikeSize (const std::basic_string< C, T, A > &a)
template<class Unboxed>
decltype(auto) | Box (JNIEnv &env, Unboxed &&unboxed)
template<class T>
decltype(auto) | Unbox (JNIEnv &env, const T &boxed)
const std::error_category & | ErrorCategory ()
void | CheckErrorCode (jint err)
template<class R>
R | CheckJavaException (JNIEnv &env, R &&r)
void | CheckJavaException (JNIEnv &env)
void | CheckJavaExceptionThenErrorCode (JNIEnv &env, jint err)
inline ::jclass | JavaErrorClass (JNIEnv &env)
void | ThrowJavaError (JNIEnv &env, std::exception_ptr e)
jint | GetVersion (JNIEnv &env)
jclass & | DefineClass (JNIEnv &env, const char *name, jobject &loader, const jbyte *buf, jsize size)
template<class Array>
auto | DefineClass (JNIEnv &env, const char *name, jobject &loader, const Array &buf) -> std::enable_if_t< IsArraylike< Array >::value, jclass & >
jclass & | FindClass (JNIEnv &env, const char *name)
jmethodID * | FromReflectedMethod (JNIEnv &env, jobject *obj)
jfieldID * | FromReflectedField (JNIEnv &env, jobject *obj)
jobject & | ToReflectedMethod (JNIEnv &env, jclass &clazz, jmethodID &method, bool isStatic)
jobject & | ToReflectedField (JNIEnv &env, jclass &clazz, jfieldID &field, bool isStatic)
jclass * | GetSuperclass (JNIEnv &env, jclass &clazz)
bool | IsAssignableFrom (JNIEnv &env, jclass &clazz1, jclass &clazz2)
void | Throw (JNIEnv &env, jthrowable &obj)
void | ThrowNew (JNIEnv &env, jclass &clazz, const char *msg=nullptr)
bool | ExceptionCheck (JNIEnv &env)
jthrowable * | ExceptionOccurred (JNIEnv &env)
void | ExceptionDescribe (JNIEnv &env)
void | ExceptionClear (JNIEnv &env)
void | FatalError (JNIEnv &env, const char *msg)
UniqueLocalFrame | PushLocalFrame (JNIEnv &env, jint capacity)
jobject * | PopLocalFrame (JNIEnv &env, UniqueLocalFrame &&frame, jobject *result=nullptr)
template<template< RefDeletionMethod > class Deleter, class T>
UniqueGlobalRef< T, Deleter > | NewGlobalRef (JNIEnv &env, T *t)
template<class T>
UniqueGlobalRef< T > | NewGlobalRef (JNIEnv &env, T *t)
template<template< RefDeletionMethod > class Deleter, class T, template< RefDeletionMethod > class WeakDeleter>
UniqueGlobalRef< T, Deleter > | NewGlobalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T, template< RefDeletionMethod > class WeakDeleter>
UniqueGlobalRef< T > | NewGlobalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T, template< RefDeletionMethod > class Deleter>
void | DeleteGlobalRef (JNIEnv &env, UniqueGlobalRef< T, Deleter > &&ref)
template<class T>
UniqueLocalRef< T > | NewLocalRef (JNIEnv &env, T *t)
template<class T, template< RefDeletionMethod > class WeakDeleter>
UniqueLocalRef< T > | NewLocalRef (JNIEnv &env, const UniqueWeakGlobalRef< T, WeakDeleter > &t)
template<class T>
void | DeleteLocalRef (JNIEnv &env, UniqueLocalRef< T > &&ref)
void | EnsureLocalCapacity (JNIEnv &env, jint capacity)
template<template< RefDeletionMethod > class Deleter, class T>
UniqueWeakGlobalRef< T, Deleter > | NewWeakGlobalRef (JNIEnv &env, T *t)
template<class T>
UniqueWeakGlobalRef< T > | NewWeakGlobalRef (JNIEnv &env, T *t)
template<class T, template< RefDeletionMethod > class Deleter>
void | DeleteWeakGlobalRef (JNIEnv &env, UniqueWeakGlobalRef< T, Deleter > &&ref)
bool | IsSameObject (JNIEnv &env, jobject *ref1, jobject *ref2)
jobject & | AllocObject (JNIEnv &env, jclass &clazz)
template<class... Args>
jobject & | NewObject (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
jclass & | GetObjectClass (JNIEnv &env, jobject &obj)
bool | IsInstanceOf (JNIEnv &env, jobject *obj, jclass &clazz)
jmethodID & | 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 > | CallMethod (JNIEnv &env, jobject *obj, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t< std::is_void< R >::value, R > | CallMethod (JNIEnv &env, jobject *obj, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t<!std::is_void< R >::value, R > | 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 > | CallNonvirtualMethod (JNIEnv &env, jobject *obj, jclass &clazz, jmethodID &method, Args &&... args)
jfieldID & | GetFieldID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class T>
T | GetField (JNIEnv &env, jobject *obj, jfieldID &field)
template<class T>
void | SetField (JNIEnv &env, jobject *obj, jfieldID &field, T value)
jmethodID & | 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 > | CallStaticMethod (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
template<class R, class... Args>
std::enable_if_t< std::is_void< R >::value, R > | CallStaticMethod (JNIEnv &env, jclass &clazz, jmethodID &method, Args &&... args)
jfieldID & | GetStaticFieldID (JNIEnv &env, jclass &clazz, const char *name, const char *sig)
template<class T>
T | GetStaticField (JNIEnv &env, jclass &clazz, jfieldID &field)
template<class T>
void | SetStaticField (JNIEnv &env, jclass &clazz, jfieldID &field, T value)
jstring & | NewString (JNIEnv &env, const char16_t *chars, jsize len)
template<class Array>
auto | NewString (JNIEnv &env, const Array &chars) -> std::enable_if_t< IsArraylike< Array >::value, jstring & >
jsize | GetStringLength (JNIEnv &env, jstring &string)
std::tuple< UniqueStringChars, bool > | GetStringChars (JNIEnv &env, jstring &string)
void | ReleaseStringChars (JNIEnv &env, jstring &string, UniqueStringChars &&chars)
jstring & | NewStringUTF (JNIEnv &env, const char *bytes)
jsize | GetStringUTFLength (JNIEnv &env, jstring &string)
std::tuple< UniqueStringUTFChars, bool > | GetStringUTFChars (JNIEnv &env, jstring &string)
void | ReleaseStringUTFChars (JNIEnv &env, jstring &string, UniqueStringUTFChars &&chars)
void | GetStringRegion (JNIEnv &env, jstring &string, jsize start, jsize len, char16_t *buf)
template<class Array>
auto | GetStringRegion (JNIEnv &env, jstring &string, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
void | GetStringUTFRegion (JNIEnv &env, jstring &string, jsize start, jsize len, char *buf)
template<class Array>
auto | GetStringUTFRegion (JNIEnv &env, jstring &string, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
std::tuple< UniqueStringCritical, bool > | GetStringCritical (JNIEnv &env, jstring &string)
void | ReleaseStringCritical (JNIEnv &env, jstring &string, UniqueStringCritical &&chars)
template<class E>
jsize | GetArrayLength (JNIEnv &env, jarray< E > &array)
template<class E>
jarray< E > & | NewArray (JNIEnv &env, jsize length)
template<class E>
std::tuple< UniqueArrayElements< E >, bool > | GetArrayElements (JNIEnv &env, jarray< E > &array)
template<class E>
void | ReleaseArrayElements (JNIEnv &env, jarray< E > &array, E *elems)
template<class E>
void | ReleaseArrayElements (JNIEnv &env, jarray< E > &array, UniqueArrayElements< E > &&elems)
template<class E>
std::tuple< UniquePrimitiveArrayCritical< E >, bool > | GetPrimitiveArrayCritical (JNIEnv &env, jarray< E > &array)
template<class E>
void | ReleasePrimitiveArrayCritical (JNIEnv &env, jarray< E > &array, void *carray)
template<class E>
void | ReleasePrimitiveArrayCritical (JNIEnv &env, jarray< E > &array, UniquePrimitiveArrayCritical< E > &&carray)
template<class T>
void | GetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, jsize len, T *buf)
template<class T, class Array>
auto | GetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
template<class T>
void | SetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, jsize len, const T *buf)
template<class T, class Array>
auto | SetArrayRegion (JNIEnv &env, jarray< T > &array, jsize start, const Array &buf) -> std::enable_if_t< IsArraylike< Array >::value >
jarray< jobject > & | NewObjectArray (JNIEnv &env, jsize length, jclass &elementClass, jobject *initialElement=nullptr)
jobject * | GetObjectArrayElement (JNIEnv &env, jarray< jobject > &array, jsize index)
void | SetObjectArrayElement (JNIEnv &env, jarray< jobject > &array, jsize index, jobject *value)
template<class... Methods>
void | RegisterNatives (JNIEnv &env, jclass &clazz, const Methods &... methods)
void | UnregisterNatives (JNIEnv &env, jclass &clazz)
UniqueMonitor | MonitorEnter (JNIEnv &env, jobject *obj)
void | MonitorExit (JNIEnv &env, UniqueMonitor &&monitor)
JavaVM & | GetJavaVM (JNIEnv &env)
jobject & | NewDirectByteBuffer (JNIEnv &env, void *address, jlong capacity)
void * | GetDirectBufferAddress (JNIEnv &env, jobject &buf)
jlong | GetDirectBufferCapacity (JNIEnv &env, jobject &buf)
jobjectRefType | GetObjectRefType (JNIEnv &env, jobject *obj)
UniqueEnv | AttachCurrentThread (JavaVM &vm)
void | DetachCurrentThread (JavaVM &vm, UniqueEnv &&env)
JNIEnv & | GetEnv (JavaVM &vm, version version=jni_version_1_1)
template<class Result, class... P>
auto | Make (P &&... p)
template<class M>
auto | MakeNativeMethod (const char *name, const char *sig, const M &m, std::enable_if_t< std::is_class< M >::value > *=nullptr)
| Low-level, lambda.
template<class M, M method>
auto | MakeNativeMethod (const char *name, const char *sig)
| Low-level, function pointer.
template<class M>
auto | MakeNativeMethod (const char *name, const M &m)
template<class M, M method>
auto | MakeNativeMethod (const char *name)
template<class L>
auto | MakeNativePeerMethod (const char *name, const L &lambda, std::enable_if_t< std::is_class< L >::value > *=nullptr)
template<class M, M method>
auto | MakeNativePeerMethod (const char *name, std::enable_if_t< !std::is_member_function_pointer< M >::value > *=nullptr)
template<class M, M method>
auto | MakeNativePeerMethod (const char *name, std::enable_if_t< std::is_member_function_pointer< M >::value > *=nullptr)
template<class Peer, class TagType, class... Methods>
void | RegisterNativePeer (JNIEnv &env, const Class< TagType > &clazz, const char *fieldName, Methods &&... methods)
template<class Peer, class TagType, class Initializer, class... Methods>
void | RegisterNativePeer (JNIEnv &env, const Class< TagType > &clazz, const char *fieldName, Initializer initialize, const char *initializeMethodName, const char *finalizeMethodName, Methods &&... methods)
template<class Peer, class... Args>
std::unique_ptr< Peer > | MakePeer (jni::JNIEnv &env, Args... args)
void | ThrowNullPointerException (JNIEnv &env, const char *message=nullptr)
template<class T>
void | NullCheck (JNIEnv &env, T *ptr, const char *message=nullptr)
template<class T>
T & | SafeDereference (JNIEnv &env, T *ptr, const char *message=nullptr)
template<class OutTagType, class T>
Local< Object< OutTagType > > | Cast (JNIEnv &env, const Class< OutTagType > &clazz, const T &object)
std::u16string | MakeAnything (ThingToMake< std::u16string >, JNIEnv &env, const String &string)
std::string | MakeAnything (ThingToMake< std::string >, JNIEnv &env, const String &string)
Local< String > | MakeAnything (ThingToMake< String >, JNIEnv &env, const std::u16string &string)
Local< String > | MakeAnything (ThingToMake< String >, JNIEnv &env, const std::string &string)
std::u16string | convertUTF8ToUTF16 (const std::string &string)
std::string | convertUTF16ToUTF8 (const std::u16string &string)
template<class T>
auto | Tag (JNIEnv &, T primitive) -> std::enable_if_t< IsPrimitive< T >::value, T >
template<class T, class U>
auto | Tag (JNIEnv &env, U *u) -> std::enable_if_t< !IsPrimitive< T >::value, Input< T > >
template<class T, class U>
auto | Tag (JNIEnv &env, U &u) -> std::enable_if_t< !IsPrimitive< T >::value, Input< T > >
template<class T>
auto | Untag (T primitive) -> std::enable_if_t< IsPrimitive< T >::value, T >
template<class T>
auto | Untag (const T &t) -> std::enable_if_t< !IsPrimitive< T >::value, decltype(t.get()) >
template<class T>
T & | AsLvalue (T &&x)
constexpr std::size_t | StringLiteralLength (const char *str, std::size_t len=0)
template<char... As, char... Bs>
constexpr auto | Concat (const StringLiteral< As... > &, const StringLiteral< Bs... > &)
template<class A, class B, class... Rest>
constexpr auto | Concat (const A &a, const B &b, const Rest &... rest)
template<class T>
auto | ReleaseUnique (T primitive)
template<class T, class D>
auto | ReleaseUnique (Unique< T, D > &&t)
template<template< RefDeletionMethod > class Deleter, class T>
auto | NewGlobal (JNIEnv &env, const T &t)
template<class T>
auto | NewGlobal (JNIEnv &env, const T &t)
template<template< RefDeletionMethod > class Deleter, class T, template< RefDeletionMethod > class WeakDeleter>
Global< T, Deleter > | NewGlobal (JNIEnv &env, const Weak< T, WeakDeleter > &t)
template<class T>
Global< T > | NewGlobal (JNIEnv &env, const Weak< T > &t)
template<template< RefDeletionMethod > class Deleter, class T>
auto | NewWeak (JNIEnv &env, const T &t)
template<class T>
auto | NewWeak (JNIEnv &env, const T &t)
template<class T>
auto | NewLocal (JNIEnv &env, const T &t)
template<class T, template< RefDeletionMethod > class WeakDeleter>
Local< T > | NewLocal (JNIEnv &env, const Weak< T, WeakDeleter > &t)
template<class W, class U>
auto | Wrap (U &&u)
template<class W>
auto | Unwrap (W &&w)

## Variables

const jboolean | jni_false = 0
const jboolean | jni_true = 1

## Typedef Documentation

## ArraylikeElement

template<class T>

using jni::ArraylikeElement = typename ArraylikeElementType<T>::type

## Boolean

using jni::Boolean = Object<BooleanTag>

## Byte

using jni::Byte = Object<ByteTag>

## Character

using jni::Character = Object<CharacterTag>

## Double

using jni::Double = Object<DoubleTag>

## Float

using jni::Float = Object<FloatTag>

## Global

template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>

using jni::Global = Unique< T, Deleter<&JNIEnv::DeleteGlobalRef> >

## Input

template<class T>

using jni::Input = Unique< T, NullDeleter >

## Integer

using jni::Integer = Object<IntegerTag>

## jbooleanArray

using jni::jbooleanArray = jarray< jboolean >

## jbyteArray

using jni::jbyteArray = jarray< jbyte >

## jcharArray

using jni::jcharArray = jarray< jchar >

## jdoubleArray

using jni::jdoubleArray = jarray< jdouble >

## jfieldID

using jni::jfieldID = std::pointer_traits< ::jfieldID >::element_type

## jfloatArray

using jni::jfloatArray = jarray< jfloat >

## jintArray

using jni::jintArray = jarray< jint >

## jlongArray

using jni::jlongArray = jarray< jlong >

## jmethodID

using jni::jmethodID = std::pointer_traits< ::jmethodID >::element_type

## jobjectArray

using jni::jobjectArray = jarray< jobject >

## jshortArray

using jni::jshortArray = jarray< jshort >

## jsize

using jni::jsize = std::size_t

## Local

template<class T>

using jni::Local = Unique< T, DefaultRefDeleter<&JNIEnv::DeleteLocalRef> >

## Long

using jni::Long = Object<LongTag>

## Number

using jni::Number = Object<NumberTag>

## RefDeletionMethod

using jni::RefDeletionMethod = void (JNIEnv::*)(::jobject)

## RemoveUniqueType

template<class T>

using jni::RemoveUniqueType = typename RemoveUnique<T>::Type

## Short

using jni::Short = Object<ShortTag>

## String

using jni::String = Object<StringTag>

## TagLiteral

template<class Tag>

using jni::TagLiteral = typename TagLiteralImpl< Tag, std::make_index_sequence<StringLiteralLength(Tag::Name())> >::Value

## UniqueArrayElements

template<class E>

using jni::UniqueArrayElements = std::unique_ptr< E, ArrayElementsDeleter<E> >

## UniqueEnv

using jni::UniqueEnv = std::unique_ptr< JNIEnv, JNIEnvDeleter >

## UniqueGlobalRef

template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>

using jni::UniqueGlobalRef = std::unique_ptr< T, Deleter<&JNIEnv::DeleteGlobalRef> >

## UniqueLocalFrame

using jni::UniqueLocalFrame = std::unique_ptr< JNIEnv, LocalFrameDeleter >

## UniqueLocalRef

template<class T>

using jni::UniqueLocalRef = std::unique_ptr< T, DefaultRefDeleter<&JNIEnv::DeleteLocalRef> >

## UniqueMonitor

using jni::UniqueMonitor = std::unique_ptr< jobject, MonitorDeleter >

## UniquePrimitiveArrayCritical

template<class E>

using jni::UniquePrimitiveArrayCritical = std::unique_ptr< void, PrimitiveArrayCriticalDeleter<E> >

## UniqueStringChars

using jni::UniqueStringChars = std::unique_ptr< const char16_t, StringCharsDeleter >

## UniqueStringCritical

using jni::UniqueStringCritical = std::unique_ptr< const char16_t, StringCriticalDeleter >

## UniqueStringUTFChars

using jni::UniqueStringUTFChars = std::unique_ptr< const char, StringUTFCharsDeleter >

## UniqueWeakGlobalRef

template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>

using jni::UniqueWeakGlobalRef = std::unique_ptr< T, Deleter<&JNIEnv::DeleteWeakGlobalRef> >

## UntaggedType

template<class T>

using jni::UntaggedType = decltype(Untag(std::declval<T>()))

## UnwrappedType

template<class T>

using jni::UnwrappedType = decltype(Unwrap<T>(std::declval<T>()))

## Weak

template<class T, template< RefDeletionMethod > class Deleter = DefaultRefDeleter>

using jni::Weak = Unique< T, Deleter<&JNIEnv::DeleteWeakGlobalRef> >

## Enumeration Type Documentation

## error

enum jni::error : jint

Enumerator
jni_ok |
jni_err |
jni_edetached |
jni_eversion |

## version

enum jni::version : jint

Enumerator
jni_version_1_1 |
jni_version_1_2 |
jni_version_1_4 |
jni_version_1_6 |

## Function Documentation

## AllocObject()

jobject & jni::AllocObject | ( | JNIEnv & | env,
|  | jclass & | clazz )

inline

## ArraylikeData() [1/7]

template<class E, std::size_t n>

E const * jni::ArraylikeData | ( | const std::array< E, n > & | a | ) |

## ArraylikeData() [2/7]

template<class C, class T, class A>

C const * jni::ArraylikeData | ( | const std::basic_string< C, T, A > & | a | ) |

## ArraylikeData() [3/7]

template<class E, class A>

E const * jni::ArraylikeData | ( | const std::vector< E, A > & | a | ) |

## ArraylikeData() [4/7]

template<class E, std::size_t n>

E * jni::ArraylikeData | ( | E(&) | a[n] | ) |

## ArraylikeData() [5/7]

template<class E, std::size_t n>

E * jni::ArraylikeData | ( | std::array< E, n > & | a | ) |

## ArraylikeData() [6/7]

template<class C, class T, class A>

C * jni::ArraylikeData | ( | std::basic_string< C, T, A > & | a | ) |

## ArraylikeData() [7/7]

template<class E, class A>

E * jni::ArraylikeData | ( | std::vector< E, A > & | a | ) |

## ArraylikeSize() [1/4]

template<class E, std::size_t n>

std::size_t jni::ArraylikeSize | ( | const std::array< E, n > & |  | ) |

## ArraylikeSize() [2/4]

template<class C, class T, class A>

std::size_t jni::ArraylikeSize | ( | const std::basic_string< C, T, A > & | a | ) |

## ArraylikeSize() [3/4]

template<class E, class A>

std::size_t jni::ArraylikeSize | ( | const std::vector< E, A > & | a | ) |

## ArraylikeSize() [4/4]

template<class E, std::size_t n>

std::size_t jni::ArraylikeSize | ( | E(&) | [n] | ) |

## AsLvalue()

template<class T>

T & jni::AsLvalue | ( | T && | x | ) |

## AttachCurrentThread()

UniqueEnv jni::AttachCurrentThread | ( | JavaVM & | vm | ) |

inline

## Box()

template<class Unboxed>

decltype(auto) jni::Box | ( | JNIEnv & | env,
|  | Unboxed && | unboxed )

## CallMethod() [1/2]

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 )

## CallMethod() [2/2]

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 )

## CallNonvirtualMethod() [1/2]

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 )

## CallNonvirtualMethod() [2/2]

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 )

## CallStaticMethod() [1/2]

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 )

## CallStaticMethod() [2/2]

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 )

## Cast()

template<class OutTagType, class T>

Local< Object< OutTagType > > jni::Cast | ( | JNIEnv & | env,
|  | const Class< OutTagType > & | clazz,
|  | const T & | object )

## CheckErrorCode()

void jni::CheckErrorCode | ( | jint | err | ) |

inline

## CheckJavaException() [1/2]

void jni::CheckJavaException | ( | JNIEnv & | env | ) |

inline

## CheckJavaException() [2/2]

template<class R>

R jni::CheckJavaException | ( | JNIEnv & | env,
|  | R && | r )

## CheckJavaExceptionThenErrorCode()

void jni::CheckJavaExceptionThenErrorCode | ( | JNIEnv & | env,
|  | jint | err )

inline

## Concat() [1/2]

template<class A, class B, class... Rest>

auto jni::Concat | ( | const A & | a,
|  | const B & | b,
|  | const Rest &... | rest )

constexpr

## Concat() [2/2]

template<char... As, char... Bs>

auto jni::Concat | ( | const StringLiteral< As... > & | ,
|  | const StringLiteral< Bs... > & | )

constexpr

## convertUTF16ToUTF8()

std::string jni::convertUTF16ToUTF8 | ( | const std::u16string & | string | ) |

inline

## convertUTF8ToUTF16()

std::u16string jni::convertUTF8ToUTF16 | ( | const std::string & | string | ) |

inline

## DefineClass() [1/2]

template<class Array>

auto jni::DefineClass | ( | JNIEnv & | env,
|  | const char * | name,
|  | jobject & | loader,
|  | const Array & | buf )->std::enable_if_t< IsArraylike< Array >::value, jclass & >

## DefineClass() [2/2]

jclass & jni::DefineClass | ( | JNIEnv & | env,
|  | const char * | name,
|  | jobject & | loader,
|  | const jbyte * | buf,
|  | jsize | size )

inline

## DeleteGlobalRef()

template<class T, template< RefDeletionMethod > class Deleter>

void jni::DeleteGlobalRef | ( | JNIEnv & | env,
|  | UniqueGlobalRef< T, Deleter > && | ref )

## DeleteLocalRef()

template<class T>

void jni::DeleteLocalRef | ( | JNIEnv & | env,
|  | UniqueLocalRef< T > && | ref )

## DeleteWeakGlobalRef()

template<class T, template< RefDeletionMethod > class Deleter>

void jni::DeleteWeakGlobalRef | ( | JNIEnv & | env,
|  | UniqueWeakGlobalRef< T, Deleter > && | ref )

## DetachCurrentThread()

void jni::DetachCurrentThread | ( | JavaVM & | vm,
|  | UniqueEnv && | env )

inline

## EnsureLocalCapacity()

void jni::EnsureLocalCapacity | ( | JNIEnv & | env,
|  | jint | capacity )

inline

## ErrorCategory()

const std::error_category & jni::ErrorCategory | ( |  | ) |

inline

## ExceptionCheck()

bool jni::ExceptionCheck | ( | JNIEnv & | env | ) |

inline

## ExceptionClear()

void jni::ExceptionClear | ( | JNIEnv & | env | ) |

inline

## ExceptionDescribe()

void jni::ExceptionDescribe | ( | JNIEnv & | env | ) |

inline

## ExceptionOccurred()

jthrowable * jni::ExceptionOccurred | ( | JNIEnv & | env | ) |

inline

## FatalError()

void jni::FatalError | ( | JNIEnv & | env,
|  | const char * | msg )

inline

## FindClass()

jclass & jni::FindClass | ( | JNIEnv & | env,
|  | const char * | name )

inline

## FromReflectedField()

jfieldID * jni::FromReflectedField | ( | JNIEnv & | env,
|  | jobject * | obj )

inline

## FromReflectedMethod()

jmethodID * jni::FromReflectedMethod | ( | JNIEnv & | env,
|  | jobject * | obj )

inline

## GetArrayElements()

template<class E>

std::tuple< UniqueArrayElements< E >, bool > jni::GetArrayElements | ( | JNIEnv & | env,
|  | jarray< E > & | array )

## GetArrayLength()

template<class E>

jsize jni::GetArrayLength | ( | JNIEnv & | env,
|  | jarray< E > & | array )

## GetArrayRegion() [1/2]

template<class T, class Array>

auto jni::GetArrayRegion | ( | JNIEnv & | env,
|  | jarray< T > & | array,
|  | jsize | start,
|  | Array & | buf )->std::enable_if_t< IsArraylike< Array >::value >

## GetArrayRegion() [2/2]

template<class T>

void jni::GetArrayRegion | ( | JNIEnv & | env,
|  | jarray< T > & | array,
|  | jsize | start,
|  | jsize | len,
|  | T * | buf )

## GetDirectBufferAddress()

void * jni::GetDirectBufferAddress | ( | JNIEnv & | env,
|  | jobject & | buf )

inline

## GetDirectBufferCapacity()

jlong jni::GetDirectBufferCapacity | ( | JNIEnv & | env,
|  | jobject & | buf )

inline

## GetEnv()

JNIEnv & jni::GetEnv | ( | JavaVM & | vm,
|  | version | version = jni_version_1_1 )

inline

## GetField()

template<class T>

T jni::GetField | ( | JNIEnv & | env,
|  | jobject * | obj,
|  | jfieldID & | field )

## GetFieldID()

jfieldID & jni::GetFieldID | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const char * | name,
|  | const char * | sig )

inline

## GetJavaVM()

JavaVM & jni::GetJavaVM | ( | JNIEnv & | env | ) |

inline

## GetMethodID()

jmethodID & jni::GetMethodID | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const char * | name,
|  | const char * | sig )

inline

## GetObjectArrayElement()

jobject * jni::GetObjectArrayElement | ( | JNIEnv & | env,
|  | jarray< jobject > & | array,
|  | jsize | index )

inline

## GetObjectClass()

jclass & jni::GetObjectClass | ( | JNIEnv & | env,
|  | jobject & | obj )

inline

## GetObjectRefType()

jobjectRefType jni::GetObjectRefType | ( | JNIEnv & | env,
|  | jobject * | obj )

inline

## GetPrimitiveArrayCritical()

template<class E>

std::tuple< UniquePrimitiveArrayCritical< E >, bool > jni::GetPrimitiveArrayCritical | ( | JNIEnv & | env,
|  | jarray< E > & | array )

## GetStaticField()

template<class T>

T jni::GetStaticField | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | jfieldID & | field )

## GetStaticFieldID()

jfieldID & jni::GetStaticFieldID | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const char * | name,
|  | const char * | sig )

inline

## GetStaticMethodID()

jmethodID & jni::GetStaticMethodID | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const char * | name,
|  | const char * | sig )

inline

## GetStringChars()

std::tuple< UniqueStringChars, bool > jni::GetStringChars | ( | JNIEnv & | env,
|  | jstring & | string )

inline

## GetStringCritical()

std::tuple< UniqueStringCritical, bool > jni::GetStringCritical | ( | JNIEnv & | env,
|  | jstring & | string )

inline

## GetStringLength()

jsize jni::GetStringLength | ( | JNIEnv & | env,
|  | jstring & | string )

inline

## GetStringRegion() [1/2]

template<class Array>

auto jni::GetStringRegion | ( | JNIEnv & | env,
|  | jstring & | string,
|  | jsize | start,
|  | Array & | buf )->std::enable_if_t< IsArraylike< Array >::value >

## GetStringRegion() [2/2]

void jni::GetStringRegion | ( | JNIEnv & | env,
|  | jstring & | string,
|  | jsize | start,
|  | jsize | len,
|  | char16_t * | buf )

inline

## GetStringUTFChars()

std::tuple< UniqueStringUTFChars, bool > jni::GetStringUTFChars | ( | JNIEnv & | env,
|  | jstring & | string )

inline

## GetStringUTFLength()

jsize jni::GetStringUTFLength | ( | JNIEnv & | env,
|  | jstring & | string )

inline

## GetStringUTFRegion() [1/2]

template<class Array>

auto jni::GetStringUTFRegion | ( | JNIEnv & | env,
|  | jstring & | string,
|  | jsize | start,
|  | Array & | buf )->std::enable_if_t< IsArraylike< Array >::value >

## GetStringUTFRegion() [2/2]

void jni::GetStringUTFRegion | ( | JNIEnv & | env,
|  | jstring & | string,
|  | jsize | start,
|  | jsize | len,
|  | char * | buf )

inline

## GetSuperclass()

jclass * jni::GetSuperclass | ( | JNIEnv & | env,
|  | jclass & | clazz )

inline

## GetVersion()

jint jni::GetVersion | ( | JNIEnv & | env | ) |

inline

## IsAssignableFrom()

bool jni::IsAssignableFrom | ( | JNIEnv & | env,
|  | jclass & | clazz1,
|  | jclass & | clazz2 )

inline

## IsInstanceOf()

bool jni::IsInstanceOf | ( | JNIEnv & | env,
|  | jobject * | obj,
|  | jclass & | clazz )

inline

## IsSameObject()

bool jni::IsSameObject | ( | JNIEnv & | env,
|  | jobject * | ref1,
|  | jobject * | ref2 )

inline

## JavaErrorClass()

inline ::jclass jni::JavaErrorClass | ( | JNIEnv & | env | ) |

## Make()

template<class Result, class... P>

auto jni::Make | ( | P &&... | p | ) |

## MakeAnything() [1/8]

Local< Array< jbyte > > jni::MakeAnything | ( | ThingToMake< Array< jbyte > > | ,
|  | JNIEnv & | env,
|  | const std::string & | string )

inline

## MakeAnything() [2/8]

template<class T>

Local< Array< T > > jni::MakeAnything | ( | ThingToMake< Array< T > > | ,
|  | JNIEnv & | env,
|  | const std::vector< T > & | array )

## MakeAnything() [3/8]

std::string jni::MakeAnything | ( | ThingToMake< std::string > | ,
|  | JNIEnv & | env,
|  | const Array< jbyte > & | array )

inline

## MakeAnything() [4/8]

std::string jni::MakeAnything | ( | ThingToMake< std::string > | ,
|  | JNIEnv & | env,
|  | const String & | string )

inline

## MakeAnything() [5/8]

std::u16string jni::MakeAnything | ( | ThingToMake< std::u16string > | ,
|  | JNIEnv & | env,
|  | const String & | string )

inline

## MakeAnything() [6/8]

template<class T>

std::vector< T > jni::MakeAnything | ( | ThingToMake< std::vector< T > > | ,
|  | JNIEnv & | env,
|  | const Array< T > & | array )

## MakeAnything() [7/8]

Local< String > jni::MakeAnything | ( | ThingToMake< String > | ,
|  | JNIEnv & | env,
|  | const std::string & | string )

inline

## MakeAnything() [8/8]

Local< String > jni::MakeAnything | ( | ThingToMake< String > | ,
|  | JNIEnv & | env,
|  | const std::u16string & | string )

inline

## MakeNativeMethod() [1/4]

template<class M, M method>

auto jni::MakeNativeMethod | ( | const char * | name | ) |

## MakeNativeMethod() [2/4]

template<class M, M method>

auto jni::MakeNativeMethod | ( | const char * | name,
|  | const char * | sig )

Low-level, function pointer.

## MakeNativeMethod() [3/4]

template<class M>

auto jni::MakeNativeMethod | ( | const char * | name,
|  | const char * | sig,
|  | const M & | m,
|  | std::enable_if_t< std::is_class< M >::value > * | = nullptr )

Low-level, lambda.

## MakeNativeMethod() [4/4]

template<class M>

auto jni::MakeNativeMethod | ( | const char * | name,
|  | const M & | m )

## MakeNativePeerMethod() [1/3]

template<class L>

auto jni::MakeNativePeerMethod | ( | const char * | name,
|  | const L & | lambda,
|  | std::enable_if_t< std::is_class< L >::value > * | = nullptr )

## MakeNativePeerMethod() [2/3]

template<class M, M method>

auto jni::MakeNativePeerMethod | ( | const char * | name,
|  | std::enable_if_t< !std::is_member_function_pointer< M >::value > * | = nullptr )

## MakeNativePeerMethod() [3/3]

template<class M, M method>

auto jni::MakeNativePeerMethod | ( | const char * | name,
|  | std::enable_if_t< std::is_member_function_pointer< M >::value > * | = nullptr )

## MakePeer()

template<class Peer, class... Args>

std::unique_ptr< Peer > jni::MakePeer | ( | jni::JNIEnv & | env,
|  | Args... | args )

## MonitorEnter()

UniqueMonitor jni::MonitorEnter | ( | JNIEnv & | env,
|  | jobject * | obj )

inline

## MonitorExit()

void jni::MonitorExit | ( | JNIEnv & | env,
|  | UniqueMonitor && | monitor )

inline

## NewArray()

template<class E>

jarray< E > & jni::NewArray | ( | JNIEnv & | env,
|  | jsize | length )

## NewDirectByteBuffer()

jobject & jni::NewDirectByteBuffer | ( | JNIEnv & | env,
|  | void * | address,
|  | jlong | capacity )

inline

## NewGlobal() [1/4]

template<class T>

auto jni::NewGlobal | ( | JNIEnv & | env,
|  | const T & | t )

## NewGlobal() [2/4]

template<template< RefDeletionMethod > class Deleter, class T>

auto jni::NewGlobal | ( | JNIEnv & | env,
|  | const T & | t )

## NewGlobal() [3/4]

template<class T>

Global< T > jni::NewGlobal | ( | JNIEnv & | env,
|  | const Weak< T > & | t )

## NewGlobal() [4/4]

template<template< RefDeletionMethod > class Deleter, class T, template< RefDeletionMethod > class WeakDeleter>

Global< T, Deleter > jni::NewGlobal | ( | JNIEnv & | env,
|  | const Weak< T, WeakDeleter > & | t )

## NewGlobalRef() [1/4]

template<class T, template< RefDeletionMethod > class WeakDeleter>

UniqueGlobalRef< T > jni::NewGlobalRef | ( | JNIEnv & | env,
|  | const UniqueWeakGlobalRef< T, WeakDeleter > & | t )

## NewGlobalRef() [2/4]

template<template< RefDeletionMethod > class Deleter, class T, template< RefDeletionMethod > class WeakDeleter>

UniqueGlobalRef< T, Deleter > jni::NewGlobalRef | ( | JNIEnv & | env,
|  | const UniqueWeakGlobalRef< T, WeakDeleter > & | t )

## NewGlobalRef() [3/4]

template<class T>

UniqueGlobalRef< T > jni::NewGlobalRef | ( | JNIEnv & | env,
|  | T * | t )

## NewGlobalRef() [4/4]

template<template< RefDeletionMethod > class Deleter, class T>

UniqueGlobalRef< T, Deleter > jni::NewGlobalRef | ( | JNIEnv & | env,
|  | T * | t )

## NewLocal() [1/2]

template<class T>

auto jni::NewLocal | ( | JNIEnv & | env,
|  | const T & | t )

## NewLocal() [2/2]

template<class T, template< RefDeletionMethod > class WeakDeleter>

Local< T > jni::NewLocal | ( | JNIEnv & | env,
|  | const Weak< T, WeakDeleter > & | t )

## NewLocalRef() [1/2]

template<class T, template< RefDeletionMethod > class WeakDeleter>

UniqueLocalRef< T > jni::NewLocalRef | ( | JNIEnv & | env,
|  | const UniqueWeakGlobalRef< T, WeakDeleter > & | t )

## NewLocalRef() [2/2]

template<class T>

UniqueLocalRef< T > jni::NewLocalRef | ( | JNIEnv & | env,
|  | T * | t )

## NewObject()

template<class... Args>

jobject & jni::NewObject | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | jmethodID & | method,
|  | Args &&... | args )

## NewObjectArray()

jarray< jobject > & jni::NewObjectArray | ( | JNIEnv & | env,
|  | jsize | length,
|  | jclass & | elementClass,
|  | jobject * | initialElement = nullptr )

inline

## NewString() [1/2]

template<class Array>

auto jni::NewString | ( | JNIEnv & | env,
|  | const Array & | chars )->std::enable_if_t< IsArraylike< Array >::value, jstring & >

## NewString() [2/2]

jstring & jni::NewString | ( | JNIEnv & | env,
|  | const char16_t * | chars,
|  | jsize | len )

inline

## NewStringUTF()

jstring & jni::NewStringUTF | ( | JNIEnv & | env,
|  | const char * | bytes )

inline

## NewWeak() [1/2]

template<class T>

auto jni::NewWeak | ( | JNIEnv & | env,
|  | const T & | t )

## NewWeak() [2/2]

template<template< RefDeletionMethod > class Deleter, class T>

auto jni::NewWeak | ( | JNIEnv & | env,
|  | const T & | t )

## NewWeakGlobalRef() [1/2]

template<class T>

UniqueWeakGlobalRef< T > jni::NewWeakGlobalRef | ( | JNIEnv & | env,
|  | T * | t )

## NewWeakGlobalRef() [2/2]

template<template< RefDeletionMethod > class Deleter, class T>

UniqueWeakGlobalRef< T, Deleter > jni::NewWeakGlobalRef | ( | JNIEnv & | env,
|  | T * | t )

## NullCheck()

template<class T>

void jni::NullCheck | ( | JNIEnv & | env,
|  | T * | ptr,
|  | const char * | message = nullptr )

## PopLocalFrame()

jobject * jni::PopLocalFrame | ( | JNIEnv & | env,
|  | UniqueLocalFrame && | frame,
|  | jobject * | result = nullptr )

inline

## PushLocalFrame()

UniqueLocalFrame jni::PushLocalFrame | ( | JNIEnv & | env,
|  | jint | capacity )

inline

## RegisterNativePeer() [1/2]

template<class Peer, class TagType, class Initializer, class... Methods>

void jni::RegisterNativePeer | ( | JNIEnv & | env,
|  | const Class< TagType > & | clazz,
|  | const char * | fieldName,
|  | Initializer | initialize,
|  | const char * | initializeMethodName,
|  | const char * | finalizeMethodName,
|  | Methods &&... | methods )

## RegisterNativePeer() [2/2]

template<class Peer, class TagType, class... Methods>

void jni::RegisterNativePeer | ( | JNIEnv & | env,
|  | const Class< TagType > & | clazz,
|  | const char * | fieldName,
|  | Methods &&... | methods )

A registration function for native methods on a "native peer": a long-lived native object corresponding to a Java object, usually created when the Java object is created and destroyed when the Java object's finalizer runs.

It assumes that the Java object has a field, named by fieldName, of Java type long, which is used to hold a pointer to the native peer.

Methods must be a sequence of NativePeerMethod instances, instantiated with pointer to member functions of the native peer class. For each method in methods, a native method is bound with a signature corresponding to that of the member function. The wrapper for that native method obtains the native peer instance from the Java field and calls the native peer method on it, passing along any arguments.

An overload is provided that accepts a Callable object with a unique_ptr result type and the names for native creation and finalization methods, allowing creation and disposal of the native peer from Java.

For an example of all of the above, see the examples directory.

## RegisterNatives()

template<class... Methods>

void jni::RegisterNatives | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const Methods &... | methods )

inline

## ReleaseArrayElements() [1/2]

template<class E>

void jni::ReleaseArrayElements | ( | JNIEnv & | env,
|  | jarray< E > & | array,
|  | E * | elems )

## ReleaseArrayElements() [2/2]

template<class E>

void jni::ReleaseArrayElements | ( | JNIEnv & | env,
|  | jarray< E > & | array,
|  | UniqueArrayElements< E > && | elems )

## ReleasePrimitiveArrayCritical() [1/2]

template<class E>

void jni::ReleasePrimitiveArrayCritical | ( | JNIEnv & | env,
|  | jarray< E > & | array,
|  | UniquePrimitiveArrayCritical< E > && | carray )

## ReleasePrimitiveArrayCritical() [2/2]

template<class E>

void jni::ReleasePrimitiveArrayCritical | ( | JNIEnv & | env,
|  | jarray< E > & | array,
|  | void * | carray )

## ReleaseStringChars()

void jni::ReleaseStringChars | ( | JNIEnv & | env,
|  | jstring & | string,
|  | UniqueStringChars && | chars )

inline

## ReleaseStringCritical()

void jni::ReleaseStringCritical | ( | JNIEnv & | env,
|  | jstring & | string,
|  | UniqueStringCritical && | chars )

inline

## ReleaseStringUTFChars()

void jni::ReleaseStringUTFChars | ( | JNIEnv & | env,
|  | jstring & | string,
|  | UniqueStringUTFChars && | chars )

inline

## ReleaseUnique() [1/2]

template<class T>

auto jni::ReleaseUnique | ( | T | primitive | ) |

## ReleaseUnique() [2/2]

template<class T, class D>

auto jni::ReleaseUnique | ( | Unique< T, D > && | t | ) |

## SafeDereference()

template<class T>

T & jni::SafeDereference | ( | JNIEnv & | env,
|  | T * | ptr,
|  | const char * | message = nullptr )

## SetArrayRegion() [1/2]

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 >

## SetArrayRegion() [2/2]

template<class T>

void jni::SetArrayRegion | ( | JNIEnv & | env,
|  | jarray< T > & | array,
|  | jsize | start,
|  | jsize | len,
|  | const T * | buf )

## SetField()

template<class T>

void jni::SetField | ( | JNIEnv & | env,
|  | jobject * | obj,
|  | jfieldID & | field,
|  | T | value )

## SetObjectArrayElement()

void jni::SetObjectArrayElement | ( | JNIEnv & | env,
|  | jarray< jobject > & | array,
|  | jsize | index,
|  | jobject * | value )

inline

## SetStaticField()

template<class T>

void jni::SetStaticField | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | jfieldID & | field,
|  | T | value )

## StringLiteralLength()

std::size_t jni::StringLiteralLength | ( | const char * | str,
|  | std::size_t | len = 0 )

constexpr

## Tag() [1/3]

template<class T>

auto jni::Tag | ( | JNIEnv & | ,
|  | T | primitive )->std::enable_if_t< IsPrimitive< T >::value, T >

## Tag() [2/3]

template<class T, class U>

auto jni::Tag | ( | JNIEnv & | env,
|  | U & | u )->std::enable_if_t<!IsPrimitive< T >::value, Input< T > >

## Tag() [3/3]

template<class T, class U>

auto jni::Tag | ( | JNIEnv & | env,
|  | U * | u )->std::enable_if_t<!IsPrimitive< T >::value, Input< T > >

## Throw()

void jni::Throw | ( | JNIEnv & | env,
|  | jthrowable & | obj )

inline

## ThrowJavaError()

void jni::ThrowJavaError | ( | JNIEnv & | env,
|  | std::exception_ptr | e )

inline

## ThrowNew()

void jni::ThrowNew | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | const char * | msg = nullptr )

inline

## ThrowNullPointerException()

void jni::ThrowNullPointerException | ( | JNIEnv & | env,
|  | const char * | message = nullptr )

inline

## ToReflectedField()

jobject & jni::ToReflectedField | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | jfieldID & | field,
|  | bool | isStatic )

inline

## ToReflectedMethod()

jobject & jni::ToReflectedMethod | ( | JNIEnv & | env,
|  | jclass & | clazz,
|  | jmethodID & | method,
|  | bool | isStatic )

inline

## Unbox()

template<class T>

decltype(auto) jni::Unbox | ( | JNIEnv & | env,
|  | const T & | boxed )

## UnregisterNatives()

void jni::UnregisterNatives | ( | JNIEnv & | env,
|  | jclass & | clazz )

inline

## Untag() [1/2]

template<class T>

auto jni::Untag | ( | const T & | t | ) | ->std::enable_if_t<!IsPrimitive< T >::value, decltype(t.get())>

## Untag() [2/2]

template<class T>

auto jni::Untag | ( | T | primitive | ) | ->std::enable_if_t< IsPrimitive< T >::value, T >

## Unwrap()

template<class W>

auto jni::Unwrap | ( | W && | w | ) |

## Wrap()

template<class W, class U>

auto jni::Wrap | ( | U && | u | ) |

## Variable Documentation

## jni_false

const jboolean jni::jni_false = 0

## jni_true

const jboolean jni::jni_true = 1