transient srecord noeq G22NetworkInstance(G22Network network) { new Map elementsByIdentifier; new Map elementsByBlueprint; void makeInstance(G22Utils g22utils, G22NetworkElement e) { if (e == null) ret; O instance = e.makeInstance(g22utils, this); print("Calculated: " + instance); if (instance != null) { elementsByBlueprint.put(e, instance); mapPut(elementsByIdentifier, e.identifier(), instance); } } void init(G22Utils g22utils) { // This is in wrong order anyway for (e : network.elements) makeInstance(g22utils, e); } }