summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qjniobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qjniobject.cpp')
-rw-r--r--src/corelib/kernel/qjniobject.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/corelib/kernel/qjniobject.cpp b/src/corelib/kernel/qjniobject.cpp
index c443746ff4..dfb0dbd36d 100644
--- a/src/corelib/kernel/qjniobject.cpp
+++ b/src/corelib/kernel/qjniobject.cpp
@@ -779,10 +779,10 @@ QJniObject::~QJniObject()
jstring jstring = string.object<jstring>();
\endcode
- \note The returned object is still kept live by this QJniObject. To keep the
- object live beyond the lifetime of this QJniObject, for example to record it
+ \note The returned object is still kept alive by this QJniObject. To keep the
+ object alive beyond the lifetime of this QJniObject, for example to record it
for later use, the easiest approach is to store it in another QJniObject with
- a suitable lifetime. Alternatively, you can make a new global reference to the
+ a suitable lifetime. Alternatively, you may create a new global reference to the
object and store it, taking care to free it when you are done with it.
\snippet jni/src_qjniobject.cpp QJniObject scope
@@ -792,6 +792,36 @@ jobject QJniObject::object() const
return javaObject();
}
+/*!
+ \fn jclass QJniObject::objectClass() const
+
+ Returns the class object held by the QJniObject as a \c jclass.
+
+ \note The returned object is still kept alive by this QJniObject. To keep the
+ object alive beyond the lifetime of this QJniObject, for example to record it
+ for later use, the easiest approach is to store it in another QJniObject with
+ a suitable lifetime. Alternatively, you may create a new global reference to the
+ object and store it, taking care to free it when you are done with it.
+
+ \since 6.2
+*/
+jclass QJniObject::objectClass() const
+{
+ return d->m_jclass;
+}
+
+/*!
+ \fn QByteArray QJniObject::className() const
+
+ Returns the name of the class object held by the QJniObject as a \c QByteArray.
+
+ \since 6.2
+*/
+QByteArray QJniObject::className() const
+{
+ return d->m_className;
+}
+
QJniObject QJniObject::callObjectMethodV(const char *methodName,
const char *signature,
va_list args) const