Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qjniobject.cpp File Reference

(5f2d5aa4a454bb1a5de8562b8016fd68796364ea)

#include "qjniobject.h"
#include "qjnihelpers_p.h"
#include <QtCore/qbytearray.h>
#include <QtCore/qhash.h>
#include <QtCore/qreadwritelock.h>
#include <QtCore/qloggingcategory.h>
Include dependency graph for qjniobject.cpp:

Go to the source code of this file.

Classes

class  QJniObjectPrivate

Typedefs

typedef QHash< QByteArray, jclass > JClassHash
typedef QHash< QByteArray, jmethodID > JMethodIDHash
typedef QHash< QByteArray, jfieldID > JFieldIDHash

Functions

template<typename ... Args>
static QByteArray cacheKey (Args &&...args)
static jclass getCachedClass (const QByteArray &className)
static QJniObject getCleanJniObject (jobject object, JNIEnv *env)

Typedef Documentation

◆ JClassHash

typedef QHash< QByteArray, jclass > JClassHash

Definition at line 351 of file qjniobject.cpp.

◆ JFieldIDHash

typedef QHash< QByteArray, jfieldID > JFieldIDHash

Definition at line 539 of file qjniobject.cpp.

◆ JMethodIDHash

typedef QHash< QByteArray, jmethodID > JMethodIDHash

Definition at line 473 of file qjniobject.cpp.

Function Documentation

◆ cacheKey()

template<typename ... Args>
QByteArray cacheKey ( Args &&... args)
inlinestatic

Definition at line 346 of file qjniobject.cpp.

◆ getCachedClass()

jclass getCachedClass ( const QByteArray & className)
static

Definition at line 355 of file qjniobject.cpp.

◆ getCleanJniObject()

QJniObject getCleanJniObject ( jobject object,
JNIEnv * env )
static

Get a JNI object from a jobject variant and do the necessary exception clearing and delete the local reference before returning. The JNI object can be null if there was an exception.

Definition at line 392 of file qjniobject.cpp.