Beispiel #1
0
void rvmCallVoidClassMethodA(Env* env, Class* clazz, Method* method, jvalue* args) {
    CallInfo* callInfo = INIT_CALL_INFO(env, NULL, method, FALSE, args);
    if (!callInfo) return;
    rvmInitialize(env, method->clazz);
    if (rvmExceptionOccurred(env)) return;
    callVoidMethod(env, callInfo);
}
void JNIMethod::callVoidMethod( jobject instance, ... )
{
	va_list args;
	va_start( args, instance );
	callVoidMethod( instance, args );
	va_end( args );
}
void Soprano::Sesame2::RepositoryConnection::remove( const JObjectRef& subject, const JObjectRef& predicate, const JObjectRef& object, const JObjectRef& context )
{
    JObjectRef contexts = JNIWrapper::instance()->env()->NewObjectArray( context ? 1 : 0,
                                                                         d->classResource(),
                                                                         context );
    callVoidMethod( d->IDremove(), subject.data(), predicate.data(), object.data(), contexts.data() );
}
void Soprano::Sesame2::RepositoryConnection::close()
{
    jmethodID closeMethodId = getMethodID( "close", "()V" );
    if ( closeMethodId ) {
        callVoidMethod( closeMethodId );
        JNIWrapper::instance()->debugException();
    }
}
Beispiel #5
0
void rvmCallNonvirtualVoidInstanceMethodA(Env* env, Object* obj, Method* method, jvalue* args) {
    CallInfo* callInfo = INIT_CALL_INFO(env, obj, method, FALSE, args);
    if (!callInfo) return;
    if (obj && CLASS_IS_PROXY(obj->clazz)) {
        env->reserved0 = (void*) method->name;
        env->reserved1 = (void*) method->desc;
    }
    callVoidMethod(env, callInfo);
}
void Soprano::Sesame2::RepositoryConnection::remove( const JObjectRef& statement )
{
    JObjectRef contexts = JNIWrapper::instance()->env()->NewObjectArray( 0, d->classResource(), 0 );
    callVoidMethod( d->IDremoveStatement(), statement.data(), contexts.data() );
}
void Soprano::Sesame2::RepositoryConnection::addStatement( const JObjectRef& statement )
{
    // sesame wants an empty array for the contexts
    static jobjectArray contexts = JNIWrapper::instance()->env()->NewObjectArray( 0, d->classResource(), 0 );
    callVoidMethod( d->IDaddStatement(), statement.data(), contexts );
}