Skip navigation links
zz-patch 1.3.11-SNAPSHOT
A C D E F G H I K L M N P R S T U V 

A

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
Configures that lines that match the AntTask.SubstituteElement.setRegex(String) within files/entries that match the AntTask.Element_path.setPath(String) glob pattern be replaced with the AntTask.SubstituteElement.setReplacement(String) string.
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.

C

chain(Reader) - Method in class de.unkrig.zz.patch.AntFilter
 
check() - Method in class de.unkrig.zz.patch.Main
Do not create or modify any files; exit with status 1 if this is an in-place transformation, and at least one of the files would be changed.
checkBeforeTransformation() - Method in class de.unkrig.zz.patch.Main
Before modifying a file, check whether the change is redundant, i.e. yields an identical result.
Conditions(String...) - Constructor for class de.unkrig.zz.patch.Main.Conditions
 
contentsTransformer() - Method in class de.unkrig.zz.patch.Patch
 

D

de.unkrig.zz.patch - package de.unkrig.zz.patch
This package contains The implementation of the ZZDIFF command line utility and ANT task.
de.unkrig.zz.patch.diff - package de.unkrig.zz.patch.diff
This package contains various helpers for parsing the various DIFF document formats.
Differential(String, String, List<DiffParser.Hunk>) - Constructor for class de.unkrig.zz.patch.diff.DiffParser.Differential
 
DiffException - Exception in de.unkrig.zz.patch.diff
Indication that a problem occurred when parsing or applying a DIFF document.
DiffException(String) - Constructor for exception de.unkrig.zz.patch.diff.DiffException
 
DiffParser - Class in de.unkrig.zz.patch.diff
Parses a character sequence in various DIFF formats.
DiffParser.Differential - Class in de.unkrig.zz.patch.diff
A description of the differences of the contents of two files.
DiffParser.Hunk - Class in de.unkrig.zz.patch.diff
Representation of a "diff hunk", i.e. the description of textual changes in a sequence of lines.
DiffParser.LineChange - Class in de.unkrig.zz.patch.diff
Representation of one line in a DIFF document.
DiffParser.LineChange.Mode - Enum in de.unkrig.zz.patch.diff
The type of the diff line, specified by the character in column 1
dontSortDirectoryMembers() - Method in class de.unkrig.zz.patch.Main
By default directory members are processed in lexicographical sequence to achieve deterministic results.

E

Element_path() - Constructor for class de.unkrig.zz.patch.AntTask.Element_path
 
Element_path2() - Constructor for class de.unkrig.zz.patch.AntTask.Element_path2
 
evaluate(String, List<DiffParser.Hunk>, int, DiffParser.Hunk, int) - Method in interface de.unkrig.zz.patch.PatchTextTransformer.Condition
 
evaluate(String, CharSequence, int) - Method in interface de.unkrig.zz.patch.SubstitutionContentsTransformer.Condition
 
execute() - Method in class de.unkrig.zz.patch.AntTask
 
ExitException(String, int) - Constructor for exception de.unkrig.zz.patch.Main.ExitException
 

F

fileName1 - Variable in class de.unkrig.zz.patch.diff.DiffParser.Differential
The name of the first file.
fileName2 - Variable in class de.unkrig.zz.patch.diff.DiffParser.Differential
The name of the second file.
fileTransformer(boolean, boolean) - Method in class de.unkrig.zz.patch.Patch
 
flags - Variable in class de.unkrig.zz.patch.AntTask.Element_path
 
from1 - Variable in class de.unkrig.zz.patch.diff.DiffParser.Hunk
Line number in first file where the hunk applies, counting from zero.
from2 - Variable in class de.unkrig.zz.patch.diff.DiffParser.Hunk
Line number in second file where the hunk applies, counting from zero.

G

getContents() - Method in class de.unkrig.zz.patch.AntTask.AddElement
 
getEntryName() - Method in class de.unkrig.zz.patch.AntTask.AddElement
 
getExceptionHandler() - Method in class de.unkrig.zz.patch.Patch
 
getRegex() - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
Getter for the mandatory 'regex' attribute or subelement.
getReplacement() - Method in class de.unkrig.zz.patch.AntTask.SubstituteElement
Getter for the mandatory replacement=... attribute or <replacement> subelement.
getStatus() - Method in exception de.unkrig.zz.patch.Main.ExitException
 

H

help() - Static method in class de.unkrig.zz.patch.Main
Print this text and terminate.
Hunk(int, int, List<DiffParser.LineChange>) - Constructor for class de.unkrig.zz.patch.diff.DiffParser.Hunk
 
hunks - Variable in class de.unkrig.zz.patch.diff.DiffParser.Differential
The differences between the two files.

I

isIdentity() - Method in class de.unkrig.zz.patch.PatchTextTransformer
 

K

