diff --git a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java index 83a1e19..25de41f 100644 --- a/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java +++ b/AlgebraicDataflowArchitectureModel/src/algorithms/JavaCodeGenerator.java @@ -224,14 +224,14 @@ codes.add("public class " + type.getTypeName() + "{"); for (FieldDeclaration field : type.getFields()) { if (type.getTypeName() != mainTypeName) { - String cons = "\t" + "private " + field.getType().getImplementationTypeName() + " " + String cons = "\t" + "private " + field.getType().getInterfaceTypeName() + " " + field.getName(); if (field.getType().equals(DataConstraintModel.typeList)) cons += " = new ArrayList<>()"; cons += ";"; codes.add(cons); } else { - String cons = "\t" + "private " + field.getType().getImplementationTypeName() + " " + String cons = "\t" + "private " + field.getType().getInterfaceTypeName() + " " + field.getName() + " = new " + field.getType().getTypeName() + "("; for (TypeDeclaration tree : codeTree) { if (field.getType().getTypeName() == tree.getTypeName()) { @@ -270,11 +270,11 @@ } } for (MethodDeclaration method : type.getMethods()) { - String varstr = "\t" + "public " + method.getReturnType().getImplementationTypeName() + " " + String varstr = "\t" + "public " + method.getReturnType().getInterfaceTypeName() + " " + method.getName() + "("; if (method.getParameters() != null) { for (VariableDeclaration var : method.getParameters()) { - varstr += var.getType().getImplementationTypeName() + " " + var.getName() + ","; + varstr += var.getType().getInterfaceTypeName() + " " + var.getName() + ","; } if (!method.getParameters().isEmpty()) varstr = varstr.substring(0, varstr.length() - 1);