private static void printHelp ( final Options options ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "java -jar icegem-cache-utils-<version>.jar [options] <" ) ; Command [ ] commands = Command . values ( ) ; for ( int i = 0 ; i < commands . length ; i ++ ) { sb . append ( commands [ i ] . getName ( ) ) ; if ( i < ( commands . length - 1 ) ) { sb . append ( " | " ) ; } } sb . append ( "> [command_specific_options]" ) ; HelpFormatter formatter = new HelpFormatter ( ) ; formatter . printHelp ( sb . toString ( ) , options ) ; Utils . exitWithFailure ( ) ; }
Prints help if requested .