/* Java bindings of the NetZones. */
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
/* 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. */
if (not cls)
return nullptr;
- jtable = env->NewObjectArray(static_cast<jsize>(self_as->getChildren()->size()), cls, nullptr);
+ jtable = env->NewObjectArray(static_cast<jsize>(self_as->get_children().size()), cls, nullptr);
if (not jtable) {
jxbt_throw_jni(env, "Hosts table allocation failed");
return nullptr;
}
- for (auto const& tmp_as : *self_as->getChildren()) {
+ for (auto const& tmp_as : self_as->get_children()) {
jobject tmp_jas = jnetzone_new_instance(env);
if (not tmp_jas) {
jxbt_throw_jni(env, "java As instantiation failed");
if (not cls)
return nullptr;
- std::vector<sg_host_t> table;
- as->getHosts(&table);
+ std::vector<simgrid::s4u::Host*> table = as->get_all_hosts();
jtable = env->NewObjectArray(static_cast<jsize>(table.size()), cls, nullptr);