diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java index 0ee1223..56b8baf 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java @@ -51,7 +51,7 @@ static public ArrayList doGenerate(ResourceDependencyGraph graph, DataFlowModel model) { ArrayList codes = new ArrayList<>(); ArrayList resources = StoreResourceCheck(graph); - + TypeDeclaration mainType = new TypeDeclaration(mainTypeName); CompilationUnit mainCU = new CompilationUnit(mainType); mainCU.addImport(new ImportDeclaration("java.util.*")); @@ -178,13 +178,16 @@ } HashSet tmps = new HashSet<>(); HashSet cont = new HashSet<>(); - for(MethodDeclaration method:mainType.getMethods()) { - if(!tmps.contains(method.getName())) tmps.add(method.getName()); - else cont.add(method.getName()); + for (MethodDeclaration method : mainType.getMethods()) { + if (!tmps.contains(method.getName())) + tmps.add(method.getName()); + else + cont.add(method.getName()); } - for(MethodDeclaration method:mainType.getMethods()) { - if(cont.contains(method.getName())) { - method.setName(method.getName() + method.getParameters().get(0).getName()); + for (MethodDeclaration method : mainType.getMethods()) { + if (cont.contains(method.getName())) { + method.setName(method.getName() + method.getParameters().get(0).getName().substring(0, 1).toUpperCase() + + method.getParameters().get(0).getName().substring(1)); } } return codes;