/** * Creates a Polygene Runtime instance containing one Layer with one Module. * The Layer will be named "Layer 1" and the Module will be named "Module 1". It is possible to add * additional layers and modules via the Assembler interface that must be implemented in the subclass of this * class. * * @throws AssemblyException Either if the model can not be created from the disk, or some inconsistency in * the programming model makes it impossible to create it. * @throws ActivationException If the automatic {@code activate()} method is throwing this Exception.. */ public SingletonAssembler() throws AssemblyException, ActivationException { // START SNIPPET: actual polygene = new Energy4Java(); applicationInstance = createApplicationInstance(); activateApplication(); // END SNIPPET: actual moduleInstance = applicationInstance.findModule( layerName(), moduleName() ); }
/** * Creates a Polygene Runtime instance containing one Layer with one Module. * The Layer will be named "Layer 1" and the Module will be named "Module 1". It is possible to add * additional layers and modules via the Assembler interface that must be implemented in the subclass of this * class. * * @param assemble An Assembler lambda containing the module assembly. * @throws AssemblyException Either if the model can not be created from the disk, or some inconsistency in * the programming model makes it impossible to create it. * @throws ActivationException If the automatic {@code activate()} method is throwing this Exception.. */ public SingletonAssembler( Assembler assemble ) throws ActivationException { this.assemble = assemble; polygene = new Energy4Java(); applicationInstance = createApplicationInstance(); activateApplication(); moduleInstance = applicationInstance.findModule( layerName(), moduleName() ); }
/** * Creates a Polygene Runtime instance containing one Layer with one Module. * The Layer will be named "Layer 1" and the Module will be named "Module 1". It is possible to add * additional layers and modules via the Assembler interface that must be implemented in the subclass of this * class. * * @throws AssemblyException Either if the model can not be created from the disk, or some inconsistency in * the programming model makes it impossible to create it. * @throws ActivationException If the automatic {@code activate()} method is throwing this Exception.. */ public SingletonAssembler() throws AssemblyException, ActivationException { // START SNIPPET: actual polygene = new Energy4Java(); applicationInstance = createApplicationInstance(); activateApplication(); // END SNIPPET: actual moduleInstance = applicationInstance.findModule( layerName(), moduleName() ); }
/** * Creates a Polygene Runtime instance containing one Layer with one Module. * The Layer will be named "Layer 1" and the Module will be named "Module 1". It is possible to add * additional layers and modules via the Assembler interface that must be implemented in the subclass of this * class. * * @param assemble An Assembler lambda containing the module assembly. * @throws AssemblyException Either if the model can not be created from the disk, or some inconsistency in * the programming model makes it impossible to create it. * @throws ActivationException If the automatic {@code activate()} method is throwing this Exception.. */ public SingletonAssembler( Assembler assemble ) throws ActivationException { this.assemble = assemble; polygene = new Energy4Java(); applicationInstance = createApplicationInstance(); activateApplication(); moduleInstance = applicationInstance.findModule( layerName(), moduleName() ); }