jAstyle is a 100% pure Java port of the GPL’d AStyle (http://astyle.sourceforge.net/). jAstyle is intented to be created as a library and not as a command line tool, so It does not support those options associated to standard output or console.
A simple to use and configurable command line tool which generates effective lines of code (eLoc) summaries for any text based programming language. By default, it currently supports the following file types: java, xml, sql, cs, css, js, and more.