diff --git a/src/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java b/src/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java index db782e916..f39e69685 100644 --- a/src/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java +++ b/src/de/dhbwstuttgart/syntaxtree/factory/ASTFactory.java @@ -4,6 +4,7 @@ import de.dhbwstuttgart.bytecode.ClassGenerator; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.Constructor; import de.dhbwstuttgart.syntaxtree.Method; +import de.dhbwstuttgart.syntaxtree.SourceFile; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.misc.DeclId; import de.dhbwstuttgart.syntaxtree.misc.UsedId; @@ -47,16 +48,15 @@ public class ASTFactory { return new Constructor(method, superClass); } - public static Class createClass(String className, String superClass, Class parent) { + public static Class createClass(String className, String superClass, SourceFile parent) { // TODO bytecode createClass Class generatedClass = new Class(className, 0); - generatedClass.addField(ASTFactory.createEmptyConstructor(parent)); + generatedClass.addField(ASTFactory.createEmptyConstructor(generatedClass)); if(superClass != null){ generatedClass.superclassid = UsedId.createFromQualifiedName(superClass, 0); } - //TODO bytecode parserPostProcressing ist die SuperKlasse oder eine Sourcefile? generatedClass.parserPostProcessing(parent); return generatedClass;