|
@@ -48,7 +48,9 @@ class Statemachine {
|
|
|
public class «flow.statemachineClassName» implements «flow.statemachineInterfaceName» {
|
|
public class «flow.statemachineClassName» implements «flow.statemachineInterfaceName» {
|
|
|
|
|
|
|
|
«flow.createFieldDeclarations(entry)»
|
|
«flow.createFieldDeclarations(entry)»
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ «flow.createStaticInitializer(entry)»
|
|
|
|
|
+
|
|
|
«flow.createConstructor»
|
|
«flow.createConstructor»
|
|
|
|
|
|
|
|
«flow.initFunction»
|
|
«flow.initFunction»
|
|
@@ -138,6 +140,15 @@ class Statemachine {
|
|
|
«ENDFOR»
|
|
«ENDFOR»
|
|
|
'''
|
|
'''
|
|
|
|
|
|
|
|
|
|
+ def private createStaticInitializer(ExecutionFlow flow, GeneratorEntry entry){
|
|
|
|
|
+ if(flow.staticInitSequence == null) return null
|
|
|
|
|
+ '''
|
|
|
|
|
+ static {
|
|
|
|
|
+ «flow.staticInitSequence?.code»
|
|
|
|
|
+ }
|
|
|
|
|
+ '''
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
def private writeableFieldDeclaration(VariableDefinition variable){
|
|
def private writeableFieldDeclaration(VariableDefinition variable){
|
|
|
'''private «variable.type.targetLanguageName» «variable.symbol»;'''
|
|
'''private «variable.type.targetLanguageName» «variable.symbol»;'''
|
|
|
}
|
|
}
|