Commit 7e591a76 authored by Joachim Müssig's avatar Joachim Müssig

clear up code, javadoc

parent 9fddb767
......@@ -108,6 +108,11 @@ public class CopyKeYCompatibleListener extends Java8BaseListener implements Java
return false;
}
/**
* check if the given import String is KeY compatible
* @param importStmt import statement as String
* @return boolean, True if KeY compatible
*/
public boolean isImportKeyCompatible(String importStmt) {
int firstDot = importStmt.indexOf(AutomationHelper.DOT);
String mainPackageOfImportStmt = importStmt.substring(0, firstDot);
......@@ -268,7 +273,7 @@ public class CopyKeYCompatibleListener extends Java8BaseListener implements Java
return generated;
}
public String transformCode(String classCode, Set<StaticCGJavaMethod> neededMethods) { //TODO why does this method remove global fields which are needed
public String transformCode(String classCode, Set<StaticCGJavaMethod> neededMethods) {
currentlyGenerated = new StringBuilder();
classCodeAsLines = new ArrayList<>();
importStatements = new ArrayList<>();
......@@ -277,7 +282,7 @@ public class CopyKeYCompatibleListener extends Java8BaseListener implements Java
Java8Lexer java8Lexer = new Java8Lexer(new ANTLRInputStream(classCode));
Java8Parser java8Parser = new Java8Parser(new CommonTokenStream(java8Lexer));
ParseTreeWalker walker = new ParseTreeWalker();
walker.walk(this, java8Parser.compilationUnit()); //TODO inspect this method. Why does it filter the needed fields in IFLoop2
walker.walk(this, java8Parser.compilationUnit());
return currentlyGenerated.toString();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment