- addAdd(Glob, String, File, Main.AddConditions) - Method in class de.unkrig.zz.patch.Main
-
To all directories and archives that match glob, add a member/entry name, and fill it
from contents-file.
- addAddition(Predicate<? super String>, String, File) - Method in class de.unkrig.zz.patch.Patch
-
- AddConditions() - Constructor for class de.unkrig.zz.patch.Main.AddConditions
-
- addConfigured(ResourceCollection) - Method in class de.unkrig.zz.patch.AntTask
-
Adds another set of resources (<fileset>
, <path>
, ...) that will be patched.
- addConfiguredAdd(AntTask.AddElement) - Method in class de.unkrig.zz.patch.AntTask
-
Configures that an entry be added to all archives that match the path pattern.
- addConfiguredPatch(AntTask.PatchElement) - Method in class de.unkrig.zz.patch.AntTask
-
Configures a transformation by applying a DIFF document.
- addConfiguredRegex(AntTask.TextElement) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The regular expression the defines a match.
- addConfiguredRemove(AntTask.Element_path) - Method in class de.unkrig.zz.patch.AntTask
-
Configures that files/entries that match the name
be deleted/removed.
- addConfiguredRename(AntTask.Element_path2) - Method in class de.unkrig.zz.patch.AntTask
-
Configures that files/entries that match the name
be renamed.
- addConfiguredReplacement(AntTask.TextElement) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The "replacement string" that determines how each match is replaced.
- addConfiguredSubstitute(AntTask.SubstituteElement) - Method in class de.unkrig.zz.patch.AntTask
-
- addConfiguredUpdate(AntTask.Element_path) - Method in class de.unkrig.zz.patch.AntTask
-
Configures that the contents of files/entries that match the name
glob pattern be replaced with the
contents of the given "update file".
- addContentsTransformation(Predicate<? super String>, ContentsTransformer) - Method in class de.unkrig.zz.patch.Patch
-
For each file and ZIP entry, the first matching Patch.ContentsTransformation
takes
effect.
- AddElement() - Constructor for class de.unkrig.zz.patch.AntTask.AddElement
-
- addHunkListener(Consumer<DiffParser.Hunk>) - Method in class de.unkrig.zz.patch.PatchTextTransformer
-
- addIff(String) - Method in class de.unkrig.zz.patch.Main.Conditions
-
Execute the preceding file transformation only iff expression evaluates to true.
- addLog(String) - Static method in class de.unkrig.zz.patch.Main
-
Add logging at level FINE
on logger "de.unkrig
" to STDERR using the "FormatFormatter
"
and "SIMPLE
" format, or the given arguments, which are all optional.
- addPatch(Glob, File, Main.PatchConditions) - Method in class de.unkrig.zz.patch.Main
-
Apply patch-file to all files/archive entries that match glob (see below).
- addRemoval(Predicate<? super String>) - Method in class de.unkrig.zz.patch.Patch
-
Configures that files and ZIP entries who's pathes match the removal
will be removed.
- addRemove(Glob, Main.RemoveConditions) - Method in class de.unkrig.zz.patch.Main
-
Remove all files/archive entries that match glob (see below).
- addRename(Glob, Main.RenameConditions) - Method in class de.unkrig.zz.patch.Main
-
Rename files/archive entries according to glob (see below), e.g.
- addRenaming(Glob) - Method in class de.unkrig.zz.patch.Patch
-
Configures that files and ZIP entries which match the removal
will be renamed.
- addReplacementListener(Function<String, String>) - Method in class de.unkrig.zz.patch.SubstitutionContentsTransformer
-
The given replacementListener will be FunctionWhichThrows.call(Object)
ed for each replacement, and has
the chance to modify the replacement string.
- addReport(String) - Method in class de.unkrig.zz.patch.Main.Conditions
-
Evaluate and print the expression each time the preceding file transformation is executed, e.g.
- addSubstitute(Glob, Pattern, String, Main.SubstituteConditions) - Method in class de.unkrig.zz.patch.Main
-
Replace all matches of pattern in files/archive entries that match glob (see below) with
the replacement string, which supports:
"$0
", "$1
", "$2
", etc. expand to the captured groups of the match.
- addText(String) - Method in class de.unkrig.zz.patch.AntTask.TextElement
-
See ANT documentation.
- addUpdate(Glob, Main.UpdateConditions) - Method in class de.unkrig.zz.patch.Main
-
Replace the contents of files/archive entries that match glob (see below) with that of the
update-file.
- addUpdateListener(Consumer<String>) - Method in class de.unkrig.zz.patch.UpdateContentsTransformer
-
The given updateListener will be called for each update.
- ALWAYS - Static variable in interface de.unkrig.zz.patch.PatchTextTransformer.Condition
-
Constantly evaluates to true
.
- ALWAYS - Static variable in interface de.unkrig.zz.patch.SubstitutionContentsTransformer.Condition
-
- AntFilter - Class in de.unkrig.zz.patch
-
An ANT filter which modifies the data by applying a patch file.
- AntFilter() - Constructor for class de.unkrig.zz.patch.AntFilter
-
- AntTask - Class in de.unkrig.zz.patch
-
Adds, removes, renames and/or changes the contents of files and archives.
- AntTask() - Constructor for class de.unkrig.zz.patch.AntTask
-
- AntTask.AddElement - Class in de.unkrig.zz.patch
-
Configures an "add" operation, i.e. an entry that is added to an archive.
- AntTask.Element_path - Class in de.unkrig.zz.patch
-
A predicate that determines whether a path is applicable by matching it with a glob.
- AntTask.Element_path2 - Class in de.unkrig.zz.patch
-
A glob that implements renaming of a path.
- AntTask.PatchElement - Class in de.unkrig.zz.patch
-
Configures a patch, i.e. the transformation of contents by applying a "DIFF document" to the input.
- AntTask.SubstituteElement - Class in de.unkrig.zz.patch
-
Configures a substitution, i.e. the transformation of contents by finding pattern matches and replacing them
with a replacement string.
- AntTask.TextElement - Class in de.unkrig.zz.patch
-
- assertCount(int) - Method in class de.unkrig.zz.patch.Main.Conditions
-
Assert that exactly n updates/substitution replacements/patch hunks/removals/renamings/additions
were executed; otherwise exit with status 2.
- Main - Class in de.unkrig.zz.patch
-
Implementation of a PATCH command line utility with the following features:
Transforms regular files, directory trees, and optionally compressed files and entries in archive files (also in
nested ones)
Reads patch files in NORMAL, CONTEXT and UNIFIED diff format
Can replace the contents of files from "update files"
Can do search-and-replace within files (SED like)
Can transform out-of-place or in-place
Optionally keeps copies of the original files
Can remove files
Can rename files
- Main() - Constructor for class de.unkrig.zz.patch.Main
-
- main(String[]) - Static method in class de.unkrig.zz.patch.Main
-
Usage
zzpatch
[ option ... ]
Transforms STDIN to STDOUT.
- Main.AddConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--add" action.
- Main.Conditions - Class in de.unkrig.zz.patch
-
The base class of the various "conditions" command line options beans.
- Main.ExitException - Exception in de.unkrig.zz.patch
-
Dictates that the command line tool should
Printers.info(String)
the exception's message, and then
System.exit(int)
with the given status.
- Main.PatchConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--patch" action.
- Main.RemoveConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--remove" action.
- Main.RenameConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--rename" action.
- Main.SubstituteConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--substitute" action.
- Main.UpdateConditions - Class in de.unkrig.zz.patch
-
This bean represents the various "conditions" command line options of the "--update" action.
- main3(String[]) - Method in class de.unkrig.zz.patch.Main
-
- mode - Variable in class de.unkrig.zz.patch.diff.DiffParser.LineChange
-
The type of the diff line, specified by the character in column 1
- set7zInputFilePassword(String) - Method in class de.unkrig.zz.patch.Main
-
Password to decrypt password-protected 7ZIP input files.
- setCondition(String) - Method in class de.unkrig.zz.patch.AntFilter
-
Configures a condition that must evaluate to true
before each DIFF hunk is applied.
- setCondition(String) - Method in class de.unkrig.zz.patch.AntTask.PatchElement
-
Configures a condition that must evaluate to true
before each DIFF hunk is applied.
- setCondition(String) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
Configures a condition that must evaluate to true
before each occurrence is replaced.
- setContents(File) - Method in class de.unkrig.zz.patch.AntTask.AddElement
-
The file that contains the contents for the new archive entry.
- setDebug() - Method in class de.unkrig.zz.patch.Main
-
Print verbose and debug messages.
- setDirectoryMemberNameComparator(Comparator<Object>) - Method in class de.unkrig.zz.patch.Patch
-
- setEncoding(Charset) - Method in class de.unkrig.zz.patch.Main
-
All of "--patch-file-encoding", "--input-encoding" and "--output-encoding".
- setEntryName(String) - Method in class de.unkrig.zz.patch.AntTask.AddElement
-
The name of the archive entry to add (may contain slashes).
- setExceptionHandler(ExceptionHandler<IOException>) - Method in class de.unkrig.zz.patch.Patch
-
Sets the exception handler.
- setFile(File) - Method in class de.unkrig.zz.patch.AntTask
-
Configures a file to be transformed; either in-place, or, iff tofile=...
or todir=...
is
configured, out-of-place.
- setInitialBufferCapacity(int) - Method in class de.unkrig.zz.patch.SubstitutionContentsTransformer
-
- setInputEncoding(String) - Method in class de.unkrig.zz.patch.AntTask.PatchElement
-
The encoding of the transformation input; defaults to the platform default encoding.
- setInputEncoding(String) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The encoding of the transformation input; defaults to the platform default encoding.
- setInputEncoding(Charset) - Method in class de.unkrig.zz.patch.Main
-
Encoding of input files (only relevant for "--substitute
" and "--patch
"); the default is "${file.encoding}
".
- setKeepOriginals(boolean) - Method in class de.unkrig.zz.patch.AntTask
-
Whether to keep backup copies of files/entries that are modified or removed, renamed to ".
- setKeepOriginals(boolean) - Method in class de.unkrig.zz.patch.Patch
-
Whether to keep backup copies of files/entries that are modified or removed.
- setLookInto(String) - Method in class de.unkrig.zz.patch.AntTask
-
Look into compressed and archive contents if the format and the path match the given glob.
- setLookIntoFormat(Predicate<? super String>) - Method in class de.unkrig.zz.patch.Patch
-
For any archive contents, instead of the 'raw' contents, the contents of the archive entries are
processed iff the string
"
archive-format:
archive-path"
matches the given predicate.
- setMode(FileTransformer.Mode) - Method in class de.unkrig.zz.patch.AntTask
-
Configures how the files are processed.
- setName(String) - Method in class de.unkrig.zz.patch.AntTask.Element_path
-
- setNowarn() - Method in class de.unkrig.zz.patch.Main
-
Suppress all messages except errors.
- setOutputEncoding(String) - Method in class de.unkrig.zz.patch.AntTask.PatchElement
-
The encoding of the transformation output; defaults to the platform default encoding.
- setOutputEncoding(String) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The encoding of the transformation output; defaults to the platform default encoding.
- setOutputEncoding(Charset) - Method in class de.unkrig.zz.patch.Main
-
Encoding of output files (only relevant for "--substitute
" and "--patch
"); the default is "${file.encoding}
".
- setPassword(String) - Method in class de.unkrig.zz.patch.Main
-
All of the above.
- setPatchFile(File) - Method in class de.unkrig.zz.patch.AntFilter
-
The file that contains the DIFF document that is to be applied to the input.
- setPatchFile(File) - Method in class de.unkrig.zz.patch.AntTask.PatchElement
-
The file that contains the DIFF document.
- setPatchFileEncoding(String) - Method in class de.unkrig.zz.patch.AntFilter
-
The encoding of the patch file; defaults to the platform default encoding.
- setPatchFileEncoding(String) - Method in class de.unkrig.zz.patch.AntTask.PatchElement
-
The encoding of the patch file; defaults to the platform default encoding.
- setPatchFileEncoding(Charset) - Method in class de.unkrig.zz.patch.Main
-
Encoding of patch files (only relevant for "--patch
"); the default is "${file.encoding}
".
- setPath(String) - Method in class de.unkrig.zz.patch.AntTask.Element_path
-
The glob to match the pathes against.
- setQuiet() - Method in class de.unkrig.zz.patch.Main
-
Suppress normal output.
- setRegex(String) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The regular expression the defines a match.
- setReplacement(String) - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
-
The "replacement" that determines how each match is replaced.
- setSaveSpace(boolean) - Method in class de.unkrig.zz.patch.Patch
-
Whether to transfor directory trees file-by-file (true
, or to create a temporary copy of the entire
directory tree (false
).
- setTodir(File) - Method in class de.unkrig.zz.patch.AntTask
-
Configures the directory for the output file created from file=...
and/or the resource collection
subelements.
- setTofile(File) - Method in class de.unkrig.zz.patch.AntTask
-
Configures the output file for the input file specified through file=...
.
- setVerbose() - Method in class de.unkrig.zz.patch.Main
-
Print verbose messages.
- setZipInputFilePassword(String) - Method in class de.unkrig.zz.patch.Main
-
Password to decrypt password-protected zip archive entries.
- setZipOutputEntryCompressionLevel(CompressionLevel) - Method in class de.unkrig.zz.patch.Main
-
Compression level of zip archive entries.
- setZipOutputFileEncryptionMethod(EncryptionMethod) - Method in class de.unkrig.zz.patch.Main
-
Method to encrypt password-protected zip archive entries.
- setZipOutputFilePassword(String) - Method in class de.unkrig.zz.patch.Main
-
Password to encrypt password-protected zip archive entries (sets encryption method to ZIP_STANDARD).
- SubstituteConditions() - Constructor for class de.unkrig.zz.patch.Main.SubstituteConditions
-
- SubstituteElement() - Constructor for class de.unkrig.zz.patch.AntTask.SubstituteElement
-
- SubstitutionContentsTransformer - Class in de.unkrig.zz.patch
-
A ContentsTransformer
that replaces regex matches.
- SubstitutionContentsTransformer(Charset, Charset, Pattern, String, SubstitutionContentsTransformer.Condition) - Constructor for class de.unkrig.zz.patch.SubstitutionContentsTransformer
-
Replaces all matches of the regex according to the replacementMode and the
replacement.
- SubstitutionContentsTransformer(Charset, Charset, Pattern, FunctionWhichThrows<MatchResult, String, ? extends RuntimeException>, SubstitutionContentsTransformer.Condition) - Constructor for class de.unkrig.zz.patch.SubstitutionContentsTransformer
-
Replaces all matches of the regex according to the replacementString.
- SubstitutionContentsTransformer.Condition - Interface in de.unkrig.zz.patch
-