public class Analyzer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Analyzer.Option
Options, which have an influence, how directories are scanned and the
output gets formatted.
|
Modifier and Type | Field and Description |
---|---|
static char |
default_format_sep
the default field separator for parsable output
|
Constructor and Description |
---|
Analyzer()
Initialize with default values.
|
Analyzer(char separator,
EnumSet<Analyzer.Option> options,
PathFilter excludes)
Create a new analyzer instance with the given parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
compare(java.nio.file.Path left,
java.nio.file.Path right,
PrintStream out)
Compare the given directories side by side and print results to the given
output stream.
|
PathFilter |
getFilter()
Get the current filter in use.
|
String |
getFormat()
Get the format string used for diff printouts.
|
Worker |
getWorker(java.nio.file.Path left,
java.nio.file.Path right,
PrintStream out)
Get the worker for compare the given directories side by side, which
prints the results to the given output stream.
|
boolean |
isEnabled(Analyzer.Option option)
Check, whether the given option is set for this instance.
|
public static char default_format_sep
public Analyzer()
public Analyzer(char separator, EnumSet<Analyzer.Option> options, PathFilter excludes)
separator
- field separator to use for parsable output.options
- options to use for scanning and output formatting.
Ignored if null
excludes
- filter to use to determine dir entries, which should
be ignored. If null
nothing gets ignored.public boolean isEnabled(Analyzer.Option option)
option
- option to check.true
if enabled.public String getFormat()
public PathFilter getFilter()
public void compare(java.nio.file.Path left, java.nio.file.Path right, PrintStream out) throws IOException
left
- base directory to use for diffingright
- second directory to use for diffingout
- where to print results. Will be not closed, when finished.IOException
public Worker getWorker(java.nio.file.Path left, java.nio.file.Path right, PrintStream out) throws IOException
left
- base directory to use for diffingright
- second directory to use for diffingout
- where to print results. Will be not closed, when finished.IOException
Created by Jens Elkner