org.infozone.tools.janalyzer
Class JavaCodeAnalyzer
java.lang.Object
|
+--org.infozone.tools.janalyzer.JavaCodeAnalyzer
- public final class JavaCodeAnalyzer
- extends java.lang.Object
This class parses a existing JAVA class and format's the source code
after the Code Conventions from Sun and therefore from the Apache Software Foundation.
It uses the Syntax tree from the DynamicJava SourceCodeParser and transform each node of
this tree back into lines of code.
All output is handled by the JavaCodeOutput class. Also comments only handled by the Output
class, because they don't exist in a syntax tree.
JCC in the comment stands for
Coding Conventions.
TODO:
- forgotten expressions they not used in the prowler package
- indentation in nested conditional operator statements
- comments after the last expression in a method and the trailing } are deleted!!!
- split level in binary expressions
- label:
- more documentation
- quality checking such:
- constants as ABC_DEF
- JavaCodeMetricManager
- metric'S
- method counting and so on
Problems:
- trailling comments can't be inserted after the automatically wrapped lines, so
they are inserted before the statements
- At this moment only the trailling comment on the same line as the statement starts
is checked
- Version:
- $Revision: 1.7 $ $Date: 2000/10/27 19:09:20 $
- Author:
- SMB
Constructor Summary |
JavaCodeAnalyzer(java.lang.String filenameIn,
java.lang.String filenameOut,
java.lang.String lineLength)
|
Method Summary |
void |
addToOut(java.lang.String add)
Adds the specified string to the global variable LineOut |
java.lang.String |
getOut()
|
static void |
main(java.lang.String[] argv)
|
static void |
printHelp()
|
void |
printOut()
|
void |
printOut(java.lang.String add)
Adds the specified String and invoke the println method in the Outputclass.
|
void |
setToOut(java.lang.String string)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaCodeAnalyzer
public JavaCodeAnalyzer(java.lang.String filenameIn,
java.lang.String filenameOut,
java.lang.String lineLength)
addToOut
public void addToOut(java.lang.String add)
- Adds the specified string to the global variable LineOut
setToOut
public void setToOut(java.lang.String string)
printOut
public void printOut()
printOut
public void printOut(java.lang.String add)
- Adds the specified String and invoke the println method in the Outputclass.
Set the lineOut class member to ""
getOut
public java.lang.String getOut()
printHelp
public static void printHelp()
main
public static void main(java.lang.String[] argv)