forked from JavaTX/JavaCompilerCore
SourceFile als Parent für Class.parserPostProcessing
This commit is contained in:
parent
f077829d30
commit
50916b5db2
@ -4,6 +4,7 @@ import de.dhbwstuttgart.bytecode.ClassGenerator;
|
|||||||
import de.dhbwstuttgart.syntaxtree.Class;
|
import de.dhbwstuttgart.syntaxtree.Class;
|
||||||
import de.dhbwstuttgart.syntaxtree.Constructor;
|
import de.dhbwstuttgart.syntaxtree.Constructor;
|
||||||
import de.dhbwstuttgart.syntaxtree.Method;
|
import de.dhbwstuttgart.syntaxtree.Method;
|
||||||
|
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||||
import de.dhbwstuttgart.syntaxtree.misc.DeclId;
|
import de.dhbwstuttgart.syntaxtree.misc.DeclId;
|
||||||
import de.dhbwstuttgart.syntaxtree.misc.UsedId;
|
import de.dhbwstuttgart.syntaxtree.misc.UsedId;
|
||||||
@ -47,16 +48,15 @@ public class ASTFactory {
|
|||||||
return new Constructor(method, superClass);
|
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
|
// TODO bytecode createClass
|
||||||
Class generatedClass = new Class(className, 0);
|
Class generatedClass = new Class(className, 0);
|
||||||
generatedClass.addField(ASTFactory.createEmptyConstructor(parent));
|
generatedClass.addField(ASTFactory.createEmptyConstructor(generatedClass));
|
||||||
|
|
||||||
if(superClass != null){
|
if(superClass != null){
|
||||||
generatedClass.superclassid = UsedId.createFromQualifiedName(superClass, 0);
|
generatedClass.superclassid = UsedId.createFromQualifiedName(superClass, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO bytecode parserPostProcressing ist die SuperKlasse oder eine Sourcefile?
|
|
||||||
generatedClass.parserPostProcessing(parent);
|
generatedClass.parserPostProcessing(parent);
|
||||||
|
|
||||||
return generatedClass;
|
return generatedClass;
|
||||||
|
Loading…
Reference in New Issue
Block a user