/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
- simgrid::s4u::NetZone* as = jnetzone_get_native(env, jas);
- return env->NewStringUTF(as->name());
+ const simgrid::s4u::NetZone* as = jnetzone_get_native(env, jas);
+ return env->NewStringUTF(as->get_cname());
jxbt_throw_jni(env, "java As instantiation failed");
return nullptr;
}
tmp_jas = jnetzone_ref(env, tmp_jas);
jxbt_throw_jni(env, "java As instantiation failed");
return nullptr;
}
tmp_jas = jnetzone_ref(env, tmp_jas);
}
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jas, jobject jname) {
}
JNIEXPORT jobject JNICALL Java_org_simgrid_msg_As_getProperty(JNIEnv *env, jobject jas, jobject jname) {
jxbt_throw_notbound(env, "as", jas);
return nullptr;
}
const char *name = env->GetStringUTFChars(static_cast<jstring>(jname), 0);
jxbt_throw_notbound(env, "as", jas);
return nullptr;
}
const char *name = env->GetStringUTFChars(static_cast<jstring>(jname), 0);
- jtable = env->NewObjectArray(static_cast<jsize>(table->size()), cls, nullptr);
+ std::vector<simgrid::s4u::Host*> table = as->get_all_hosts();
+
+ jtable = env->NewObjectArray(static_cast<jsize>(table.size()), cls, nullptr);