Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
I am writing a framework that builds a Twill app from a specification. While the builder pattern is convenient and foolproof for verbose construction of the app spec, it is cumbersome to use programmatically:
TwillSpecification.Builder.MoreRunnable builder =
TwillSpecification.Builder.with().setName(className).withRunnable();
// iterate over my spec and add runnables
TwillSpecification.Builder.RunnableSetter setter = null;
for (...)
}
// iterate over my spec and configure the order of runnables
TwillSpecification.Builder.NextOrder nextOrder = null;
for (...)
return nextOrder == null ? setter.anyOrder().build() : nextOrder.build();
If would be easier if I did not have to use the builder pattern...