From 0c9c8ef321ae3b01f713a6514158c0ad80a4d767 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Sun, 29 Dec 2019 19:42:40 +0100 Subject: [PATCH] modified: ../../../../../../../../../main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java Bug 182 fixed modified: ../../../mathStrucVector.jav modified: ../../../vectorAdd.jav kleine Aenderungen --- .../de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java | 2 +- .../javFiles/packageTest/de/test/mathStrucVector.jav | 8 ++++---- .../resources/javFiles/packageTest/de/test/vectorAdd.jav | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java index 826184a2..a682717c 100644 --- a/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java +++ b/src/main/java/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java @@ -70,7 +70,7 @@ public class ASTFactory { } private static Field createField(java.lang.reflect.Field field, JavaClassName jreClass) { - return new Field(field.getName(), createType(field.getType()), field.getModifiers(), new NullToken()); + return new Field(field.getName(), createType(field.getGenericType()), field.getModifiers(), new NullToken()); } //private static RefType createType(Class classType) { diff --git a/src/test/resources/javFiles/packageTest/de/test/mathStrucVector.jav b/src/test/resources/javFiles/packageTest/de/test/mathStrucVector.jav index b92b1b98..fe6d6055 100644 --- a/src/test/resources/javFiles/packageTest/de/test/mathStrucVector.jav +++ b/src/test/resources/javFiles/packageTest/de/test/mathStrucVector.jav @@ -8,9 +8,9 @@ import de.test.mathStruc; import de.test.vectorAdd; -class mathStrucVector { +public class mathStrucVector { - main() { + public main() { Vector v1 = new Vector(); v1.addElement(2); v1.addElement(2); @@ -25,9 +25,9 @@ class mathStrucVector { var ms2; ms2 = new mathStruc<>(v2); var ms3; - /* + ms3 = ms.innerOp.apply(va.add).apply(ms2); return ms3; - */ + } } diff --git a/src/test/resources/javFiles/packageTest/de/test/vectorAdd.jav b/src/test/resources/javFiles/packageTest/de/test/vectorAdd.jav index d61ab841..727a83a9 100644 --- a/src/test/resources/javFiles/packageTest/de/test/vectorAdd.jav +++ b/src/test/resources/javFiles/packageTest/de/test/vectorAdd.jav @@ -5,7 +5,7 @@ import java.lang.Integer; import java.lang.Boolean; -class vectorAdd { +public class vectorAdd { public add = (v1, v2) -> { var ret = new Vector();