// source module
Module source;
Optional<Module> om = bootLayer.findModule(mn);
assertTrue(om.isPresent(), mn + " not in boot layer");
source = om.get();
// package should not be exported unconditionally
assertFalse(source.isExported(pn),
pn + " should not be exported unconditionally");
// $TARGET
String tn = s[1]; if ("ALL-UNNAMED".equals(tn)) {
// package is exported to all unnamed modules
assertTrue(source.isExported(pn, unnamedModule),
pn + " should be exported to all unnamed modules");
} else {
om = bootLayer.findModule(tn);
assertTrue(om.isPresent());
Module target = om.get();
// package should be exported to target module
assertTrue(source.isExported(pn, target),
pn + " should be exported to " + target);
// package should not be exported to unnamed modules
assertFalse(source.isExported(pn, unnamedModule),
pn + " should not be exported to unnamed modules");
}
}
}
staticvoid assertTrue(boolean cond) { if (!cond) thrownew RuntimeException();
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.