// test good package boolean found = false; for (JavaFileObject jfo : jfm.list(StandardLocation.PLATFORM_CLASS_PATH, "java.lang",
EnumSet.of(Kind.CLASS), false)) {
System.err.println("found " + jfo.toUri()); if (jfo.isNameCompatible("Object", Kind.CLASS))
found = true;
} if (!found)
error("expected file, java/lang/Object.class, not found");
found = false; // test good package (VM name) for (JavaFileObject jfo : jfm.list(StandardLocation.PLATFORM_CLASS_PATH, "java/lang",
EnumSet.of(Kind.CLASS), false)) {
System.err.println("found " + jfo.toUri()); if (jfo.isNameCompatible("Object", Kind.CLASS))
found = true;
} if (!found)
error("expected file, java/lang/Object.class, not found");
}
}
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.