From 465f82e967d7588af492b0b1c7de688757629cf7 Mon Sep 17 00:00:00 2001 From: Till Schnell Date: Tue, 6 Apr 2021 18:25:04 +0200 Subject: [PATCH] Add generation of constraints for ref type --- .../inferWildcards/ConstraintsGenerationUtils.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java b/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java index 94f710de..10b5c315 100644 --- a/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java +++ b/src/main/java/de/dhbwstuttgart/inferWildcards/ConstraintsGenerationUtils.java @@ -4,7 +4,6 @@ import java.util.HashSet; import java.util.Set; import de.dhbwstuttgart.parser.NullToken; -import de.dhbwstuttgart.parser.scope.JavaClassName; import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.RefTypeOrTPHOrWildcardOrGeneric; @@ -23,7 +22,7 @@ public final class ConstraintsGenerationUtils } @SuppressWarnings({ "unchecked", "rawtypes" }) - public static ConstraintSet generateConstraints (JavaClassName name, TypePlaceholder tph) { + public static ConstraintSet generateConstraints (RefType refType, TypePlaceholder tph) { ConstraintSet constraintSet = new ConstraintSet<>(); Set> oderConstraints = new HashSet<>(); constraintSet.addOderConstraint(oderConstraints); @@ -32,7 +31,6 @@ public final class ConstraintsGenerationUtils oderConstraints.add(c); // single type - RefType refType = new RefType(name, new NullToken()); ConstraintsGenerationUtils.addToConstraint(c, tph, refType); // extends type @@ -44,9 +42,6 @@ public final class ConstraintsGenerationUtils ConstraintsGenerationUtils.addToConstraint(c, tph, superWildcardType); return constraintSet; - - // Constraints müssen nicht übernommen werden. InferWildcard constraints können - // individuell erstellt werden und müssen später umgebaut werden } @SuppressWarnings({ "unchecked", "rawtypes" })