Graphs are tightly coupled to type and plugins. A new design for graph to make it strongly typed would be more useful outside of the dsl.
There would be classes for Graph, DirectedGraph, and DirectedAcyclicGraph.
The dsl can delegate to a spec object rather than graph. It can handle type conversions and plugins while using strongly typed objects.
class GraphDsl {
Graph graph
...missing goes to plugins then graph...
void plugin(String name) //add plugin methods to this
void type(String type) // change type of graph
}
Graphs are tightly coupled to type and plugins. A new design for graph to make it strongly typed would be more useful outside of the dsl.
There would be classes for Graph, DirectedGraph, and DirectedAcyclicGraph.
The dsl can delegate to a spec object rather than graph. It can handle type conversions and plugins while using strongly typed objects.