Skip to content

Commit 00871de

Browse files
xezonjfirebaugh
authored andcommitted
Add additional type aliases in field and method classes
1 parent b65d7ba commit 00871de

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

include/jni/field.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace jni
1616

1717
public:
1818
using TagType = TheTag;
19+
using FieldType = T;
1920

2021
Field(JNIEnv& env, const Class<TagType>& clazz, const char* name)
2122
: field(GetFieldID(env, clazz, name, TypeSignature<T>()()))

include/jni/method.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ namespace jni
1919

2020
public:
2121
using TagType = TheTag;
22+
using MethodType = R (Args...);
23+
using ReturnType = R;
2224

2325
Method(JNIEnv& env, const Class<TagType>& clazz, const char* name)
2426
: method(GetMethodID(env, clazz, name, TypeSignature<R (Args...)>()()))

include/jni/static_field.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ namespace jni
1616

1717
public:
1818
using TagType = TheTag;
19+
using FieldType = T;
1920

2021
StaticField(JNIEnv& env, const Class<TagType>& clazz, const char* name)
2122
: field(GetStaticFieldID(env, clazz, name, TypeSignature<T>()()))

include/jni/static_method.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ namespace jni
1919

2020
public:
2121
using TagType = TheTag;
22+
using MethodType = R (Args...);
23+
using ReturnType = R;
2224

2325
StaticMethod(JNIEnv& env, const Class<TagType>& clazz, const char* name)
2426
: method(GetStaticMethodID(env, clazz, name, TypeSignature<R (Args...)>()()))

0 commit comments

Comments
 (0)