feat(fls): topology of a .fls file as Java loads it

readTopology maps the decoded JavaBeans graph to devices, cables and
documentation items the way SzenarioVerwaltung.netzwerkLaden does: the
kind from the Java class (the palette label is not file data), devices
without bounds at 0,0, interface values through Java's setters. All 23
corpus files match Java field by field.

Found on the way:
- listItems mixed a constructor's elements with added ones; a router's
  second interface was lost. Lists now replay add/set in order after the
  elements the constructor made.
- The first 0 of a file may be SwingConstants.CENTER; measured like the
  getter defaults.
- IP.ipCheck (javaIp.ts) measured on 46 cases: empty tokens skipped,
  signs, leading zeros and BMP digits of any script accepted.
- The Java oracle took lower-case MACs in a file for random ones (8
  interfaces); it now compares case-insensitively and reports the host
  name flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-29 20:33:02 +00:00
co-authored by Claude Opus 5.5
parent a02b78b4cb
commit a02bb62413
18 changed files with 1446 additions and 34 deletions
+11 -1
View File
@@ -4,7 +4,10 @@
// later referenced by id — e.g. as a node's x coordinate. Decoding such a file
// needs these defaults; they are measured here, not guessed.
//
// Usage: java -cp filius.jar:lib/*:classes GetterDefaults <output json> <fqcn#property>...
// The same holds for static constants: the first Integer 0 in a file may be
// written as `SwingConstants.CENTER`, and every later 0 refers to it.
//
// Usage: java -cp filius.jar:lib/*:classes GetterDefaults <output json> <fqcn#property | fqcn::FIELD>...
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
@@ -20,6 +23,13 @@ public class GetterDefaults {
Map<String, Object> result = new TreeMap<>();
for (int index = 1; index < args.length; index++) {
String key = args[index];
if (key.contains("::")) {
String className = key.substring(0, key.indexOf("::"));
String field = key.substring(key.indexOf("::") + 2);
String simpleName = className.substring(className.lastIndexOf('.') + 1);
result.put(simpleName + "." + field, Class.forName(className).getField(field).get(null));
continue;
}
String className = key.substring(0, key.indexOf('#'));
String property = key.substring(key.indexOf('#') + 1);
String simpleName = className.substring(className.lastIndexOf('.') + 1);