System.out.println Statement schein halbwegs zu funktionieren ^^

This commit is contained in:
JanUlrich 2017-08-30 15:29:34 +02:00
parent 4b21f03a5a
commit b251a646ca
3 changed files with 11 additions and 3 deletions

View File

@ -37,6 +37,9 @@ public class ASTFactory {
methoden.add(createMethod(method, jreClass));
}
List<Field> felder = new ArrayList<>();
for(java.lang.reflect.Field field : jreClass.getFields()){
felder.add(createField(field, name));
}
int modifier = jreClass.getModifiers();
boolean isInterface = jreClass.isInterface();
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);
}
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();
RefTypeOrTPHOrWildcardOrGeneric returnType = createType(inClass, new JavaClassName(inClass.getName()), name);
Parameter[] jreParams = constructor.getParameters();

View File

@ -191,7 +191,7 @@ public class TYPEStmt implements StatementVisitor{
@Override
public void visit(StaticClassName staticClassName) {
throw new NotImplementedException();
//Hier entstehen keine Constraints
}
@Override

View File

@ -34,7 +34,8 @@ public class JavaTXCompilerTest extends JavaTXCompiler {
@Test
public void test() throws IOException, java.lang.ClassNotFoundException {
//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+"Lambda2.jav"));
//filesToTest.add(new File(rootDirectory+"Lambda3.jav"));