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();