MCPcopy Create free account
hub / github.com/acl-dev/acl / jobject_set

Method jobject_set

android/samples/fiber/HttpFiber/src/main/cpp/jobject_set.cpp:6–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "util.h"
5
6jobject_set::jobject_set(JNIEnv *env, jobject obj)
7: env_(env)
8, obj_(obj)
9{
10 clz_ = env_->GetObjectClass(obj_);
11 if (clz_ == NULL) {
12 log_error("GetObjectClass error");
13 abort();
14 }
15
16#if 1
17 jmethodID foo = env_->GetMethodID(clz_, "<init>", "()V");
18 jobject o = env_->NewObject(clz_, foo, "()V");
19 log_info(">>>new obj=%p, clz=%p, env=%p<<<", o, clz_, env_);
20
21 if (env_->ExceptionOccurred()) {
22 log_error("%d: some exception happened!", __LINE__);
23 env_->ExceptionDescribe();
24 env_->ExceptionClear();
25 //abort();
26 }
27#endif
28}
29
30bool jobject_set::set(const char *name, int in)
31{

Callers

nothing calls this directly

Calls 2

log_errorFunction · 0.70
log_infoFunction · 0.70

Tested by

no test coverage detected