diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java index 69efb90..a50bc46 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/CodeGenerator.java @@ -47,7 +47,7 @@ type.addConstructors(new VariableDeclaration(new Type(rename, rename), ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceName())); }else { - vars.add(new VariableDeclaration(new Type(rename, rename), + vars.add(new VariableDeclaration(DataConstraintModel.typeInt, ((ResourceNode) re.getSource()).getIdentifierTemplate().getResourceName())); flag = true; } @@ -101,7 +101,7 @@ for (FieldDeclaration field : type.getFields()) { for (VariableDeclaration vari : type.getConstructors()) { if (field.getType().getTypeName().equals(vari.getType().getTypeName())) { - codes.add("\t\t" + "this." + field.getName() + " = " + field.getName()); + codes.add("\t\t" + "this." + field.getName() + " = " + field.getName() + ";"); } } }