From aed261c807191a0103a6a81474b72d4bf9e31666 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 21 Dec 2016 15:39:07 +0100 Subject: [PATCH 1/8] =?UTF-8?q?JavaClassName=20aufr=C3=A4umen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dhbwstuttgart/typecheck/JavaClassName.java | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/de/dhbwstuttgart/typecheck/JavaClassName.java b/src/de/dhbwstuttgart/typecheck/JavaClassName.java index f650a9fc1..7536d6236 100644 --- a/src/de/dhbwstuttgart/typecheck/JavaClassName.java +++ b/src/de/dhbwstuttgart/typecheck/JavaClassName.java @@ -7,19 +7,13 @@ import java.util.List; * Stellt den Namen einer Java Klasse dar. * Dieser kann auch den Packagenamen mit beinhalten: de.dhbwstuttgart.typeinference.Menge * - * @author janulrich - * - * + * @author Andreas Stadelmeier */ public class JavaClassName { private String name; private PackageName packageName; - - /** - * TODO: JavaClassName sollten aus den Assumptions generiert werden. - * Diese wissen, welche Typen und Typnamen existieren und können direkt auf Korrektheit prüfen. - */ + JavaClassName(String name){ if(name == null)throw new NullPointerException(); @@ -38,15 +32,14 @@ public class JavaClassName { this.name = names[names.length-1]; } } - - //Auto-generated hashCode: + @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); - //result = prime * result - // + ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode + result = prime * result + + ((packageName == null) ? 0 : packageName.hashCode()); //PackageName does not infect hashCode return result; } From 5f61d478fae2bd15b305f68ccd8dbac58672244a Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Wed, 21 Dec 2016 15:46:28 +0100 Subject: [PATCH 2/8] =?UTF-8?q?Class=20=C3=A4ndern=20zu=20ClassOrInterface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../syntaxtree/BasicAssumptionClass.html | 14 +++++------ .../de/dhbwstuttgart/syntaxtree/Class.html | 2 +- .../dhbwstuttgart/syntaxtree/Interface.html | 10 ++++---- .../syntaxtree/class-use/Class.html | 4 ++-- .../typeinference/FunNInterface.html | 10 ++++---- .../parser/SyntaxTreeGenerator.java | 8 +++---- .../{Class.java => ClassOrInterface.java} | 2 +- .../dhbwstuttgart/syntaxtree/SourceFile.java | 7 ++---- .../syntaxtree/statement/ForStmt.java | 14 ++--------- .../syntaxtree/statement/LocalVarDecl.java | 13 +--------- .../syntaxtree/statement/NotExpr.java | 15 ++---------- .../syntaxtree/statement/PositivExpr.java | 13 ++-------- .../syntaxtree/statement/PreIncExpr.java | 14 ++--------- .../syntaxtree/statement/Receiver.java | 10 ++------ .../syntaxtree/statement/This.java | 12 +--------- .../syntaxtree/statement/WhileStmt.java | 24 ++----------------- .../syntaxtree/type/RefType.java | 3 --- 17 files changed, 41 insertions(+), 134 deletions(-) rename src/de/dhbwstuttgart/syntaxtree/{Class.java => ClassOrInterface.java} (89%) diff --git a/doc/LambdaJavadoc/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.html b/doc/LambdaJavadoc/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.html index ffe47a09d..960cbae1e 100644 --- a/doc/LambdaJavadoc/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.html +++ b/doc/LambdaJavadoc/de/dhbwstuttgart/syntaxtree/BasicAssumptionClass.html @@ -69,9 +69,9 @@