com.github.abrarsyed.jastyle
Class Main

java.lang.Object
  extended by com.github.abrarsyed.jastyle.Main

public class Main
extends java.lang.Object


Field Summary
static java.util.ArrayList<java.lang.String> errors
           
 
Constructor Summary
Main()
           
 
Method Summary
static java.util.ArrayList<java.io.File> collectFiles(java.io.File dir, java.io.FilenameFilter filter, boolean recurse)
           
static void main(java.lang.String[] cliArgs)
          Not supported options:

static java.util.ArrayList<java.lang.String> parseConsoleOptions(java.util.ArrayList<java.lang.String> args)
          This method parses the CommandLine options that have no bearing on the actual formatting, and will ONLY be parsed when coming from the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errors

public static java.util.ArrayList<java.lang.String> errors
Constructor Detail

Main

public Main()
Method Detail

main

public static void main(java.lang.String[] cliArgs)
                 throws java.io.IOException
Not supported options:

 --suffix=####
 --suffix=none / -n
 --exclude=####
 --errors-to-stdout / -X
 --preserve-date / -Z
 --verbose / -v
 --formatted / -Q
 --quiet / -q
 

Parameters:
cliArgs -
Throws:
java.io.IOException

parseConsoleOptions

public static java.util.ArrayList<java.lang.String> parseConsoleOptions(java.util.ArrayList<java.lang.String> args)
This method parses the CommandLine options that have no bearing on the actual formatting, and will ONLY be parsed when coming from the command line. The OptParser is reserved for only changing formatter options.

Parameters:
args - A list with all of the parsed options removed. leaving only things for the OptParser to go through.
Returns:
A list of FileNames to be parsed into actual paths

collectFiles

public static java.util.ArrayList<java.io.File> collectFiles(java.io.File dir,
                                                             java.io.FilenameFilter filter,
                                                             boolean recurse)
Parameters:
dir - Directory to search in
filter - Filter to apply to files. May be null to accept all the file names.
recurse - If subdirectopries should be recursed through or not.
Returns:
ArrayList of accepted files. Will never be null, only an empty list.