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

(511124d5fc9db0aa8f032a8bce7a412392de3497)

#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
struct  JClass
struct  JClassHash

Typedefs

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

Functions

static bool isClassInstantiable (JNIEnv *env, const QByteArray &className, jclass clazz)
static void throwInstantiationException (JNIEnv *env, QByteArray className, jclass clazz)
template<typename ... Args>
static QByteArray cacheKey (Args &&...args)
static jclass getCachedClass (const QByteArray &className)
static bool queryInstantiable (JNIEnv *env, jclass clazz)
static QByteArray classNameOf (JNIEnv *env, jclass clazz)
static QJniObject getCleanJniObject (jobject objectobject, JNIEnv *env)

Typedef Documentation

◆ JFieldIDHash

typedef QHash< QByteArray, jfieldID > JFieldIDHash

Definition at line 708 of file qjniobject.cpp.

◆ JMethodIDHash

typedef QHash< QByteArray, jmethodID > JMethodIDHash

Definition at line 637 of file qjniobject.cpp.

Function Documentation

◆ cacheKey()

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

Definition at line 392 of file qjniobject.cpp.

◆ classNameOf()

QByteArray classNameOf ( JNIEnv * env,
jclass clazz )
static

Definition at line 441 of file qjniobject.cpp.

◆ getCachedClass()

jclass getCachedClass ( const QByteArray & className)
static

Definition at line 412 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 525 of file qjniobject.cpp.

◆ isClassInstantiable()

bool isClassInstantiable ( JNIEnv * env,
const QByteArray & className,
jclass clazz )
static

Definition at line 476 of file qjniobject.cpp.

◆ queryInstantiable()

bool queryInstantiable ( JNIEnv * env,
jclass clazz )
static

Definition at line 421 of file qjniobject.cpp.

◆ throwInstantiationException()

void throwInstantiationException ( JNIEnv * env,
QByteArray className,
jclass clazz )
static

Definition at line 461 of file qjniobject.cpp.