publicclass Main { publicstaticvoid main(String[] args) throws Exception {
System.loadLibrary(args[0]);
Class<?> c = Class.forName("Test");
ensureJitCompiled(c, "testEmpty");
ensureJitCompiled(c, "testPrimitive");
Method m = c.getMethod("testEmpty");
m.invoke(c.newInstance()); if (field != null) { thrownew Error("Expected null");
}
m = c.getMethod("testPrimitive"); int a = (Integer)m.invoke(c.newInstance()); if (a != 1) { thrownew Error("Expected 1, got " + a);
} if (field != null) { thrownew Error("Expected null");
}
}
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.