forked from JavaTX/JavaCompilerCore
System.out.println Statement schein halbwegs zu funktionieren ^^
This commit is contained in:
parent
4b21f03a5a
commit
b251a646ca
@ -37,6 +37,9 @@ public class ASTFactory {
|
|||||||
methoden.add(createMethod(method, jreClass));
|
methoden.add(createMethod(method, jreClass));
|
||||||
}
|
}
|
||||||
List<Field> felder = new ArrayList<>();
|
List<Field> felder = new ArrayList<>();
|
||||||
|
for(java.lang.reflect.Field field : jreClass.getFields()){
|
||||||
|
felder.add(createField(field, name));
|
||||||
|
}
|
||||||
int modifier = jreClass.getModifiers();
|
int modifier = jreClass.getModifiers();
|
||||||
boolean isInterface = jreClass.isInterface();
|
boolean isInterface = jreClass.isInterface();
|
||||||
java.lang.Class superjreClass = jreClass.getSuperclass();
|
java.lang.Class superjreClass = jreClass.getSuperclass();
|
||||||
@ -57,7 +60,11 @@ public class ASTFactory {
|
|||||||
return new ClassOrInterface(modifier, name, felder, methoden, konstruktoren, genericDeclarationList, superClass,isInterface, implementedInterfaces, offset);
|
return new ClassOrInterface(modifier, name, felder, methoden, konstruktoren, genericDeclarationList, superClass,isInterface, implementedInterfaces, offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static de.dhbwstuttgart.syntaxtree.Constructor createConstructor(Constructor constructor, Class inClass) {
|
private static Field createField(java.lang.reflect.Field field, JavaClassName jreClass) {
|
||||||
|
return new Field(field.getName(), createType(field.getType(), jreClass, null), field.getModifiers(), new NullToken());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static de.dhbwstuttgart.syntaxtree.Constructor createConstructor(Constructor constructor, Class inClass) {
|
||||||
String name = constructor.getName();
|
String name = constructor.getName();
|
||||||
RefTypeOrTPHOrWildcardOrGeneric returnType = createType(inClass, new JavaClassName(inClass.getName()), name);
|
RefTypeOrTPHOrWildcardOrGeneric returnType = createType(inClass, new JavaClassName(inClass.getName()), name);
|
||||||
Parameter[] jreParams = constructor.getParameters();
|
Parameter[] jreParams = constructor.getParameters();
|
||||||
|
@ -191,7 +191,7 @@ public class TYPEStmt implements StatementVisitor{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void visit(StaticClassName staticClassName) {
|
public void visit(StaticClassName staticClassName) {
|
||||||
throw new NotImplementedException();
|
//Hier entstehen keine Constraints
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -34,7 +34,8 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
|
|||||||
@Test
|
@Test
|
||||||
public void test() throws IOException, java.lang.ClassNotFoundException {
|
public void test() throws IOException, java.lang.ClassNotFoundException {
|
||||||
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
//filesToTest.add(new File(rootDirectory+"Faculty.jav"));
|
||||||
filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
//filesToTest.add(new File(rootDirectory+"mathStruc.jav"));
|
||||||
|
filesToTest.add(new File(rootDirectory+"test.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda2.jav"));
|
||||||
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));
|
||||||
|
Loading…
Reference in New Issue
Block a user