Package org.apache.sshd.git.pgm
Class EmbeddedCommandRunner
java.lang.Object
org.apache.sshd.git.pgm.EmbeddedCommandRunner
TODO Add javadoc
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Object
private Object
void
execute
(String[] argv, InputStream in, OutputStream out, OutputStream err) Execute a command.private Object
protected org.eclipse.jgit.lib.Repository
openGitDir
(String gitdir) Evaluate the--git-dir
option and open the repository.private void
-
Field Details
-
help
private boolean help -
showStackTrace
private boolean showStackTrace -
gitdir
-
subcommand
private org.eclipse.jgit.pgm.TextBuiltin subcommand -
arguments
-
rootDir
-
-
Constructor Details
-
EmbeddedCommandRunner
-
-
Method Details
-
execute
public void execute(String[] argv, InputStream in, OutputStream out, OutputStream err) throws Exception Execute a command.- Parameters:
argv
- the command and its argumentsin
- the input stream, may be null in which case the system input stream will be usedout
- the output stream, may be null in which case the system output stream will be usederr
- the error stream, may be null in which case the system error stream will be used- Throws:
Exception
- if an error occurs
-
get
-
set
private void set(Object obj, String name, Object val) throws IllegalAccessException, NoSuchFieldException -
call
private Object call(Object obj, String name) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException -
call
private Object call(Object obj, String name, Class<?>[] types, Object[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException -
openGitDir
Evaluate the--git-dir
option and open the repository.- Parameters:
gitdir
- the--git-dir
option given on the command line. May be null if it was not supplied.- Returns:
- the repository to operate on.
- Throws:
IOException
- the repository cannot be opened.
-