class RedefineChangeClassOrderTarg { publicstaticvoid main(String[] args) { new RedefineChangeClassOrderTarg().hi(false); new RedefineChangeClassOrderTarg().hi(true); // @1 breakpoint
}
// This Hack code block exists to force some verification_type_info // objects of subtype Object_variable_info into the StackMapTable. // // In the redefined code, the above Foo1 code is effectively // moved after the Foo2 code below which causes things to be // layed out in a different order in the constant pool. The // cpool_index in the Object_variable_info has to be updated // in the redefined code's StackMapTable to refer to right /// constant pool index in the merged constant pool.
Hack hack = getClass().getAnnotation(Hack.class); if (hack != null) {
String class_annotation = hack.value();
System.out.println("class annotation is: " + class_annotation); if (isNewVersion) { if (class_annotation.equals("JUNK")) {
System.out.println("class_annotation is JUNK.");
} else {
System.out.println("class_annotation is NOT JUNK.");
}
}
}
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.