org.eclipse.jgit.api
Class ApplyCommand
java.lang.Object
org.eclipse.jgit.api.GitCommand<ApplyResult>
org.eclipse.jgit.api.ApplyCommand
- All Implemented Interfaces:
- Callable<ApplyResult>
public class ApplyCommand
- extends GitCommand<ApplyResult>
Apply a patch to files and/or to the index.
- Since:
- 2.0
- See Also:
- Git documentation about apply
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
setPatch
public ApplyCommand setPatch(InputStream in)
- Parameters:
in
- the patch to apply
- Returns:
- this instance
call
public ApplyResult call()
throws GitAPIException,
PatchFormatException,
PatchApplyException
- Executes the
ApplyCommand
command with all the options and
parameters collected by the setter methods (e.g.
setPatch(InputStream)
of this class. Each instance of this class
should only be used for one invocation of the command. Don't call this
method twice on an instance.
- Specified by:
call
in interface Callable<ApplyResult>
- Specified by:
call
in class GitCommand<ApplyResult>
- Returns:
- an
ApplyResult
object representing the command result
- Throws:
GitAPIException
PatchFormatException
PatchApplyException
Copyright © 2012. All Rights Reserved.