Jalopy is packed with features. It does not stop with mere code formatting, but Jalopy actively helps you maintain your code. Comply with naming conventions, arrange methods, generate and sanitize Javadoc comments, insert missing or remove obsolete braces, add override annotations, serial version UIDs, optimize import declarations, remove redundant modifiers... you name it. And best of it all, Jalopy tightly integrates with all major Java IDE applications like Eclipse, IDEA, NetBeans and build tools like Ant and Maven.
Supports all flavors of Java up to Java SE 7.0. The compliance level is configurable
Graphical configuration dialog to customize the settings with live-preview and online help. Jalopy provides more than 500 options to let you exactly achieve the style you like
Settings profiles which support automatic switching between different configuration in IDE's
Nested profiles to easily create similar conventions that share common elements and automatically adapt
Distributed settings support. It is easily possible to share code conventions across multiple developers/teams
Configurable logging output that might be written to disk (Plain Text, XML and HTML)
Several IDE Plug-ins that provide seamless integration with popular Java applications (current set includes Ant, Eclipse and derived products like the IBM Rational product line, IntelliJ IDEA, JBuilder, JDeveloper, jEdit, Maven and NetBeans/Sun ONE Studio)
Apply formatting automatically whenever a dirty file is saved
Limit formatting to Javadoc comments only
Command-line interface that can used to run the formatter standalone or for integration into other software
Integrated history to avoid unnecessary formatting—decrease execution time and limit spurious check-ins
Multi-processor support to speed up processing on capable systems
Sort declarations. Sorting may be limited to the different declaration types only or happen within all elements of a type as well. The sorting criteria is fully configurable
Sort modifiers in your preferred order
Insert separation comments between code sections upon sorting. Their style is configurable to match your preference
Ensure headers and/or footers are present in every source file. Headers and footers may get inserted on each run, but existing SCM tags can still be kept to ensure that files are not unnecessarily modified during formatting
Brace styles. Jalopy provides several pre-configured brace styles (C, Sun, GNU), but the handling of braces is fully user-configurable
Auto-insertion of braces. Missing braces might be inserted for if/else, for, while, do/while and switch statements
Auto-removal of braces. Obsolete braces might be removed for if/else, for, while, do/while statements and arbitrary blocks
Compact braces to use less vertical space when possible. Configurable for different brace statements
Comment insertion after closing braces to identify matching braces. Configurable for the different brace statements and with line threshold
Unique Javadoc formatting capabilities. Formatting provides configurable wrapping behavior, tag sorting, tag aligning, tag grouping. XDoclet tags are fully supported. HTML tags can be indented and valid HTML optionally enforced
Auto-generation of missing Javadoc comments. Insertion is selectively configurable for the different declaration types and access levels. Templates are provided to configure generation output (with variable interpolation). Getter/Setter methods may be treated specially
Auto-correction to ensure validity. Insertion of missing tags, removal of invalid/obsolete tags. Correction of misspelled tag names
Sort import declarations. The order is fully configurable. Additionally, imports may be grouped together and static imports may be grouped separately
Optimize imports. Remove obsolete or duplicate imports and expand on-demand imports or collapse single-type imports
Special pragma comments to control formatting on the source level (e.g. to prohibit formatting for certain pieces of code)
Auto-insertion of parentheses around expressions to make operator precedence obvious
Auto-insertion of a missing @Override annotations
Auto-insertion of a serial version UID for serializable classes
Removal of redundant modifiers to enforce concise
Numbered backups for the paranoid
Automatic line wrapping with configurable line length
Configurable placement of operators
Keep existing line breaks for list parameters, call arguments, operators and array elements
Force wrapping for certain elements to ensure a certain style under all conditions
Indicate your wrapping preference for elements that exceed the maximal line length
Avoid wrapping for certain elements under all conditions
Extremely configurable white space behavior for all code elements like operators, parentheses, braces and brackets
Several indentation strategies. Whether you prefer a dense layout or favor the more excessive use of white space to enhance readability—Jalopy has you covered
Powerful alignment capabilities to nicely lay out variables and identifiers, method calls, parentheses and comments
Continuation indentation for expressions within blocks or all operators to increase the indentation level upon wrapping in order to let the element stand out
Control what elements should be indented
Configurable tab handling. Use tabs for all indentation or only up to the current brace level
Control the number of blank lines before and after code elements
Keep blank lines up to a given limit or ignore them altogether
Configurable chunk handling to control what statements should be treated as code sections
Format comments to ensure a specific style
Wrap comments to keep between in between the maximal line length limit. Wrapping may be performed for individual lines only or on the comment as a whole
Remove comments matching certain criteria—either a specific type or regular expression
Perform code checking either during formatting or standalone to find certain code weaknesses and ensure good coding practise
Ensure custom naming conventions configurable via regular expressions