diff --git a/doc/PluginBau.pdf b/doc/PluginBau.pdf new file mode 100644 index 000000000..f6bab5ccc Binary files /dev/null and b/doc/PluginBau.pdf differ diff --git a/src/de/dhbwstuttgart/typedeployment/TypeInsert.java b/src/de/dhbwstuttgart/typedeployment/TypeInsert.java index 4756e49f6..665bd3803 100644 --- a/src/de/dhbwstuttgart/typedeployment/TypeInsert.java +++ b/src/de/dhbwstuttgart/typedeployment/TypeInsert.java @@ -33,4 +33,22 @@ public class TypeInsert { public String getInsertString(){ return point.getInsertString(); } + + /* PL 2018-06-18 + * Zwei TypeInsert's sind gleich, wenn ihre point's und ihre inserts' gleich sind + * eingefuegt damit man TypeReplaceMarker vergleichen kann + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object obj) { + if(!(obj instanceof TypeInsert)) { + return false; + } + else { + return ((TypeInsert)obj).point.equals(this.point); + + } + } + public String toString() { + return point.toString(); + } } diff --git a/src/de/dhbwstuttgart/typedeployment/TypeInsertPoint.java b/src/de/dhbwstuttgart/typedeployment/TypeInsertPoint.java index 816628e60..14c86b658 100644 --- a/src/de/dhbwstuttgart/typedeployment/TypeInsertPoint.java +++ b/src/de/dhbwstuttgart/typedeployment/TypeInsertPoint.java @@ -2,6 +2,8 @@ package de.dhbwstuttgart.typedeployment; import org.antlr.v4.runtime.Token; +import de.dhbwstuttgart.typeinference.unify.model.ReferenceType; + import java.util.List; import java.util.stream.Collectors; @@ -25,4 +27,23 @@ public class TypeInsertPoint { public String getInsertString() { return insertString; } + + /* PL 2018-06-19 + * Zwei TypeInsertPoint's sind gleich, wenn ihre point's gleich sind + * eingefuegt damit man TypeReplaceMarker vergleichen kann + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object obj) { + if(!(obj instanceof TypeInsertPoint)) { + return false; + } + else { + return ((TypeInsertPoint)obj).point.equals(this.point) && + ((TypeInsertPoint)obj).insertString.equals(this.insertString); + } + } + + public String toString() { + return point.toString() + " " + insertString.toString(); + } } diff --git a/target/JavaTXcompiler-0.1-jar-with-dependencies.jar b/target/JavaTXcompiler-0.1-jar-with-dependencies.jar index 67cf740b0..b0410f982 100644 Binary files a/target/JavaTXcompiler-0.1-jar-with-dependencies.jar and b/target/JavaTXcompiler-0.1-jar-with-dependencies.jar differ diff --git a/test/bytecode/javFiles/OL.jav b/test/bytecode/javFiles/OL.jav index 6489d5721..5adf291cd 100644 --- a/test/bytecode/javFiles/OL.jav +++ b/test/bytecode/javFiles/OL.jav @@ -10,9 +10,9 @@ class OL { } -class OLMain { +class OLMain { - main(x) { + java.lang.Integer main(x) { var ol; ol = new OL(); return ol.m(x); diff --git a/test/typeinference/UnifyTest.java b/test/typeinference/UnifyTest.java index 995890ab6..6b2eeca29 100644 --- a/test/typeinference/UnifyTest.java +++ b/test/typeinference/UnifyTest.java @@ -74,15 +74,15 @@ public class UnifyTest { } */ - /* - + +/* @Test public void matrix() throws IOException, ClassNotFoundException { execute(new File(rootDirectory+"Matrix.jav")); //JavaTXCompiler compiler = new JavaTXCompiler(new File(rootDirectory+"Matrix.jav")); //compiler.generateBytecode(); } - */ +*/ /* @Test