| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectemolib.util.IndentationFormatter
public class IndentationFormatter
The IndentationFormatter class performs a check-and-correct process of the indentation of the source files compiled in the input file.
The motivation behind this class is the standardisation of the code style. It checks (and corrects if a mistake is found) that the indentations follow a reasonable structure, i.e., after x spaces, x + 4 follow, if a curly brace ends the previous line, and so on.
After the process, each modified file will have a "file.indent" version to compare the effect of the indentation sets.
| Constructor Summary | |
|---|---|
| IndentationFormatter()Void constructor. | |
| Method Summary | |
|---|---|
|  java.lang.String | correctIndentation(java.lang.String line)Function to correct the indentation of a line of code. | 
| static void | main(java.lang.String[] args) | 
|  void | printSynopsis()Prints the synopsis. | 
|  void | resetIndent()Method to reset the indetation level counter. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public IndentationFormatter()
| Method Detail | 
|---|
public void resetIndent()
public void printSynopsis()
public java.lang.String correctIndentation(java.lang.String line)
line - The line of code.
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||