keep() - Method in class de.unkrig.zz.patch.Main
If existing files would be overwritten, keep copies of the originals.
keepGoing() - Method in class de.unkrig.zz.patch.Main
Print error and continue with next file.

L

LineChange(DiffParser.LineChange.Mode, String) - Constructor for class de.unkrig.zz.patch.diff.DiffParser.LineChange
 
lineChanges - Variable in class de.unkrig.zz.patch.diff.DiffParser.Hunk
List of changes (CONTEXT, ADDED, DELETED) that defines the hunk.
lookInto(Glob) - Method in class de.unkrig.zz.patch.Main
Look into compressed and archive contents if the format and the path match the glob.

M

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

N

NEVER - Static variable in interface de.unkrig.zz.patch.SubstitutionContentsTransformer.Condition

P

parse(File, Charset) - Static method in class de.unkrig.zz.patch.diff.DiffParser
Parses a DIFF document from a file; a DIFF document generally contains differentials for one or more files.
parse(Reader) - Static method in class de.unkrig.zz.patch.diff.DiffParser
Parses a DIFF document; a DIFF document generally contains differentials for one or more files.
Patch - Class in de.unkrig.zz.patch
Implementation of a PATCH utility with the following features: Transforms regular files, directory trees, and optionally entries in ZIP 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 Can add files
Patch() - Constructor for class de.unkrig.zz.patch.Patch
 
PatchConditions() - Constructor for class de.unkrig.zz.patch.Main.PatchConditions
 
PatchContentsTransformer - Class in de.unkrig.zz.patch
A ContentsTransformer that applies a patch in NORMAL, CONTEXT or UNIFIED DIFF format.
PatchContentsTransformer(Charset, Charset, File, Charset, PatchTextTransformer.Condition) - Constructor for class de.unkrig.zz.patch.PatchContentsTransformer
Parses a DIFF document from patchFile.
PatchElement() - Constructor for class de.unkrig.zz.patch.AntTask.PatchElement
 
PatchTextTransformer - Class in de.unkrig.zz.patch
A TextTransformer that applies a patch in NORMAL, CONTEXT or UNIFIED DIFF format.
PatchTextTransformer(List<DiffParser.Hunk>, PatchTextTransformer.Condition) - Constructor for class de.unkrig.zz.patch.PatchTextTransformer
 
PatchTextTransformer(List<DiffParser.Differential>, PatchTextTransformer.Condition, int) - Constructor for class de.unkrig.zz.patch.PatchTextTransformer
Use the first of the differentials.
PatchTextTransformer.Condition - Interface in de.unkrig.zz.patch
 

R

RemoveConditions() - Constructor for class de.unkrig.zz.patch.Main.RemoveConditions
 
RenameConditions() - Constructor for class de.unkrig.zz.patch.Main.RenameConditions
 

S

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
Deprecated.
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
 

T

text - Variable in class de.unkrig.zz.patch.diff.DiffParser.LineChange
The text of the diff line, less the prefix that indicates the mode, including the line separator.
TextElement() - Constructor for class de.unkrig.zz.patch.AntTask.TextElement
 
toString() - Method in class de.unkrig.zz.patch.diff.DiffParser.Hunk
 
toString() - Method in class de.unkrig.zz.patch.diff.DiffParser.LineChange
 
toString() - Method in class de.unkrig.zz.patch.SubstitutionContentsTransformer
 
toString() - Method in class de.unkrig.zz.patch.UpdateContentsTransformer
 
transform(String, InputStream, OutputStream) - Method in class de.unkrig.zz.patch.PatchContentsTransformer
Applies all patches to the input stream and writes the result into the output stream.
transform(String, Reader, Writer) - Method in class de.unkrig.zz.patch.PatchTextTransformer
Applies all patches to the reader and writes the result to the writer.
transform(String, InputStream, OutputStream) - Method in class de.unkrig.zz.patch.SubstitutionContentsTransformer
 
transform(String, InputStream, OutputStream) - Method in class de.unkrig.zz.patch.UpdateContentsTransformer
 

U

UpdateConditions() - Constructor for class de.unkrig.zz.patch.Main.UpdateConditions
 
UpdateContentsTransformer - Class in de.unkrig.zz.patch
A ContentsTransformer that replaces the contents with that of a given "update file".
UpdateContentsTransformer(Glob) - Constructor for class de.unkrig.zz.patch.UpdateContentsTransformer
 

V

valueOf(String) - Static method in enum de.unkrig.zz.patch.diff.DiffParser.LineChange.Mode
Returns the enum constant of this type with the specified name.
values() - Static method in enum de.unkrig.zz.patch.diff.DiffParser.LineChange.Mode
Returns an array containing the constants of this enum type, in the order they are declared.
A C D E F G H I K L M N P R S T U V 
Skip navigation links
zz-patch 1.3.11-SNAPSHOT

Copyright © 2022 Arno Unkrig. All rights reserved.