LibreOffice Module bridges (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
jni_uno::JNI_context Class Reference

#include <jni_base.h>

Inheritance diagram for jni_uno::JNI_context:
[legend]
Collaboration diagram for jni_uno::JNI_context:
[legend]

Public Member Functions

 JNI_context (JNI_info const *jni_info, JNIEnv *env, jobject class_loader)
 
JNI_info const * get_info () const
 
JNIEnv * operator-> () const
 
JNIEnv * get_jni_env () const
 
void getClassForName (jclass *classClass, jmethodID *methodForName) const
 
jclass findClass (char const *name, jclass classClass, jmethodID methodForName, bool inException) const
 
void ensure_no_exception () const
 
bool assert_no_exception () const
 
OUString get_stack_trace (jobject jo_exc=nullptr) const
 

Private Member Functions

 JNI_context (JNI_context const &)=delete
 
JNI_contextoperator= (JNI_context const &)=delete
 
void java_exc_occurred () const
 

Private Attributes

JNI_info const * m_jni_info
 
JNIEnv * m_env
 
jobject m_class_loader
 

Detailed Description

Definition at line 55 of file jni_base.h.

Constructor & Destructor Documentation

◆ JNI_context() [1/2]

jni_uno::JNI_context::JNI_context ( JNI_context const &  )
privatedelete

◆ JNI_context() [2/2]

jni_uno::JNI_context::JNI_context ( JNI_info const *  jni_info,
JNIEnv *  env,
jobject  class_loader 
)
inlineexplicit

Definition at line 66 of file jni_base.h.

References env.

Member Function Documentation

◆ assert_no_exception()

bool jni_uno::JNI_context::assert_no_exception ( ) const
inline

Definition at line 105 of file jni_base.h.

References m_env, and SAL_WARN.

Referenced by get_stack_trace().

◆ ensure_no_exception()

void jni_uno::JNI_context::ensure_no_exception ( ) const
inline

◆ findClass()

jclass jni_uno::JNI_context::findClass ( char const *  name,
jclass  classClass,
jmethodID  methodForName,
bool  inException 
) const

◆ get_info()

JNI_info const * jni_uno::JNI_context::get_info ( ) const
inline

◆ get_jni_env()

JNIEnv * jni_uno::JNI_context::get_jni_env ( ) const
inline

Definition at line 78 of file jni_base.h.

References m_env.

Referenced by jni_uno::JNI_info::create_type_info(), and jni_uno::JLocalAutoRef::operator=().

◆ get_stack_trace()

OUString jni_uno::JNI_context::get_stack_trace ( jobject  jo_exc = nullptr) const

◆ getClassForName()

void jni_uno::JNI_context::getClassForName ( jclass *  classClass,
jmethodID *  methodForName 
) const

Definition at line 342 of file jni_bridge.cxx.

References m_env.

Referenced by jni_uno::find_class(), and jni_uno::JNI_info::get_jni_info().

◆ java_exc_occurred()

void jni_uno::JNI_context::java_exc_occurred ( ) const
private

◆ operator->()

JNIEnv * jni_uno::JNI_context::operator-> ( ) const
inline

Definition at line 76 of file jni_base.h.

References m_env.

◆ operator=()

JNI_context & jni_uno::JNI_context::operator= ( JNI_context const &  )
privatedelete

Member Data Documentation

◆ m_class_loader

jobject jni_uno::JNI_context::m_class_loader
private

Definition at line 59 of file jni_base.h.

Referenced by findClass().

◆ m_env

JNIEnv* jni_uno::JNI_context::m_env
private

◆ m_jni_info

JNI_info const* jni_uno::JNI_context::m_jni_info
private

Definition at line 57 of file jni_base.h.

Referenced by get_info().


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