Direct-BT  2.3.1
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | List of all members
jau::JavaGlobalObj Class Reference

Implementation for JavaAnon, by simply wrapping a JNIGlobalRef instance. More...

#include <helper_jni.hpp>

Inheritance diagram for jau::JavaGlobalObj:
Collaboration diagram for jau::JavaGlobalObj:

Public Member Functions

 JavaGlobalObj (jobject obj, jmethodID mNotifyDeleted_) noexcept
 
 JavaGlobalObj (const JavaGlobalObj &o) noexcept=default
 
 JavaGlobalObj (JavaGlobalObj &&o) noexcept=default
 
JavaGlobalObjoperator= (const JavaGlobalObj &o) noexcept=default
 
JavaGlobalObjoperator= (JavaGlobalObj &&o) noexcept=default
 
virtual ~JavaGlobalObj () noexcept
 
std::string toString () const noexcept override
 
void clear () noexcept override
 Clears the java reference, i.e. More...
 
JNIGlobalRefgetJavaObject () noexcept
 
jobject getObject () const noexcept
 
jclass getClass () const noexcept
 
- Public Member Functions inherited from jau::JavaAnon
virtual ~JavaAnon () noexcept
 

Static Public Member Functions

static void check (const std::shared_ptr< JavaAnon > &shref, const char *file, int line)
 
static bool isValid (const std::shared_ptr< JavaAnon > &shref) noexcept
 
static JNIGlobalRef GetJavaObject (const std::shared_ptr< JavaAnon > &shref) noexcept
 
static jobject GetObject (const std::shared_ptr< JavaAnon > &shref) noexcept
 
static jclass GetClass (const std::shared_ptr< JavaAnon > &shref) noexcept
 

Detailed Description

Implementation for JavaAnon, by simply wrapping a JNIGlobalRef instance.

Definition at line 136 of file helper_jni.hpp.

Constructor & Destructor Documentation

◆ JavaGlobalObj() [1/3]

jau::JavaGlobalObj::JavaGlobalObj ( jobject  obj,
jmethodID  mNotifyDeleted_ 
)
inlinenoexcept

Definition at line 164 of file helper_jni.hpp.

◆ JavaGlobalObj() [2/3]

jau::JavaGlobalObj::JavaGlobalObj ( const JavaGlobalObj o)
defaultnoexcept

◆ JavaGlobalObj() [3/3]

jau::JavaGlobalObj::JavaGlobalObj ( JavaGlobalObj &&  o)
defaultnoexcept

◆ ~JavaGlobalObj()

virtual jau::JavaGlobalObj::~JavaGlobalObj ( )
virtualnoexcept

Member Function Documentation

◆ check()

static void jau::JavaGlobalObj::check ( const std::shared_ptr< JavaAnon > &  shref,
const char *  file,
int  line 
)
inlinestatic

Definition at line 142 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void jau::JavaGlobalObj::clear ( )
inlineoverridevirtualnoexcept

Clears the java reference, i.e.

nulling it, without deleting the global reference via JNI.

Implements jau::JavaAnon.

Definition at line 180 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getClass()

jclass jau::JavaGlobalObj::getClass ( ) const
inlinenoexcept

Definition at line 187 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetClass()

static jclass jau::JavaGlobalObj::GetClass ( const std::shared_ptr< JavaAnon > &  shref)
inlinestaticnoexcept

Definition at line 199 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getJavaObject()

JNIGlobalRef& jau::JavaGlobalObj::getJavaObject ( )
inlinenoexcept

Definition at line 182 of file helper_jni.hpp.

Here is the caller graph for this function:

◆ GetJavaObject()

static JNIGlobalRef jau::JavaGlobalObj::GetJavaObject ( const std::shared_ptr< JavaAnon > &  shref)
inlinestaticnoexcept

Definition at line 190 of file helper_jni.hpp.

Here is the call graph for this function:

◆ getObject()

jobject jau::JavaGlobalObj::getObject ( ) const
inlinenoexcept

Definition at line 185 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetObject()

static jobject jau::JavaGlobalObj::GetObject ( const std::shared_ptr< JavaAnon > &  shref)
inlinestaticnoexcept

Definition at line 194 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isValid()

static bool jau::JavaGlobalObj::isValid ( const std::shared_ptr< JavaAnon > &  shref)
inlinestaticnoexcept

Definition at line 154 of file helper_jni.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

JavaGlobalObj& jau::JavaGlobalObj::operator= ( const JavaGlobalObj o)
defaultnoexcept

◆ operator=() [2/2]

JavaGlobalObj& jau::JavaGlobalObj::operator= ( JavaGlobalObj &&  o)
defaultnoexcept

◆ toString()

std::string jau::JavaGlobalObj::toString ( ) const
inlineoverridevirtualnoexcept

Reimplemented from jau::JavaAnon.

Definition at line 174 of file helper_jni.hpp.

Here is the call graph for this function:

The documentation for this class was generated from the following file: