public final class ContextualPatch
extends java.lang.Object
Applies contextual patches to files. The patch file can contain patches for multiple files.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
ContextualPatch.HunkReport |
|
static interface |
ContextualPatch.IContextProvider |
|
static class |
ContextualPatch.PatchReport |
|
static class |
ContextualPatch.PatchStatus |
| Modifier and Type | Method | Description |
|---|---|---|
static ContextualPatch |
create(java.io.File patchFile,
java.io.File context) |
|
static ContextualPatch |
create(java.lang.String patchString,
ContextualPatch.IContextProvider context) |
|
java.util.List<ContextualPatch.PatchReport> |
patch(boolean dryRun) |
|
ContextualPatch |
setAccessC14N(boolean canonicalize) |
|
ContextualPatch |
setMaxFuzz(int maxFuzz) |
|
ContextualPatch |
setWhitespaceC14N(boolean canonicalize) |
public static ContextualPatch create(java.io.File patchFile, java.io.File context)
public static ContextualPatch create(java.lang.String patchString, ContextualPatch.IContextProvider context)
public ContextualPatch setMaxFuzz(int maxFuzz)
public ContextualPatch setWhitespaceC14N(boolean canonicalize)
public ContextualPatch setAccessC14N(boolean canonicalize)
public java.util.List<ContextualPatch.PatchReport> patch(boolean dryRun) throws com.cloudbees.diff.PatchException, java.io.IOException
dryRun - true if the method should not make any modifications to files, false otherwisecom.cloudbees.diff.PatchException - for a malformed patch filejava.io.IOException - because it reads the patch file