From f69554c6a11782eb922a6173bb00dae15c72f67c Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Fri, 12 Mar 2021 18:29:51 +0100 Subject: [PATCH] equals in in Type eingefuegt --- .../dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java | 6 ++++++ .../de/dhbwstuttgart/syntaxtree/type/GenericRefType.java | 6 ++++++ src/main/java/de/dhbwstuttgart/syntaxtree/type/RefType.java | 4 ++-- .../syntaxtree/type/RefTypeOrTPHOrWildcardOrGeneric.java | 1 + .../de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java | 6 ++++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java b/src/main/java/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java index 5f282e46..663bc9dc 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/type/ExtendsWildcardType.java @@ -53,4 +53,10 @@ public class ExtendsWildcardType extends WildcardType{ public void accept(ResultSetVisitor visitor) { visitor.visit(this); } + + @Override + public boolean equals(Object o) { + // TODO Auto-generated method stub + return false; + } } diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/type/GenericRefType.java b/src/main/java/de/dhbwstuttgart/syntaxtree/type/GenericRefType.java index a14813e7..4ca2ebd6 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/type/GenericRefType.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/type/GenericRefType.java @@ -32,5 +32,11 @@ public class GenericRefType extends RefTypeOrTPHOrWildcardOrGeneric public void accept(ResultSetVisitor visitor) { visitor.visit(this); } + + @Override + public boolean equals(Object o) { + // TODO Auto-generated method stub + return false; + } } diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefType.java b/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefType.java index 3e86275a..26f25fcf 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefType.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefType.java @@ -77,8 +77,8 @@ public class RefType extends RefTypeOrTPHOrWildcardOrGeneric if(obj instanceof RefType){ boolean ret = true; - if(!super.equals(obj)) - return false; + //if(!(super.equals(obj))) PL 2020-03-12 muss vll. einkommentiert werden + // return false; if(parameter==null || parameter.size()==0){ ret &= (((RefType)obj).getParaList()==null || ((RefType)obj).getParaList().size()==0); diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefTypeOrTPHOrWildcardOrGeneric.java b/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefTypeOrTPHOrWildcardOrGeneric.java index 61cfd060..22c8ab4b 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefTypeOrTPHOrWildcardOrGeneric.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/type/RefTypeOrTPHOrWildcardOrGeneric.java @@ -16,6 +16,7 @@ public abstract class RefTypeOrTPHOrWildcardOrGeneric extends SyntaxTreeNode{ public abstract A acceptTV(TypeVisitor visitor); public abstract void accept(ResultSetVisitor visitor); + @Override public abstract boolean equals(Object o); } diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java b/src/main/java/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java index 625fb01b..6a61b9cb 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/type/SuperWildcardType.java @@ -64,4 +64,10 @@ public class SuperWildcardType extends WildcardType{ public void accept(ResultSetVisitor visitor) { visitor.visit(this); } + + @Override + public boolean equals(Object o) { + // TODO Auto-generated method stub + return false; + } }