Loading...
Searching...
No Matches
typed_methods.hpp
Go to the documentation of this file.
#pragma once
#include <jni.h>
namespace jni
{
template < class R > struct TypedMethods;
template <> struct TypedMethods< jobject* >
{
static constexpr auto CallMethod = &JNIEnv::CallObjectMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualObjectMethod;
static constexpr auto GetField = &JNIEnv::GetObjectField;
static constexpr auto SetField = &JNIEnv::SetObjectField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticObjectMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticObjectField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticObjectField;
};
template <> struct TypedMethods< jboolean >
{
static constexpr auto CallMethod = &JNIEnv::CallBooleanMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualBooleanMethod;
static constexpr auto GetField = &JNIEnv::GetBooleanField;
static constexpr auto SetField = &JNIEnv::SetBooleanField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticBooleanMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticBooleanField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticBooleanField;
static constexpr auto NewArray = &JNIEnv::NewBooleanArray;
static constexpr auto GetArrayElements = &JNIEnv::GetBooleanArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseBooleanArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetBooleanArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetBooleanArrayRegion;
};
template <> struct TypedMethods< jbyte >
{
static constexpr auto CallMethod = &JNIEnv::CallByteMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualByteMethod;
static constexpr auto GetField = &JNIEnv::GetByteField;
static constexpr auto SetField = &JNIEnv::SetByteField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticByteMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticByteField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticByteField;
static constexpr auto NewArray = &JNIEnv::NewByteArray;
static constexpr auto GetArrayElements = &JNIEnv::GetByteArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseByteArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetByteArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetByteArrayRegion;
};
template <> struct TypedMethods< jchar >
{
static constexpr auto CallMethod = &JNIEnv::CallCharMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualCharMethod;
static constexpr auto GetField = &JNIEnv::GetCharField;
static constexpr auto SetField = &JNIEnv::SetCharField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticCharMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticCharField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticCharField;
static constexpr auto NewArray = &JNIEnv::NewCharArray;
static constexpr auto GetArrayElements = &JNIEnv::GetCharArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseCharArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetCharArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetCharArrayRegion;
};
template <> struct TypedMethods< jshort >
{
static constexpr auto CallMethod = &JNIEnv::CallShortMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualShortMethod;
static constexpr auto GetField = &JNIEnv::GetShortField;
static constexpr auto SetField = &JNIEnv::SetShortField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticShortMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticShortField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticShortField;
static constexpr auto NewArray = &JNIEnv::NewShortArray;
static constexpr auto GetArrayElements = &JNIEnv::GetShortArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseShortArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetShortArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetShortArrayRegion;
};
template <> struct TypedMethods< jint >
{
static constexpr auto CallMethod = &JNIEnv::CallIntMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualIntMethod;
static constexpr auto GetField = &JNIEnv::GetIntField;
static constexpr auto SetField = &JNIEnv::SetIntField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticIntMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticIntField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticIntField;
static constexpr auto NewArray = &JNIEnv::NewIntArray;
static constexpr auto GetArrayElements = &JNIEnv::GetIntArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseIntArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetIntArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetIntArrayRegion;
};
template <> struct TypedMethods< jlong >
{
static constexpr auto CallMethod = &JNIEnv::CallLongMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualLongMethod;
static constexpr auto GetField = &JNIEnv::GetLongField;
static constexpr auto SetField = &JNIEnv::SetLongField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticLongMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticLongField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticLongField;
static constexpr auto NewArray = &JNIEnv::NewLongArray;
static constexpr auto GetArrayElements = &JNIEnv::GetLongArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseLongArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetLongArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetLongArrayRegion;
};
template <> struct TypedMethods< jfloat >
{
static constexpr auto CallMethod = &JNIEnv::CallFloatMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualFloatMethod;
static constexpr auto GetField = &JNIEnv::GetFloatField;
static constexpr auto SetField = &JNIEnv::SetFloatField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticFloatMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticFloatField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticFloatField;
static constexpr auto NewArray = &JNIEnv::NewFloatArray;
static constexpr auto GetArrayElements = &JNIEnv::GetFloatArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseFloatArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetFloatArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetFloatArrayRegion;
};
template <> struct TypedMethods< jdouble >
{
static constexpr auto CallMethod = &JNIEnv::CallDoubleMethod;
static constexpr auto CallNonvirtualMethod = &JNIEnv::CallNonvirtualDoubleMethod;
static constexpr auto GetField = &JNIEnv::GetDoubleField;
static constexpr auto SetField = &JNIEnv::SetDoubleField;
static constexpr auto CallStaticMethod = &JNIEnv::CallStaticDoubleMethod;
static constexpr auto GetStaticField = &JNIEnv::GetStaticDoubleField;
static constexpr auto SetStaticField = &JNIEnv::SetStaticDoubleField;
static constexpr auto NewArray = &JNIEnv::NewDoubleArray;
static constexpr auto GetArrayElements = &JNIEnv::GetDoubleArrayElements;
static constexpr auto ReleaseArrayElements = &JNIEnv::ReleaseDoubleArrayElements;
static constexpr auto GetArrayRegion = &JNIEnv::GetDoubleArrayRegion;
static constexpr auto SetArrayRegion = &JNIEnv::SetDoubleArrayRegion;
};
}
jni
Definition advanced_ownership.hpp:6
jni::TypedMethods< jboolean >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:27
jni::TypedMethods< jboolean >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:33
jni::TypedMethods< jboolean >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:31
jni::TypedMethods< jboolean >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:23
jni::TypedMethods< jboolean >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:29
jni::TypedMethods< jboolean >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:24
jni::TypedMethods< jboolean >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:28
jni::TypedMethods< jboolean >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:26
jni::TypedMethods< jboolean >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:30
jni::TypedMethods< jboolean >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:25
jni::TypedMethods< jboolean >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:22
jni::TypedMethods< jboolean >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:32
jni::TypedMethods< jbyte >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:49
jni::TypedMethods< jbyte >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:43
jni::TypedMethods< jbyte >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:47
jni::TypedMethods< jbyte >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:46
jni::TypedMethods< jbyte >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:45
jni::TypedMethods< jbyte >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:42
jni::TypedMethods< jbyte >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:44
jni::TypedMethods< jbyte >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:39
jni::TypedMethods< jbyte >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:41
jni::TypedMethods< jbyte >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:40
jni::TypedMethods< jbyte >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:38
jni::TypedMethods< jbyte >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:48
jni::TypedMethods< jchar >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:59
jni::TypedMethods< jchar >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:58
jni::TypedMethods< jchar >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:55
jni::TypedMethods< jchar >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:65
jni::TypedMethods< jchar >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:54
jni::TypedMethods< jchar >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:57
jni::TypedMethods< jchar >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:62
jni::TypedMethods< jchar >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:60
jni::TypedMethods< jchar >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:63
jni::TypedMethods< jchar >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:56
jni::TypedMethods< jchar >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:64
jni::TypedMethods< jchar >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:61
jni::TypedMethods< jdouble >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:140
jni::TypedMethods< jdouble >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:134
jni::TypedMethods< jdouble >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:144
jni::TypedMethods< jdouble >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:143
jni::TypedMethods< jdouble >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:141
jni::TypedMethods< jdouble >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:135
jni::TypedMethods< jdouble >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:136
jni::TypedMethods< jdouble >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:142
jni::TypedMethods< jdouble >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:145
jni::TypedMethods< jdouble >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:139
jni::TypedMethods< jdouble >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:138
jni::TypedMethods< jdouble >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:137
jni::TypedMethods< jfloat >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:118
jni::TypedMethods< jfloat >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:129
jni::TypedMethods< jfloat >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:127
jni::TypedMethods< jfloat >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:122
jni::TypedMethods< jfloat >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:123
jni::TypedMethods< jfloat >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:121
jni::TypedMethods< jfloat >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:125
jni::TypedMethods< jfloat >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:128
jni::TypedMethods< jfloat >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:126
jni::TypedMethods< jfloat >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:124
jni::TypedMethods< jfloat >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:119
jni::TypedMethods< jfloat >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:120
jni::TypedMethods< jint >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:97
jni::TypedMethods< jint >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:86
jni::TypedMethods< jint >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:96
jni::TypedMethods< jint >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:94
jni::TypedMethods< jint >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:88
jni::TypedMethods< jint >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:95
jni::TypedMethods< jint >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:90
jni::TypedMethods< jint >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:93
jni::TypedMethods< jint >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:91
jni::TypedMethods< jint >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:89
jni::TypedMethods< jint >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:87
jni::TypedMethods< jint >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:92
jni::TypedMethods< jlong >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:107
jni::TypedMethods< jlong >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:104
jni::TypedMethods< jlong >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:103
jni::TypedMethods< jlong >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:112
jni::TypedMethods< jlong >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:102
jni::TypedMethods< jlong >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:108
jni::TypedMethods< jlong >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:109
jni::TypedMethods< jlong >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:113
jni::TypedMethods< jlong >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:110
jni::TypedMethods< jlong >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:105
jni::TypedMethods< jlong >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:111
jni::TypedMethods< jlong >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:106
jni::TypedMethods< jobject * >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:17
jni::TypedMethods< jobject * >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:16
jni::TypedMethods< jobject * >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:12
jni::TypedMethods< jobject * >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:13
jni::TypedMethods< jobject * >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:11
jni::TypedMethods< jobject * >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:15
jni::TypedMethods< jobject * >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:14
jni::TypedMethods< jshort >::GetField
static constexpr auto GetField
Definition typed_methods.hpp:72
jni::TypedMethods< jshort >::CallMethod
static constexpr auto CallMethod
Definition typed_methods.hpp:70
jni::TypedMethods< jshort >::CallStaticMethod
static constexpr auto CallStaticMethod
Definition typed_methods.hpp:74
jni::TypedMethods< jshort >::ReleaseArrayElements
static constexpr auto ReleaseArrayElements
Definition typed_methods.hpp:79
jni::TypedMethods< jshort >::SetArrayRegion
static constexpr auto SetArrayRegion
Definition typed_methods.hpp:81
jni::TypedMethods< jshort >::GetArrayElements
static constexpr auto GetArrayElements
Definition typed_methods.hpp:78
jni::TypedMethods< jshort >::GetArrayRegion
static constexpr auto GetArrayRegion
Definition typed_methods.hpp:80
jni::TypedMethods< jshort >::NewArray
static constexpr auto NewArray
Definition typed_methods.hpp:77
jni::TypedMethods< jshort >::SetField
static constexpr auto SetField
Definition typed_methods.hpp:73
jni::TypedMethods< jshort >::GetStaticField
static constexpr auto GetStaticField
Definition typed_methods.hpp:75
jni::TypedMethods< jshort >::SetStaticField
static constexpr auto SetStaticField
Definition typed_methods.hpp:76
jni::TypedMethods< jshort >::CallNonvirtualMethod
static constexpr auto CallNonvirtualMethod
Definition typed_methods.hpp:71
jni::TypedMethods
Definition typed_methods.hpp:7
jni::jobject
Definition types.hpp:31