LibreOffice Module connectivity (master) 1
Object.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
21#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
22#include <com/sun/star/logging/LogLevel.hpp>
23#include <java/tools.hxx>
25#include <osl/diagnose.h>
26#include <java/LocalRef.hxx>
27#include <strings.hxx>
28
31
32using namespace connectivity;
33using namespace ::com::sun::star::uno;
34using namespace ::com::sun::star::beans;
35using namespace ::com::sun::star::sdbc;
36using namespace ::com::sun::star::container;
37using namespace ::com::sun::star::lang;
38
39
40static ::rtl::Reference< jvmaccess::VirtualMachine > const & getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine >& _rVM = ::rtl::Reference< jvmaccess::VirtualMachine >(),
41 bool _bSet = false)
42{
43 static ::rtl::Reference< jvmaccess::VirtualMachine > s_VM;
44 if ( _rVM.is() || _bSet )
45 s_VM = _rVM;
46 return s_VM;
47}
48
49::rtl::Reference< jvmaccess::VirtualMachine > java_lang_Object::getVM(const Reference<XComponentContext >& _rxContext)
50{
52 if ( !xVM.is() && _rxContext.is() )
53 xVM = getJavaVM2(::connectivity::getJavaVM(_rxContext));
54
55 return xVM;
56}
57
59 : m_aGuard(java_lang_Object::getVM())
60 , pEnv(nullptr)
61{
63 OSL_ENSURE(pEnv,"Environment is nULL!");
64}
65
67{
68}
69
70static oslInterlockedCount& getJavaVMRefCount()
71{
72 static oslInterlockedCount s_nRefCount = 0;
73 return s_nRefCount;
74}
75
77{
78 osl_atomic_increment(&getJavaVMRefCount());
79}
80
82{
83 osl_atomic_decrement(&getJavaVMRefCount());
84 if ( getJavaVMRefCount() == 0 )
85 {
87 }
88}
89
90// static variables of the class
91jclass java_lang_Object::theClass = nullptr;
92
94{
95 if( !theClass )
96 theClass = findMyClass("java/lang/Object");
97 return theClass;
98}
99// the actual constructor
101 : object( nullptr )
102{
104}
105
106// the protected-constructor for the derived classes
107java_lang_Object::java_lang_Object( JNIEnv * pXEnv, jobject myObj )
108 : object( nullptr )
109{
111 if( pXEnv && myObj )
112 object = pXEnv->NewGlobalRef( myObj );
113}
114
115java_lang_Object::~java_lang_Object() COVERITY_NOEXCEPT_FALSE
116{
117 if( object )
118 {
120 clearObject(*t.pEnv);
121 }
123}
125{
126 if( object )
127 {
128 rEnv.DeleteGlobalRef( object );
129 object = nullptr;
130 }
131}
132
134{
135 if( object )
136 {
138 clearObject(*t.pEnv);
139 }
140}
141// the protected-constructor for the derived classes
142void java_lang_Object::saveRef( JNIEnv * pXEnv, jobject myObj )
143{
144 OSL_ENSURE( myObj, "object in c++ -> Java Wrapper" );
145 if( myObj )
146 object = pXEnv->NewGlobalRef( myObj );
147}
148
149
151{
152 static jmethodID mID(nullptr);
153 return callStringMethod("toString",mID);
154}
155
156
157namespace
158{
159 bool lcl_translateJNIExceptionToUNOException(
160 JNIEnv* _pEnvironment, const Reference< XInterface >& _rxContext, SQLException& _out_rException )
161 {
162 jthrowable jThrow = _pEnvironment ? _pEnvironment->ExceptionOccurred() : nullptr;
163 if ( !jThrow )
164 return false;
165
166 _pEnvironment->ExceptionClear();
167 // we have to clear the exception here because we want to handle it itself
168
169 if ( _pEnvironment->IsInstanceOf( jThrow, java_sql_SQLException_BASE::st_getMyClass() ) )
170 {
171 java_sql_SQLException_BASE aException( _pEnvironment, jThrow );
172 _out_rException = SQLException( aException.getMessage(), _rxContext,
173 aException.getSQLState(), aException.getErrorCode(), Any() );
174 return true;
175 }
176 else if ( _pEnvironment->IsInstanceOf( jThrow, java_lang_Throwable::st_getMyClass() ) )
177 {
178 java_lang_Throwable aThrow( _pEnvironment, jThrow );
179#if OSL_DEBUG_LEVEL > 0
180 aThrow.printStackTrace();
181#endif
182 OUString sMessage = aThrow.getMessage();
183 if ( sMessage.isEmpty() )
184 sMessage = aThrow.getLocalizedMessage();
185 if( sMessage.isEmpty() )
186 sMessage = aThrow.toString();
187 _out_rException = SQLException( sMessage, _rxContext, OUString(), -1, Any() );
188 return true;
189 }
190 else
191 _pEnvironment->DeleteLocalRef( jThrow );
192 return false;
193 }
194}
195
196
197void java_lang_Object::ThrowLoggedSQLException( const ::comphelper::EventLogger& _rLogger, JNIEnv* _pEnvironment,
198 const Reference< XInterface >& _rxContext )
199{
200 SQLException aException;
201 if ( lcl_translateJNIExceptionToUNOException( _pEnvironment, _rxContext, aException ) )
202 {
203 _rLogger.log( css::logging::LogLevel::SEVERE, STR_LOG_THROWING_EXCEPTION, aException.Message, aException.SQLState, aException.ErrorCode );
204 throw aException;
205 }
206}
207
208void java_lang_Object::ThrowSQLException( JNIEnv* _pEnvironment, const Reference< XInterface>& _rxContext )
209{
210 SQLException aException;
211 if ( lcl_translateJNIExceptionToUNOException( _pEnvironment, _rxContext, aException ) )
212 throw aException;
213}
214
215void java_lang_Object::ThrowRuntimeException( JNIEnv* _pEnvironment, const Reference< XInterface>& _rxContext )
216{
217 try
218 {
219 ThrowSQLException(_pEnvironment, _rxContext);
220 }
221 catch (const SQLException& e)
222 {
223 css::uno::Any anyEx = cppu::getCaughtException();
224 throw css::lang::WrappedTargetRuntimeException( e.Message,
225 e.Context, anyEx );
226 }
227}
228
229void java_lang_Object::obtainMethodId_throwSQL(JNIEnv* _pEnv,const char* _pMethodName, const char* _pSignature,jmethodID& _inout_MethodID) const
230{
231 if ( !_inout_MethodID )
232 {
233 _inout_MethodID = _pEnv->GetMethodID( getMyClass(), _pMethodName, _pSignature );
234 OSL_ENSURE( _inout_MethodID, _pSignature );
235 if ( !_inout_MethodID )
236 throw SQLException();
237 } // if ( !_inout_MethodID )
238}
239
240void java_lang_Object::obtainMethodId_throwRuntime(JNIEnv* _pEnv,const char* _pMethodName, const char* _pSignature,jmethodID& _inout_MethodID) const
241{
242 if ( !_inout_MethodID )
243 {
244 _inout_MethodID = _pEnv->GetMethodID( getMyClass(), _pMethodName, _pSignature );
245 OSL_ENSURE( _inout_MethodID, _pSignature );
246 if ( !_inout_MethodID )
247 throw RuntimeException();
248 } // if ( !_inout_MethodID )
249}
250
251
252bool java_lang_Object::callBooleanMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const
253{
254 bool out( false );
255
257 OSL_ENSURE( t.pEnv, "java_lang_Object::callBooleanMethod: no Java environment anymore!" );
258 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()Z", _inout_MethodID);
259 // call method
260 out = t.pEnv->CallBooleanMethod( object, _inout_MethodID );
261 ThrowSQLException( t.pEnv, nullptr );
262
263 return out;
264}
265
266bool java_lang_Object::callBooleanMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const
267{
268 bool out( false );
270 OSL_ENSURE( t.pEnv, "java_lang_Object::callBooleanMethodWithIntArg: no Java environment anymore!" );
271 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)Z", _inout_MethodID);
272 // call method
273 out = t.pEnv->CallBooleanMethod( object, _inout_MethodID, _nArgument );
274 ThrowSQLException( t.pEnv, nullptr );
275
276 return out;
277}
278
279jobject java_lang_Object::callResultSetMethod( JNIEnv& _rEnv,const char* _pMethodName, jmethodID& _inout_MethodID ) const
280{
281 // call method
282 jobject out = callObjectMethod(&_rEnv,_pMethodName,"()Ljava/sql/ResultSet;", _inout_MethodID);
283 return out;
284}
285
286sal_Int32 java_lang_Object::callIntMethod_ThrowSQL(const char* _pMethodName, jmethodID& _inout_MethodID) const
287{
289 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
290 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()I", _inout_MethodID);
291 // call method
292 jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) );
293 ThrowSQLException( t.pEnv, nullptr );
294 return static_cast<sal_Int32>(out);
295}
296
297sal_Int32 java_lang_Object::callIntMethod_ThrowRuntime(const char* _pMethodName, jmethodID& _inout_MethodID) const
298{
300 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
301 obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"()I", _inout_MethodID);
302 // call method
303 jint out( t.pEnv->CallIntMethod( object, _inout_MethodID ) );
304 ThrowRuntimeException(t.pEnv, nullptr);
305 return static_cast<sal_Int32>(out);
306}
307
308sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID,sal_Int32 _nArgument ) const
309{
311 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
312 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)I", _inout_MethodID);
313 // call method
314 jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) );
315 ThrowSQLException( t.pEnv, nullptr );
316 return static_cast<sal_Int32>(out);
317}
318
319sal_Int32 java_lang_Object::callIntMethodWithIntArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID,sal_Int32 _nArgument ) const
320{
322 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
323 obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(I)I", _inout_MethodID);
324 // call method
325 jint out( t.pEnv->CallIntMethod( object, _inout_MethodID , _nArgument) );
326 ThrowRuntimeException(t.pEnv, nullptr);
327 return static_cast<sal_Int32>(out);
328}
329
330void java_lang_Object::callVoidMethod_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID) const
331{
333 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
334 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"()V", _inout_MethodID);
335
336 // call method
337 t.pEnv->CallVoidMethod( object, _inout_MethodID );
338 ThrowSQLException( t.pEnv, nullptr );
339}
340
341void java_lang_Object::callVoidMethod_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID) const
342{
344 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
345 obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"()V", _inout_MethodID);
346
347 // call method
348 t.pEnv->CallVoidMethod( object, _inout_MethodID );
349 ThrowRuntimeException(t.pEnv, nullptr);
350}
351
352void java_lang_Object::callVoidMethodWithIntArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const
353{
355 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
356 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(I)V", _inout_MethodID);
357
358 // call method
359 t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
360 ThrowSQLException( t.pEnv, nullptr );
361}
362
363void java_lang_Object::callVoidMethodWithIntArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, sal_Int32 _nArgument ) const
364{
366 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
367 obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(I)V", _inout_MethodID);
368
369 // call method
370 t.pEnv->CallVoidMethod( object, _inout_MethodID,_nArgument );
371 ThrowRuntimeException(t.pEnv, nullptr);
372}
373
374void java_lang_Object::callVoidMethodWithBoolArg_ThrowSQL( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const
375{
377 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
378 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID);
379 // call method
380 t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) );
381 ThrowSQLException( t.pEnv, nullptr );
382}
383
384void java_lang_Object::callVoidMethodWithBoolArg_ThrowRuntime( const char* _pMethodName, jmethodID& _inout_MethodID, bool _nArgument ) const
385{
387 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
388 obtainMethodId_throwRuntime(t.pEnv, _pMethodName,"(Z)V", _inout_MethodID);
389 // call method
390 t.pEnv->CallVoidMethod( object, _inout_MethodID,int(_nArgument) );
391 ThrowRuntimeException(t.pEnv, nullptr);
392}
393
394OUString java_lang_Object::callStringMethod( const char* _pMethodName, jmethodID& _inout_MethodID ) const
395{
397 OSL_ENSURE( t.pEnv, "java_lang_Object::callStringMethod: no Java environment anymore!" );
398
399 // call method
400 jstring out = static_cast<jstring>(callObjectMethod(t.pEnv,_pMethodName,"()Ljava/lang/String;", _inout_MethodID));
401 return JavaString2String( t.pEnv, out );
402}
403
404jobject java_lang_Object::callObjectMethod( JNIEnv * _pEnv,const char* _pMethodName,const char* _pSignature, jmethodID& _inout_MethodID ) const
405{
406 // obtain method ID
407 obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID);
408 // call method
409 jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID);
410 ThrowSQLException( _pEnv, nullptr );
411 return out;
412}
413
414
415jobject java_lang_Object::callObjectMethodWithIntArg( JNIEnv * _pEnv,const char* _pMethodName,const char* _pSignature, jmethodID& _inout_MethodID , sal_Int32 _nArgument) const
416{
417 obtainMethodId_throwSQL(_pEnv, _pMethodName,_pSignature, _inout_MethodID);
418 // call method
419 jobject out = _pEnv->CallObjectMethod( object, _inout_MethodID,_nArgument );
420 ThrowSQLException( _pEnv, nullptr );
421 return out;
422}
423
424OUString java_lang_Object::callStringMethodWithIntArg( const char* _pMethodName, jmethodID& _inout_MethodID , sal_Int32 _nArgument) const
425{
427 OSL_ENSURE( t.pEnv, "java_lang_Object::callStringMethod: no Java environment anymore!" );
428 jstring out = static_cast<jstring>(callObjectMethodWithIntArg(t.pEnv,_pMethodName,"(I)Ljava/lang/String;",_inout_MethodID,_nArgument));
429 return JavaString2String( t.pEnv, out );
430}
431
432void java_lang_Object::callVoidMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const
433{
435 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethod: no Java environment anymore!" );
436 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(Ljava/lang/String;)V", _inout_MethodID);
437
438 jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
439 // call method
440 t.pEnv->CallVoidMethod( object, _inout_MethodID , str.get());
441 ThrowSQLException( t.pEnv, nullptr );
442}
443
444sal_Int32 java_lang_Object::callIntMethodWithStringArg( const char* _pMethodName, jmethodID& _inout_MethodID,const OUString& _nArgument ) const
445{
447 OSL_ENSURE( t.pEnv, "java_lang_Object::callIntMethodWithStringArg: no Java environment anymore!" );
448 obtainMethodId_throwSQL(t.pEnv, _pMethodName,"(Ljava/lang/String;)I", _inout_MethodID);
449
450 //TODO: Check if the code below is needed
451 //jdbc::LocalRef< jstring > str( t.env(), convertwchar_tToJavaString( t.pEnv, sql ) );
452 //{
453 // jdbc::ContextClassLoaderScope ccl( t.env(),
454 // m_pConnection ? m_pConnection->getDriverClassLoader() : jdbc::GlobalRef< jobject >(),
455 // m_aLogger,
456 // *this
457 // );
458
459 jdbc::LocalRef< jstring > str( t.env(),convertwchar_tToJavaString(t.pEnv,_nArgument));
460 // call method
461 jint out = t.pEnv->CallIntMethod( object, _inout_MethodID , str.get());
462 ThrowSQLException( t.pEnv, nullptr );
463 return static_cast<sal_Int32>(out);
464}
465
466jclass java_lang_Object::findMyClass(const char* _pClassName)
467{
468 // the class must be fetched only once, therefore static
470 jclass tempClass = t.pEnv->FindClass(_pClassName); OSL_ENSURE(tempClass,"Java : FindClass not successful!");
471 if(!tempClass)
472 {
473 t.pEnv->ExceptionDescribe();
474 t.pEnv->ExceptionClear();
475 }
476 jclass globClass = static_cast<jclass>(t.pEnv->NewGlobalRef( tempClass ));
477 t.pEnv->DeleteLocalRef( tempClass );
478 return globClass;
479}
480
481/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static oslInterlockedCount & getJavaVMRefCount()
Definition: Object.cxx:70
static ::rtl::Reference< jvmaccess::VirtualMachine > const & getJavaVM2(const ::rtl::Reference< jvmaccess::VirtualMachine > &_rVM=::rtl::Reference< jvmaccess::VirtualMachine >(), bool _bSet=false)
Definition: Object.cxx:40
XPropertyListType t
jvmaccess::VirtualMachine::AttachGuard m_aGuard
Definition: Object.hxx:37
static void releaseRef()
Definition: Object.cxx:81
jobject callObjectMethod(JNIEnv *pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
Definition: Object.cxx:404
jobject callResultSetMethod(JNIEnv &_rEnv, const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:279
virtual ~java_lang_Object() COVERITY_NOEXCEPT_FALSE
Definition: Object.cxx:115
sal_Int32 callIntMethod_ThrowSQL(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:286
virtual jclass getMyClass() const
Definition: Object.cxx:93
bool callBooleanMethod(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:252
OUString toString() const
Definition: Object.cxx:150
sal_Int32 callIntMethodWithStringArg(const char *_pMethodName, jmethodID &_inout_MethodID, const OUString &_nArgument) const
Definition: Object.cxx:444
void callVoidMethodWithStringArg(const char *_pMethodName, jmethodID &_inout_MethodID, const OUString &_nArgument) const
Definition: Object.cxx:432
void callVoidMethod_ThrowSQL(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:330
sal_Int32 callIntMethodWithIntArg_ThrowSQL(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:308
void callVoidMethodWithIntArg_ThrowSQL(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:352
void saveRef(JNIEnv *pEnv, jobject myObj)
Definition: Object.cxx:142
void callVoidMethodWithBoolArg_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID, bool _nArgument) const
Definition: Object.cxx:384
void callVoidMethodWithIntArg_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:363
OUString callStringMethod(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:394
jobject callObjectMethodWithIntArg(JNIEnv *pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:415
bool callBooleanMethodWithIntArg(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:266
OUString callStringMethodWithIntArg(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:424
static void ThrowSQLException(JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
Definition: Object.cxx:208
sal_Int32 callIntMethod_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:297
static void ThrowLoggedSQLException(const ::comphelper::EventLogger &_rLogger, JNIEnv *pEnvironment, const css::uno::Reference< css::uno::XInterface > &_rxContext)
Definition: Object.cxx:197
static jclass findMyClass(const char *_pClassName)
Definition: Object.cxx:466
void obtainMethodId_throwRuntime(JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
Definition: Object.cxx:240
static void ThrowRuntimeException(JNIEnv *pEnv, const css::uno::Reference< css::uno::XInterface > &_rContext)
Definition: Object.cxx:215
void callVoidMethod_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID) const
Definition: Object.cxx:341
void callVoidMethodWithBoolArg_ThrowSQL(const char *_pMethodName, jmethodID &_inout_MethodID, bool _nArgument) const
Definition: Object.cxx:374
sal_Int32 callIntMethodWithIntArg_ThrowRuntime(const char *_pMethodName, jmethodID &_inout_MethodID, sal_Int32 _nArgument) const
Definition: Object.cxx:319
void obtainMethodId_throwSQL(JNIEnv *_pEnv, const char *_pMethodName, const char *_pSignature, jmethodID &_inout_MethodID) const
Definition: Object.cxx:229
helper class to hold a local ref to a JNI object
Definition: LocalRef.hxx:42
osl::ClearableMutexGuard m_aGuard
OUString JavaString2String(JNIEnv *pEnv, jstring Str)
Definition: tools.cxx:162
jstring convertwchar_tToJavaString(JNIEnv *pEnv, const OUString &Temp)
Definition: tools.cxx:93
Any SAL_CALL getCaughtException()
OUString sMessage
#define STR_LOG_THROWING_EXCEPTION
Definition: strings.hxx:70