diff --git a/src/main/java/de/dhbwstuttgart/bytecode/TPHExtractor.java b/src/main/java/de/dhbwstuttgart/bytecode/TPHExtractor.java index 2db52ec3..e4f6315e 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/TPHExtractor.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/TPHExtractor.java @@ -92,7 +92,7 @@ public class TPHExtractor extends AbstractASTWalker { if (inMethod && !tphsClass.contains(tphName)) { ArrayList tphs = null; if (!(tphs = methodAndTph.getTphs()).contains(tphName)) { - tphs.add(tphName); + methodAndTph.addTph(tphName); } if (inLocalOrParamOrReturn) { if (!(tphs = methodAndTph.getLocalTphs()).contains(tphName)) { @@ -173,7 +173,7 @@ public class TPHExtractor extends AbstractASTWalker { public void visit(GenericRefType genericRefType) { String name = genericRefType.getParsedName(); if (inMethod) { - methodAndTph.getTphs().add(name); + methodAndTph.addTph(name); if (inLocalOrParamOrReturn) methodAndTph.getLocalTphs().add(name); }else { diff --git a/src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java b/src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java index 930ba3e3..e25958d1 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/genericsGenerator/GeneratedGenericsFinder.java @@ -169,7 +169,7 @@ public class GeneratedGenericsFinder implements ASTVisitor { if(ggResult != null) { //Hinzufuegen von Fayez ggResult - //generatedGenericsForSF.addGenericGeneratorResultClass(ggResult); + generatedGenericsForSF.addGenericGeneratorResultClass(ggResult); } // Fayez Ansatz Ende //*/ @@ -198,7 +198,7 @@ public class GeneratedGenericsFinder implements ASTVisitor { ggResultAlternative = new GenericsGeneratorResultForClass(className, listOfClassCons, ggRfaM); if(ggResultAlternative != null) {//hinzufuegen von Alis ggResult - generatedGenericsForSF.addGenericGeneratorResultClass(ggResultAlternative); + //generatedGenericsForSF.addGenericGeneratorResultClass(ggResultAlternative); System.out.println(generatedGenericsForSF); } System.out.println(ggResultAlternative); diff --git a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java index 33e241e7..f99dddad 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/insertGenerics/FamilyOfGeneratedGenerics.java @@ -648,7 +648,7 @@ public class FamilyOfGeneratedGenerics { ); if (containedVars.stream().filter(v -> tcOfCs.contains(new TPHConstraint(key, v, Relation.EXTENDS))) .count() > 0) { - //tempSet2.add(pairExtends2); + tempSet2.add(pairExtends2); } if (posOfTphs.containsKey(key)) { if (posOfTphs.get(key).contains(new PairTphMethod<>(PositionFinder.Position.METHOD, methodAndTPH.getId()))) { diff --git a/src/main/java/de/dhbwstuttgart/bytecode/utilities/MethodAndTPH.java b/src/main/java/de/dhbwstuttgart/bytecode/utilities/MethodAndTPH.java index c5a93f4f..caaad1be 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/utilities/MethodAndTPH.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/utilities/MethodAndTPH.java @@ -27,7 +27,11 @@ public class MethodAndTPH { this.id = name; this.constraints = constraints; } - + + public void addTph(String tph) { + tphs.add(tph); + } + public ArrayList getTphs() { return tphs; } diff --git a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java index c4625a7a..1936b5d2 100644 --- a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java +++ b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/StatementGenerator.java @@ -213,7 +213,8 @@ public class StatementGenerator { ArrayList argTypes = argumentList.getArguments().stream() .map(x -> TypePlaceholder.fresh(methodInvocationContext.getStart())) .collect(Collectors.toCollection(ArrayList::new)); - MethodCall ret = new MethodCall(TypePlaceholder.fresh(methodInvocationContext.getStart()), + MethodCall ret = new MethodCall(//new Void(new NullToken()), + TypePlaceholder.fresh(methodInvocationContext.getStart()), getReceiver(receiver), name, argumentList, TypePlaceholder.fresh(methodInvocationContext.getStart()), argTypes, methodInvocationContext.getStart()); return ret;