diff --git a/AlgebraicDataflowArchitectureModel/src/algorithm/CodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithm/CodeGenerator.java index 4486d9d..925110c 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithm/CodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithm/CodeGenerator.java @@ -22,14 +22,19 @@ for (Node pn : resource.getSuccessors()) { str += ((ResourceNode) pn).getIdentifierTemplate().getResourceName().substring(0, 1).toUpperCase() + ((ResourceNode) pn).getIdentifierTemplate().getResourceName().substring(1) + ","; } + if(str.substring(str.length() - 1, str.length()) == ",") str = str.substring(0, str.length() - 1); } - str = str + ");"; + str += ");"; codes.add(str); } codes.add("}"); for (Node n : graph.getNodes()) { ResourceNode resource = (ResourceNode) n; - codes.add("public class " + resource.getIdentifierTemplate().getResourceName() + " {"); + codes.add("public class " + resource.getIdentifierTemplate().getResourceName().substring(0, 1) + .toUpperCase() + resource.getIdentifierTemplate().getResourceName().substring(1) + " {"); + if(((StoreAttribute) resource.getAttribute()).isStored()) { + + } codes.add("}"); } return codes;