Class NextGen
- All Implemented Interfaces:
Runnable
NextGen is started with a simple parameter, the URI of a Model-File.
It starts to locate (with the ServiceLoader-Machanism) a implementation of ModelLoader and asks each of them if it can handel a model with the given URI. Typically there is only one ModelLoader, that can handle the given model URI.
After that it loads all Cartridges (again ServiceLoader).
Each Cartridge is called with a new instance M of the model laoded by the ModelLoader After that the Transformations of the Cartridge are startet. This results in an enhanced Model M'.
After that the Cartridge has to map Generators to ModelElements on the model M'.
If that mapping is done, NextGen will start the generation for each mapped ModelElement.
The result of a generation call is a CodeBlock. CodeBlocks can contain Java, TypsScript,XML, YAML... whatever your application needs.
Each CodeBlock is than given to the Cartridge to write the content into your project.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic ModelLoaderstatic ProtectionStrategiestatic Stringstatic voidvoidrun()static voidrunCartridgeWithName(String cartridgeName) static voidsetActiveLoader(ModelLoader loader) static voidsetWorkingDir(String workingDir)