Details
-
New Feature
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
Unknown
Description
Inspired by JMockit which use object initializers for introducing their Java DSL, I think it would be a good idea to add a no-op default implementation of RouteBuilder, with a short name like 'Routes'.
ctx.add(new Routes {{ from("file:data/inbox?noop=true") .to("file:data/outbox"); }});
That way one can avoid the creation of anonymous inner classes, which is not only shorted and less boilerplate but also creates less classes and saves non-heap memory.
A simple POC as submitted as PR at https://github.com/apache/camel/pull/2401 which could be extended to include better unit testing and documentation.