call()
org.eclipse.jgit.api
This class ensures that all commands fulfill the
java. interface. It also has a property
repo holding a reference to the git
org. this command should work with.
Finally this class stores a state telling whether it is allowed to call
call() on this instance. Instances of
org. can only be used for one single
successful call to call(). Afterwards this instance may not be used
anymore to set/modify any properties or to call call() again. This
is achieved by setting the callable property to false after the
successful execution of call() and to check the state (by calling
checkCallable()) before setting of properties and inside
call().
| Modifier and Type | Field and Description |
|---|---|
| private AtomicBoolean | |
| protected final Repository | repo
The repository this command is working with |
| Access | Constructor and Description |
|---|---|
| protected | GitCommand(Repository
the repo)org. this command
should interact withCreates a new command which interacts with a single repository |
| Modifier and Type | Method and Description |
|---|---|
| public abstract T | call()
Redeclares java. Computes a result, or throws an exception if unable to do so. |
| protected void | |
| public Repository | Returns: theorg. this command is
interacting withGet repository this command is working on |
| protected void | setCallable(boolean
if callable)true it is allowed to call call() on
this instance.Set's the state which tells whether it is allowed to call |
| callable | back to summary |
|---|---|
| private AtomicBoolean callable a state which tells whether it is allowed to call | |
| repo | back to summary |
|---|---|
| protected final Repository repo The repository this command is working with | |
| GitCommand | back to summary |
|---|---|
| protected GitCommand(Repository repo) Creates a new command which interacts with a single repository
| |
| call | back to summary |
|---|---|
| public abstract T call() throws GitAPIException Redeclares java. Doc from java. Computes a result, or throws an exception if unable to do so. Execute the command
| |
| checkCallable | back to summary |
|---|---|
| protected void checkCallable() Checks that the property
| |
| getRepository | back to summary |
|---|---|
| public Repository getRepository() Get repository this command is working on
| |
| setCallable | back to summary |
|---|---|
| protected void setCallable(boolean callable) Set's the state which tells whether it is allowed to call
| |