// Function that acts simply to ensure there are multiple lines. publicstaticvoid doNothing() {}
// Method with multiple paths we can break on. publicstaticvoid doMultiPath(boolean bit) {
doNothing(); if (bit) {
doNothing();
} else {
doNothing();
}
doNothing();
}
publicstaticvoid notifySingleStep(Thread thr, Executable e, long loc) { if (!e.equals(DO_MULTIPATH_METHOD)) { // Only report steps in doMultiPath return;
} int cur_line = Breakpoint.locationToLine(e, loc); // Only report anything when the line number changes. This is so we can run this test // against both the RI and ART and also to prevent front-end compiler changes from // affecting output. if (LAST_LINE_NUMBER == NO_LAST_LINE_NUMBER || LAST_LINE_NUMBER != cur_line) {
LAST_LINE_NUMBER = cur_line;
System.out.println("Single step: " + e + " @ line=" + cur_line);
}
}
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.