Why is there a preprocessor?
While trying to run DeltaDoc, we found that there were several Java constructs that it was unable to handle, moreover, after running tests and contacting Raymond Buse, we found that the algorithm as presented in the paper was not handled correctly by the code as is. Therefore, in order to get DeltaDoc to run properly, we comment out constructs that DeltaDoc is unable to handle.
Source Code:
Bold=Runnable
Any Test*.java is another test file. Anything ending in Clean.java is a Java file that has been run through the script.
Line.java – This java file does most of the work in terms of dividing up a full line of Java code and parsing out/changing any lines of code that DeltaDoc is unequiped to handle.
JavaFileIO.java – Main running file for the preprocessing scripts. This file takes one command line argument, a Java source file. It then is parsed and cleaned out of any Java structures that DeltaDoc is unable to handle.
JavaConstructParser.java – Class that utilizes line.java and handles the parsing of the whole java file. It determines what a full Java line is (in case of multiple lines), and currently converts all lines claimed to be invalid by Line.java to block comments.
JavaFileFilter.java - This is implementation of the FileFilter class that obtains Java files.
Testing:
JavaConstructParserTest.java – Junit tests for JavaConstructParser.
TestLine.java – Junit test for line.java methods.
JavaFileFilterTest.java - Tests that the JavaFileFIlter class actually filters Java files.
TestClass.java and TestierClass.java - these files are intended to act as test source code files for the code modifiers.
Deprecated/Unused: Expression.java + StringExpression.java = framework classes in case I need to expand to do full conversions of expressions DeltaDoc cannot handle.
Pair.java – A simple class to represent pairs of values where one is bigger than the one, not currently in use.