collaboration GrammarUsedButNotDefined { cd {{ Grammar = List(Production). Production = NonTerminal Body. Body = ... NonTerminal = Ident. Main = . }} classes {{ class Main { public static void main(String args[]) throws Exception { Grammar c = Grammar.parse(System.in); ClassGraph cg = new ClassGraph(true, false); c.usedButNotDefined(ClassGraph); System.out.println("done"); } } }} subCollaborations collaboration UsedButNotDefined { cd {{ Sys = List(Definition). Definition = Item Body. Item = Ident. Body = List(Item). }} interfaces {{interface SysI { public void usedButNotDefined(ClassGraph cg); abstract String get_defs(); abstract String get_uses();} }} classes {{ class Sys implements SysI { public void usedButNotDefined(ClassGraph cg){} HashSet definitions(ClassGraph cg){ cg.traverse(this,get_defs(), new Visitor() {}); } } }} } adapters class_map UsedButNotDefined.Sys played_by {Grammar} with implement signature {{ abstract String get_defs() }} body {{ return new String ("from Grammar bypassing Body to NonTerminal"); }} ; class_map UsedButNotDefined.Item played_by {NonTerminal} }