#include <JavaBinding.h>
Public Types | |
| using | Returned = std::conditional_t<std::is_array_v<Ret>, jobjectArray, Ret> |
| What JNI returns from a call: an array of a Java class is a jobjectArray to it. | |
Public Member Functions | |
| JavaMethod (const char *javaName) | |
| Returned | call (JNIEnv *env, jclass javaClass, Args... args) const |
| Calls the method, which the caller has found available. The caller then checks whether Java threw. | |
| template<typename... Other> | |
| Returned | call (JNIEnv *, jclass, Other...) const =delete |
| Public Member Functions inherited from AndroidSerial::JavaBinding< jmethodID > | |
| JavaBinding (const char *javaName, const char *jniSignature, JavaBindingList< jmethodID > &list) | |
Static Public Attributes | |
| static constexpr auto | kSignature = QtJniTypes::methodSignature<Ret, Args...>() |
Additional Inherited Members | |
| Public Attributes inherited from AndroidSerial::JavaBinding< jmethodID > | |
| const char *const | name |
| const char *const | signature |
| jmethodID | id |
| JavaBinding * | next |
A static method of QGCUsbSerialManager.java, declared by the JNI types of what it returns and of what it takes. JNI takes the arguments of a call as C varargs, so arguments that disagree with the signature the method was found under would compile, and corrupt the call. Here the signature is derived from the declared types, and a call compiles only with arguments of exactly those types.
Definition at line 56 of file JavaBinding.h.
| using AndroidSerial::JavaMethod< Ret, Args >::Returned = std::conditional_t<std::is_array_v<Ret>, jobjectArray, Ret> |
What JNI returns from a call: an array of a Java class is a jobjectArray to it.
Definition at line 60 of file JavaBinding.h.
|
inlineexplicit |
Definition at line 62 of file JavaBinding.h.
References AndroidSerial::JavaBinding< jmethodID >::JavaBinding(), kSignature, and AndroidSerial::s_javaMethods.
|
delete |
|
inline |
Calls the method, which the caller has found available. The caller then checks whether Java threw.
Definition at line 67 of file JavaBinding.h.
Referenced by AndroidSerial::callJava(), and AndroidSerial::callJavaObject().
|
staticconstexpr |
Definition at line 58 of file JavaBinding.h.
Referenced by JavaMethod().