diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java index 50db9ad..06b12cf 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java @@ -31,7 +31,20 @@ public class CodeGenerator { public static final Type typeVoid = new Type("Void", "void"); - public static String mainTypeName = "Main"; + private static String defaultMainTypeName = "Main"; + static String mainTypeName = defaultMainTypeName; + + public static String getMainTypeName() { + return mainTypeName; + } + + public static void setMainTypeName(String mainTypeName) { + CodeGenerator.mainTypeName = mainTypeName; + } + + public static void resetMainTypeName() { + CodeGenerator.mainTypeName = defaultMainTypeName; + } static public ArrayList doGenerate(ResourceDependencyGraph graph, DataFlowModel model) { ArrayList codes = new ArrayList<>();