Class RegularPlanBuilder

  • All Implemented Interfaces:
    GenerationPlanBuilder

    public class RegularPlanBuilder
    extends Object
    implements GenerationPlanBuilder
    XXX Now, I don't like the idea both plan builder and its client (GenPlanTranslator) need runtime information about deployed modules. I shall restrict API of this class to identity of generators/languages/MCs. Then, both present interpreted and future generated plan translation code could be simple and straightforward, without a need to figure out particular TemplateModule from a runtime registry it hardly has access to. XXX myEngagedGenerators are in use only during wrapUp. Perhaps, shall pass them at this moment, rather than at construction time? Though I hate the name as it doesn't tell anything, it's a plan builder for regular use, targeted for everyday scenarios like model make in IDE. Name alternatives are ScopedPlanBuilder, RestrictExtendsPB and others of the same degree of imperfection. Likely, we'll need different approaches to extension processing, and the name shall reflect the approach, but at the moment I can't come up with a better one.

    Supports all operations.

    IMPORTANT: Treats extensions to generators on a 'first come, first served basis'. Tries to consume as many extensions as possible for the first statement that calls for extensions. Extensions are looked up among generators denoted as 'engaged'. If generatorB extends generatorA, and there's 'apply with extensions generatorA', then generatorB would get into final transformation sequence only when it's listed among 'engaged' generators supplied at the builder's construction time. Note, this implementation use these generators to limit 'upper' boundary only, in the aforementioned example it doesn't matter whether list of 'engaged' includes generatorA, which gets into transformation sequence regardless of 'engaged' generators. Perhaps, this has to be changed (and ScopedPB would be more appropriate name then)

    Since:
    2017.1