aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-12-17 21:36:30 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2017-12-18 01:08:02 +0100
commitf677ee4893ae5e72f717bc949a9b82599309a7d7 (patch)
tree5103ebc24156c5fbd80560ee74c6ff1387715442 /org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm
parent5d64d3d83a60f3663e22786eeed7cec03fe6ed40 (diff)
downloadjgit-f677ee4893ae5e72f717bc949a9b82599309a7d7.tar.gz
jgit-f677ee4893ae5e72f717bc949a9b82599309a7d7.zip
Fix javadoc in org.eclipse.jgit.pgm
Change-Id: I74616f6e8ef69bef4db2f13a9b47ddf57714fd1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java25
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java5
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java11
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java16
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java3
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java3
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java3
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java12
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java24
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java38
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java44
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java1
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java20
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java7
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java8
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java3
74 files changed, 319 insertions, 40 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
index 08ec0964fc..f0754b192c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -66,6 +66,14 @@ abstract class AbstractFetchCommand extends TextBuiltin {
@Option(name = "--verbose", aliases = { "-v" }, usage = "usage_beMoreVerbose")
private boolean verbose;
+ /**
+ * Show fetch result.
+ *
+ * @param r
+ * a {@link org.eclipse.jgit.transport.FetchResult} object.
+ * @throws java.io.IOException
+ * if any.
+ */
protected void showFetchResult(final FetchResult r) throws IOException {
try (ObjectReader reader = db.newObjectReader()) {
boolean shownURI = false;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java
index 3c13590307..08a9f48c04 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java
@@ -60,6 +60,7 @@ class Add extends TextBuiltin {
@Argument(required = true, metaVar = "metaVar_filepattern", usage = "usage_filesToAddContentFrom")
private List<String> filepatterns = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
index e0a9244a8f..086c9766ac 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
@@ -75,11 +75,13 @@ class AmazonS3Client extends TextBuiltin {
@Argument(index = 3, metaVar = "metaVar_KEY", required = true)
private String key;
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final AmazonS3 s3 = new AmazonS3(properties());
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
index cff0bf6c2b..4721b3a0fd 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java
@@ -74,6 +74,7 @@ class Archive extends TextBuiltin {
@Option(name = "--output", aliases = { "-o" }, metaVar = "metaVar_file", usage = "usage_archiveOutput")
private String output;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (tree == null)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
index 419325405f..13a38dddf4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java
@@ -134,6 +134,7 @@ class Blame extends TextBuiltin {
private BlameResult blame;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (file == null) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
index f6e3810a86..e6685c2f65 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
@@ -87,6 +87,12 @@ class Branch extends TextBuiltin {
private List<String> delete;
+ /**
+ * Delete branches
+ *
+ * @param names
+ * a {@link java.util.List} of branch names.
+ */
@Option(name = "--delete", aliases = {
"-d" }, metaVar = "metaVar_branchNames", usage = "usage_deleteFullyMergedBranch", handler = OptionWithValuesListHandler.class)
public void delete(List<String> names) {
@@ -98,6 +104,12 @@ class Branch extends TextBuiltin {
private List<String> deleteForce;
+ /**
+ * Forcefully delete branches
+ *
+ * @param names
+ * a {@link java.util.List} of branch names.
+ */
@Option(name = "--delete-force", aliases = {
"-D" }, metaVar = "metaVar_branchNames", usage = "usage_deleteBranchEvenIfNotMerged", handler = OptionWithValuesListHandler.class)
public void deleteForce(List<String> names) {
@@ -107,6 +119,12 @@ class Branch extends TextBuiltin {
deleteForce = names;
}
+ /**
+ * Forcefully create a list of branches
+ *
+ * @param branchAndStartPoint
+ * a branch name and a start point
+ */
@Option(name = "--create-force", aliases = {
"-f" }, metaVar = "metaVar_branchAndStartPoint", usage = "usage_forceCreateBranchEvenExists", handler = OptionWithValuesListHandler.class)
public void createForce(List<String> branchAndStartPoint) {
@@ -125,6 +143,12 @@ class Branch extends TextBuiltin {
}
}
+ /**
+ * Move or rename a branch
+ *
+ * @param currentAndNew
+ * the current and the new branch name
+ */
@Option(name = "--move", aliases = {
"-m" }, metaVar = "metaVar_oldNewBranchNames", usage = "usage_moveRenameABranch", handler = OptionWithValuesListHandler.class)
public void moveRename(List<String> currentAndNew) {
@@ -156,6 +180,7 @@ class Branch extends TextBuiltin {
private int maxNameLength;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (delete != null || deleteForce != null) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
index 2af1eca807..1f80301f66 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
@@ -80,6 +80,7 @@ class Checkout extends TextBuiltin {
@Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class)
private List<String> paths = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (createBranch) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java
index ce4faf83a7..6ae078c953 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java
@@ -62,6 +62,7 @@ class Clean extends TextBuiltin {
@Option(name = "--dryRun", aliases = { "-n" })
private boolean dryRun = false;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
index a8eb4742db..393c607a2b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
@@ -86,11 +86,13 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback {
@Argument(index = 1, metaVar = "metaVar_directory")
private String localName;
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (localName != null && gitdir != null)
@@ -148,6 +150,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback {
}
}
+ /** {@inheritDoc} */
@Override
public void initializedSubmodules(Collection<String> submodules) {
try {
@@ -161,6 +164,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback {
}
}
+ /** {@inheritDoc} */
@Override
public void cloningSubmodule(String path) {
try {
@@ -172,6 +176,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback {
}
}
+ /** {@inheritDoc} */
@Override
public void checkingOut(AnyObjectId commit, String path) {
try {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java
index 0562416a85..d7adaf841f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Command.java
@@ -50,7 +50,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
- * Annotation to document a {@link TextBuiltin}.
+ * Annotation to document a {@link org.eclipse.jgit.pgm.TextBuiltin}.
* <p>
* This is an optional annotation for TextBuiltin subclasses and it carries
* documentation forward into the runtime system describing what the command is
@@ -60,6 +60,8 @@ import java.lang.annotation.Target;
@Target( { TYPE })
public @interface Command {
/**
+ * Get the command name
+ *
* @return name the command is invoked as from the command line. If the
* (default) empty string is supplied the name will be generated
* from the class name.
@@ -67,11 +69,15 @@ public @interface Command {
public String name() default "";
/**
+ * Get command description
+ *
* @return one line description of the command's feature set.
*/
public String usage() default "";
/**
+ * If this command is considered to be commonly used
+ *
* @return true if this command is considered to be commonly used.
*/
public boolean common() default false;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
index cf4c6e3339..7bab69210b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -60,9 +60,10 @@ import java.util.Vector;
/**
* List of all commands known by jgit's command line tools.
* <p>
- * Commands are implementations of {@link TextBuiltin}, with an optional
- * {@link Command} class annotation to insert additional documentation or
- * override the default command name (which is guessed from the class name).
+ * Commands are implementations of {@link org.eclipse.jgit.pgm.TextBuiltin},
+ * with an optional {@link org.eclipse.jgit.pgm.Command} class annotation to
+ * insert additional documentation or override the default command name (which
+ * is guessed from the class name).
* <p>
* Commands may be registered by adding them to a services file in the same JAR
* (or classes directory) as the command implementation. The service file name
@@ -90,6 +91,8 @@ public class CommandCatalog {
}
/**
+ * Get all commands sorted by their name
+ *
* @return all known commands, sorted by command name.
*/
public static CommandRef[] all() {
@@ -97,6 +100,8 @@ public class CommandCatalog {
}
/**
+ * Get all common commands sorted by their name
+ *
* @return all common commands, sorted by command name.
*/
public static CommandRef[] common() {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
index e5f85324e1..2c9bc0dc75 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
@@ -50,7 +50,8 @@ import java.text.MessageFormat;
import org.eclipse.jgit.pgm.internal.CLIText;
/**
- * Description of a command (a {@link TextBuiltin} subclass.
+ * Description of a command (a {@link org.eclipse.jgit.pgm.TextBuiltin}
+ * subclass).
* <p>
* These descriptions are lightweight compared to creating a command instance
* and are therefore suitable for catalogs of "known" commands without linking
@@ -102,6 +103,8 @@ public class CommandRef {
}
/**
+ * Get the <code>name</code>.
+ *
* @return name the command is invoked as from the command line.
*/
public String getName() {
@@ -109,6 +112,8 @@ public class CommandRef {
}
/**
+ * Get <code>usage</code>.
+ *
* @return one line description of the command's feature set.
*/
public String getUsage() {
@@ -116,6 +121,8 @@ public class CommandRef {
}
/**
+ * Is this command commonly used
+ *
* @return true if this command is considered to be commonly used.
*/
public boolean isCommon() {
@@ -123,6 +130,8 @@ public class CommandRef {
}
/**
+ * Get implementation class name
+ *
* @return name of the Java class which implements this command.
*/
public String getImplementationClassName() {
@@ -130,6 +139,8 @@ public class CommandRef {
}
/**
+ * Get implementation class loader
+ *
* @return loader for {@link #getImplementationClassName()}.
*/
public ClassLoader getImplementationClassLoader() {
@@ -137,6 +148,8 @@ public class CommandRef {
}
/**
+ * Create an instance of the command implementation
+ *
* @return a new instance of the command implementation.
*/
public TextBuiltin create() {
@@ -166,6 +179,7 @@ public class CommandRef {
return r;
}
+ /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
index befc4ec272..2e67c02cb0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java
@@ -77,6 +77,7 @@ class Commit extends TextBuiltin {
@Argument(metaVar = "metaVar_commitPaths", usage = "usage_CommitPaths")
private List<String> paths = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws NoHeadException, NoMessageException,
ConcurrentRefUpdateException, JGitInternalException, Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
index f5c3f9aebf..f762c0d052 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java
@@ -68,6 +68,7 @@ class Config extends TextBuiltin {
@Option(name = "--file", aliases = { "-f" }, metaVar = "metaVar_file", usage = "usage_configFile")
private File configFile;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (list)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
index 51bb9792d7..d0ada67fc4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
@@ -111,11 +111,13 @@ class Daemon extends TextBuiltin {
@Argument(required = true, metaVar = "metaVar_directory", usage = "usage_directoriesToExport")
List<File> directory = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
PackConfig packConfig = new PackConfig();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
index 03e2711999..f9c1cf5d38 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java
@@ -65,6 +65,7 @@ class Describe extends TextBuiltin {
@Option(name = "--match", usage = "usage_Match", metaVar = "metaVar_pattern")
private List<String> patterns = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
index a25f1e9305..59de80c963 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Die.java
@@ -45,7 +45,8 @@
package org.eclipse.jgit.pgm;
/**
- * Indicates a {@link TextBuiltin} implementation has failed during execution.
+ * Indicates a {@link org.eclipse.jgit.pgm.TextBuiltin} implementation has
+ * failed during execution.
* <p>
* Typically the stack trace for a Die exception is not shown to the user as it
* may indicate a simple error condition that the end-user can fix on their own,
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
index 16284d5729..ed6f7b426b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java
@@ -168,12 +168,14 @@ class Diff extends TextBuiltin {
// END -- Options shared with Log
+ /** {@inheritDoc} */
@Override
protected void init(final Repository repository, final String gitDir) {
super.init(repository, gitDir);
diffFmt = new DiffFormatter(new BufferedOutputStream(outs));
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
diffFmt.setRepository(db);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
index 4432405994..510406345f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
@@ -72,6 +72,7 @@ class DiffTree extends TextBuiltin {
@Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class)
private TreeFilter pathFilter = TreeFilter.ALL;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (final TreeWalk walk = new TreeWalk(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
index f4b7708d37..bc76372862 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java
@@ -131,6 +131,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
@Argument(index = 1, metaVar = "metaVar_refspec")
private List<RefSpec> toget;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
@@ -164,6 +165,7 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback {
}
}
+ /** {@inheritDoc} */
@Override
public void fetchingSubmodule(String name) {
try {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
index 7289abb62f..56172f57c3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java
@@ -58,6 +58,7 @@ class Gc extends TextBuiltin {
@Option(name = "--prune-preserved", usage = "usage_PrunePreserved")
private boolean prunePreserved;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
Git git = Git.wrap(db);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
index 7b715751da..a081b7813f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java
@@ -102,6 +102,7 @@ class Glog extends RevWalkTextBuiltin {
frame.getContentPane().add(world);
}
+ /** {@inheritDoc} */
@Override
protected int walkLoop() throws Exception {
graphPane.getCommitList().source(walk);
@@ -113,11 +114,13 @@ class Glog extends RevWalkTextBuiltin {
return graphPane.getCommitList().size();
}
+ /** {@inheritDoc} */
@Override
protected void show(final RevCommit c) throws Exception {
throw new UnsupportedOperationException();
}
+ /** {@inheritDoc} */
@Override
protected RevWalk createWalk() {
if (objects)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
index 22f3be9afd..26276718df 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java
@@ -60,6 +60,7 @@ class IndexPack extends TextBuiltin {
@Option(name = "--index-version", usage = "usage_indexFileFormatToCreate")
private int indexVersion = -1;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
BufferedInputStream in = new BufferedInputStream(ins);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java
index a7bee7f7b9..f880fc2076 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java
@@ -66,11 +66,13 @@ class Init extends TextBuiltin {
@Argument(index = 0, metaVar = "metaVar_directory")
private String directory;
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
InitCommand command = Git.init();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
index 1108ddd10b..75542d4454 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
@@ -184,12 +184,14 @@ class Log extends RevWalkTextBuiltin {
dateFormatter = new GitDateFormatter(Format.DEFAULT);
}
+ /** {@inheritDoc} */
@Override
protected void init(final Repository repository, final String gitDir) {
super.init(repository, gitDir);
diffFmt = new DiffFormatter(new BufferedOutputStream(outs));
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
diffFmt.setRepository(db);
@@ -237,6 +239,7 @@ class Log extends RevWalkTextBuiltin {
NoteMap.read(argWalk.getObjectReader(), notesCommit));
}
+ /** {@inheritDoc} */
@Override
protected void show(final RevCommit c) throws Exception {
outw.print(CLIText.get().commitLabel);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
index 7a5f3d8116..9013ff6cfe 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
@@ -70,6 +70,7 @@ class LsRemote extends TextBuiltin {
@Argument(index = 0, metaVar = "metaVar_uriish", required = true)
private String remote;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
LsRemoteCommand command = Git.lsRemoteRepository().setRemote(remote)
@@ -89,6 +90,7 @@ class LsRemote extends TextBuiltin {
}
}
+ /** {@inheritDoc} */
@Override
protected boolean requiresRepository() {
return false;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
index 398d305f6e..c57f9f2c37 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
@@ -70,6 +70,7 @@ class LsTree extends TextBuiltin {
@Option(name = "--", metaVar = "metaVar_paths", handler = StopOptionHandler.class)
private List<String> paths = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (final TreeWalk walk = new TreeWalk(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index 9d44dc08cd..b29b097473 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -80,7 +80,9 @@ import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.OptionHandlerFilter;
-/** Command line entry point. */
+/**
+ * Command line entry point.
+ */
public class Main {
@Option(name = "--help", usage = "usage_displayThisHelpText", aliases = { "-h" })
private boolean help;
@@ -105,7 +107,7 @@ public class Main {
private ExecutorService gcExecutor;
/**
- *
+ * <p>Constructor for Main.</p>
*/
public Main() {
HttpTransport.setConnectionFactory(new HttpClientConnectionFactory());
@@ -129,7 +131,7 @@ public class Main {
*
* @param argv
* arguments.
- * @throws Exception
+ * @throws java.lang.Exception
*/
public static void main(final String[] argv) throws Exception {
new Main().run(argv);
@@ -150,7 +152,7 @@ public class Main {
*
* @param argv
* arguments.
- * @throws Exception
+ * @throws java.lang.Exception
*/
protected void run(final String[] argv) throws Exception {
writer = createErrorWriter();
@@ -309,7 +311,7 @@ public class Main {
* the {@code --git-dir} option given on the command line. May be
* null if it was not supplied.
* @return the repository to operate on.
- * @throws IOException
+ * @throws java.io.IOException
* the repository cannot be opened.
*/
protected Repository openGitDir(String aGitdir) throws IOException {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
index 1aab748a0c..de059e9416 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java
@@ -101,6 +101,7 @@ class Merge extends TextBuiltin {
@Option(name = "-m", usage = "usage_message")
private String message;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (squash && ff == FastForwardMode.NO_FF)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
index 975d5deeee..62a88aeed6 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
@@ -65,6 +65,7 @@ class MergeBase extends TextBuiltin {
@Argument(index = 1, metaVar = "metaVar_commitish", required = true)
private List<RevCommit> commits = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
for (final RevCommit c : commits)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index 389708e6e1..309dca2a7f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -113,6 +113,7 @@ class Push extends TextBuiltin {
private boolean shownURI;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
index d7f895a300..f3baafb0b7 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
@@ -58,11 +58,13 @@ class ReceivePack extends TextBuiltin {
@Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReceiveInto")
File dstGitdir;
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final org.eclipse.jgit.transport.ReceivePack rp;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
index 86a021dee1..6f4fcc2488 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java
@@ -57,6 +57,7 @@ class Reflog extends TextBuiltin {
@Argument(metaVar = "metaVar_ref")
private String ref;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java
index 24916bd1c2..948cbc554c 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java
@@ -84,6 +84,7 @@ class Remote extends TextBuiltin {
@Argument(index = 2, metaVar = "metaVar_uriish")
private String uri;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
@@ -143,6 +144,7 @@ class Remote extends TextBuiltin {
}
}
+ /** {@inheritDoc} */
@Override
public void printUsage(final String message, final CmdLineParser clp)
throws IOException {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java
index bec5003a1e..f557211fd9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java
@@ -58,6 +58,7 @@ class Repo extends TextBuiltin {
@Argument(required = true, metaVar = "metaVar_path", usage = "usage_pathToXml")
private String path;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
new RepoCommand(db)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
index 4c19883c83..f84c848063 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java
@@ -72,6 +72,7 @@ class Reset extends TextBuiltin {
@Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class)
private List<String> paths = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
index 4420abec16..8c88a5cdc7 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java
@@ -51,6 +51,7 @@ import org.eclipse.jgit.revwalk.RevTree;
@Command(usage = "usage_RevList")
class RevList extends RevWalkTextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void show(final RevCommit c) throws Exception {
if (c.has(RevFlag.UNINTERESTING))
@@ -64,6 +65,7 @@ class RevList extends RevWalkTextBuiltin {
outw.println();
}
+ /** {@inheritDoc} */
@Override
protected void show(final ObjectWalk ow, final RevObject obj)
throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
index 2157034094..21adf738e0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
@@ -70,6 +70,7 @@ class RevParse extends TextBuiltin {
@Argument(index = 0, metaVar = "metaVar_commitish")
private List<ObjectId> commits = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (all) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
index 6b0744d51a..3fc91013ac 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -149,6 +149,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
@Option(name = "--max-count", aliases = "-n", metaVar = "metaVar_n")
private int maxCount = -1;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
walk = createWalk();
@@ -210,6 +211,11 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
}
}
+ /**
+ * Create RevWalk
+ *
+ * @return a {@link org.eclipse.jgit.revwalk.RevWalk} object.
+ */
protected RevWalk createWalk() {
RevWalk result;
if (objects)
@@ -222,6 +228,13 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
return result;
}
+ /**
+ * Loop the walk
+ *
+ * @return number of RevCommits walked
+ * @throws java.lang.Exception
+ * if any.
+ */
protected int walkLoop() throws Exception {
int n = 0;
for (final RevCommit c : walk) {
@@ -248,8 +261,8 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
* RevWalkTextBuiltin.
*
* @param c
- * The current {@link RevCommit}
- * @throws Exception
+ * The current {@link org.eclipse.jgit.revwalk.RevCommit}
+ * @throws java.lang.Exception
*/
protected abstract void show(final RevCommit c) throws Exception;
@@ -260,10 +273,11 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
* process RevCommits.
*
* @param objectWalk
- * the {@link ObjectWalk} used by {@link #walkLoop()}
+ * the {@link org.eclipse.jgit.revwalk.ObjectWalk} used by
+ * {@link #walkLoop()}
* @param currentObject
- * The current {@link RevObject}
- * @throws Exception
+ * The current {@link org.eclipse.jgit.revwalk.RevObject}
+ * @throws java.lang.Exception
*/
protected void show(final ObjectWalk objectWalk,
final RevObject currentObject) throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java
index 32a5631e54..f59161039e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java
@@ -59,6 +59,7 @@ class Rm extends TextBuiltin {
@Option(name = "--", handler = StopOptionHandler.class)
private List<String> paths = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
index 5eda36f39e..de04045e42 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
@@ -165,12 +165,14 @@ class Show extends TextBuiltin {
fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US); //$NON-NLS-1$
}
+ /** {@inheritDoc} */
@Override
protected void init(final Repository repository, final String gitDir) {
super.init(repository, gitDir);
diffFmt = new DiffFormatter(new BufferedOutputStream(outs));
}
+ /** {@inheritDoc} */
@SuppressWarnings("boxing")
@Override
protected void run() throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
index e9d9df6a19..7b59d437ac 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
@@ -58,6 +58,7 @@ import org.eclipse.jgit.util.RefMap;
@Command(usage = "usage_ShowRef")
class ShowRef extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
for (final Ref r : getSortedRefs()) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
index adcfea4dc3..4238f207e0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java
@@ -86,6 +86,7 @@ class Status extends TextBuiltin {
@Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class)
protected List<String> filterPaths;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
@@ -261,6 +262,15 @@ class Status extends TextBuiltin {
}
}
+ /**
+ * Print section header
+ *
+ * @param pattern
+ * a {@link java.lang.String} object.
+ * @param arguments
+ * a {@link java.lang.Object} object.
+ * @throws java.io.IOException
+ */
protected void printSectionHeader(String pattern, Object... arguments)
throws IOException {
if (!porcelain) {
@@ -272,6 +282,14 @@ class Status extends TextBuiltin {
}
}
+ /**
+ * Print String list
+ *
+ * @param list
+ * a {@link java.util.Collection} object.
+ * @return a int.
+ * @throws java.io.IOException
+ */
protected int printList(Collection<String> list) throws IOException {
if (!list.isEmpty()) {
List<String> sortedList = new ArrayList<>(list);
@@ -286,6 +304,26 @@ class Status extends TextBuiltin {
return 0;
}
+ /**
+ * Print String list
+ *
+ * @param status1
+ * a {@link java.lang.String} object.
+ * @param status2
+ * a {@link java.lang.String} object.
+ * @param status3
+ * a {@link java.lang.String} object.
+ * @param list
+ * a {@link java.util.Collection} object.
+ * @param set1
+ * a {@link java.util.Collection} object.
+ * @param set2
+ * a {@link java.util.Collection} object.
+ * @param set3
+ * a {@link java.util.Collection} object.
+ * @return a int.
+ * @throws java.io.IOException
+ */
protected int printList(String status1, String status2, String status3,
Collection<String> list, Collection<String> set1,
Collection<String> set2,
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
index dc4b037cf2..43c1f54ab5 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
@@ -80,6 +80,7 @@ class Tag extends TextBuiltin {
@Argument(index = 1, metaVar = "metaVar_object")
private ObjectId object;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (Git git = new Git(db)) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index c3b45e8de9..bc3755d349 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -133,7 +133,11 @@ public abstract class TextBuiltin {
commandName = name;
}
- /** @return true if {@link #db}/{@link #getRepository()} is required. */
+ /**
+ * If this command requires a repository.
+ *
+ * @return true if {@link #db}/{@link #getRepository()} is required
+ */
protected boolean requiresRepository() {
return true;
}
@@ -214,7 +218,7 @@ public abstract class TextBuiltin {
*
* @param args
* command line arguments passed after the command name.
- * @throws Exception
+ * @throws java.lang.Exception
* an error occurred while processing the command. The main
* framework will catch the exception and print a message on
* standard error.
@@ -233,7 +237,7 @@ public abstract class TextBuiltin {
*
* @param args
* the arguments supplied on the command line, if any.
- * @throws IOException
+ * @throws java.io.IOException
*/
protected void parseArguments(final String[] args) throws IOException {
final CmdLineParser clp = new CmdLineParser(this);
@@ -260,7 +264,8 @@ public abstract class TextBuiltin {
* Print the usage line
*
* @param clp
- * @throws IOException
+ * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object.
+ * @throws java.io.IOException
*/
public void printUsageAndExit(final CmdLineParser clp) throws IOException {
printUsageAndExit("", clp); //$NON-NLS-1$
@@ -270,8 +275,10 @@ public abstract class TextBuiltin {
* Print an error message and the usage line
*
* @param message
+ * a {@link java.lang.String} object.
* @param clp
- * @throws IOException
+ * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object.
+ * @throws java.io.IOException
*/
public void printUsageAndExit(final String message, final CmdLineParser clp) throws IOException {
printUsage(message, clp);
@@ -279,11 +286,13 @@ public abstract class TextBuiltin {
}
/**
+ * Print usage help text.
+ *
* @param message
* non null
* @param clp
* parser used to print options
- * @throws IOException
+ * @throws java.io.IOException
* @since 4.2
*/
protected void printUsage(final String message, final CmdLineParser clp)
@@ -302,6 +311,8 @@ public abstract class TextBuiltin {
}
/**
+ * Get error writer
+ *
* @return error writer, typically this is standard error.
* @since 4.2
*/
@@ -310,6 +321,8 @@ public abstract class TextBuiltin {
}
/**
+ * Get output writer
+ *
* @return output writer, typically this is standard output.
* @since 4.9
*/
@@ -318,6 +331,8 @@ public abstract class TextBuiltin {
}
/**
+ * Get resource bundle with localized texts
+ *
* @return the resource bundle that will be passed to args4j for purpose of
* string localization
*/
@@ -330,7 +345,7 @@ public abstract class TextBuiltin {
* <p>
* This method should only be invoked by {@link #execute(String[])}.
*
- * @throws Exception
+ * @throws java.lang.Exception
* an error occurred while processing the command. The main
* framework will catch the exception and print a message on
* standard error.
@@ -338,6 +353,8 @@ public abstract class TextBuiltin {
protected abstract void run() throws Exception;
/**
+ * Get the repository
+ *
* @return the repository this command accesses.
*/
public Repository getRepository() {
@@ -352,6 +369,8 @@ public abstract class TextBuiltin {
}
/**
+ * Exit the command with an error message
+ *
* @param why
* textual explanation
* @return a runtime exception the caller is expected to throw
@@ -361,6 +380,8 @@ public abstract class TextBuiltin {
}
/**
+ * Exit the command with an error message and an exception
+ *
* @param why
* textual explanation
* @param cause
@@ -372,8 +393,11 @@ public abstract class TextBuiltin {
}
/**
+ * Exit the command
+ *
* @param aborted
- * boolean indicating that the execution has been aborted before running
+ * boolean indicating that the execution has been aborted before
+ * running
* @return a runtime exception the caller is expected to throw
* @since 3.4
*/
@@ -382,6 +406,8 @@ public abstract class TextBuiltin {
}
/**
+ * Exit the command
+ *
* @param aborted
* boolean indicating that the execution has been aborted before
* running
@@ -405,6 +431,8 @@ public abstract class TextBuiltin {
}
/**
+ * Check if the arguments contain a help option
+ *
* @param args
* non null
* @return true if the given array contains help option
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
index 447374d699..5d032d2084 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
@@ -62,11 +62,13 @@ class UploadPack extends TextBuiltin {
@Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReadFrom")
File srcGitdir;
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final org.eclipse.jgit.transport.UploadPack up;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
index 6bed9c6025..5efc03b287 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
@Command(common = true, usage = "usage_DisplayTheVersionOfJgit")
class Version extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
// read the Implementation-Version from Manifest
@@ -73,6 +74,7 @@ class Version extends TextBuiltin {
outw.println(MessageFormat.format(CLIText.get().jgitVersion, version));
}
+ /** {@inheritDoc} */
@Override
protected final boolean requiresRepository() {
return false;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
index 71c8db8e45..248eaac8ad 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
@@ -95,6 +95,7 @@ class BenchmarkReftable extends TextBuiltin {
@Argument(index = 1)
private String reftablePath;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
switch (test) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
index 8de57e322e..5f8ebdb1a9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java
@@ -130,11 +130,13 @@ class DiffAlgorithms extends TextBuiltin {
private ThreadMXBean mxBean;
+ /** {@inheritDoc} */
@Override
protected boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
mxBean = ManagementFactory.getThreadMXBean();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java
index 9dc47210db..973b0d7655 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java
@@ -214,11 +214,13 @@ class LfsStore extends TextBuiltin {
String secretKey;
+ /** {@inheritDoc} */
@Override
protected boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
AppServer server = new AppServer(port);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
index d3a0a3e14e..127e541741 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java
@@ -57,6 +57,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
@Command(usage = "usage_MakeCacheTree")
class MakeCacheTree extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final DirCache cache = db.readDirCache();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
index 07bfc4b5fe..0194cca491 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java
@@ -54,6 +54,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
@Command(usage = "usage_ReadDirCache")
class ReadDirCache extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final int cnt = 100;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
index 9b8db3e0f8..fda19017d2 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
@@ -63,6 +63,7 @@ class ReadReftable extends TextBuiltin {
@Argument(index = 1, required = false)
private String ref;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (FileInputStream in = new FileInputStream(input);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
index da602d0b89..2e41eec7cb 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
@@ -114,6 +114,7 @@ class RebuildCommitGraph extends TextBuiltin {
private Map<ObjectId, ObjectId> rewrites = new HashMap<>();
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (!really && !db.getRefDatabase().getRefs(ALL).isEmpty()) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java
index 8cde5138a4..3172483953 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildRefTree.java
@@ -73,6 +73,7 @@ class RebuildRefTree extends TextBuiltin {
private String txnNamespace;
private String txnCommitted;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
try (ObjectReader reader = db.newObjectReader();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
index e287425d7b..20fa4a3fe5 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java
@@ -57,6 +57,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
@Command(usage = "usage_ShowCacheTree")
class ShowCacheTree extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final DirCache cache = db.readDirCache();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
index 415c7d320f..a960ec6dd3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
@@ -59,6 +59,7 @@ class ShowCommands extends TextBuiltin {
@Option(name = "--pretty", metaVar = "metaVar_commandDetail", usage = "usage_alterTheDetailShown")
private Format pretty = Format.USAGE;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final CommandRef[] list = CommandCatalog.all();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
index bb4f73d7d1..7f99d76bda 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java
@@ -64,6 +64,7 @@ class ShowDirCache extends TextBuiltin {
@Option(name = "--millis", aliases = { "-m" }, usage = "usage_showTimeInMilliseconds")
private boolean millis = false;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final SimpleDateFormat fmt;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
index 150fe6eecb..bbc1b0f330 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
@@ -72,6 +72,7 @@ class ShowPackDelta extends TextBuiltin {
@Argument(index = 0)
private ObjectId objectId;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
ObjectReader reader = db.newObjectReader();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
index ce582010f0..83b7bcea26 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
@@ -262,11 +262,13 @@ class TextHashFunctions extends TextBuiltin {
@Option(name = "--repository", aliases = { "-r" }, metaVar = "GIT_DIR", usage = "Repository to scan")
List<File> gitDirs = new ArrayList<>();
+ /** {@inheritDoc} */
@Override
protected boolean requiresRepository() {
return false;
}
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
if (gitDirs.isEmpty()) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
index dffb579895..b38de14af9 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java
@@ -75,6 +75,7 @@ class VerifyReftable extends TextBuiltin {
@Argument(index = 1)
private String reftablePath;
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
List<Ref> refs = WriteReftable.readRefs(lsRemotePath);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java
index 42428c7740..d3b0005efc 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java
@@ -51,6 +51,7 @@ import org.eclipse.jgit.pgm.internal.CLIText;
@Command(usage = "usage_WriteDirCache")
class WriteDirCache extends TextBuiltin {
+ /** {@inheritDoc} */
@Override
protected void run() throws Exception {
final DirCache cache = db.readDirCache();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
index 76ffa194a3..6cbc1b082b 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
@@ -104,6 +104,7 @@ class WriteReftable extends TextBuiltin {
@Argument(index = 1)
private String out;
+ /** {@inheritDoc} */
@SuppressWarnings({ "nls", "boxing" })
@Override
protected void run() throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
index dfb489d826..b3ad8bf403 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/internal/CLIText.java
@@ -79,6 +79,8 @@ public class CLIText extends TranslationBundle {
}
/**
+ * Format text
+ *
* @param text
* the text to format.
* @return a new Format instance.
@@ -88,6 +90,8 @@ public class CLIText extends TranslationBundle {
}
/**
+ * Get an instance of this translation bundle
+ *
* @return an instance of this translation bundle
*/
public static CLIText get() {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
index 587f98ca53..6fe7927166 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
@@ -68,7 +68,8 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Custom argument handler {@link AbstractTreeIterator} from string values.
+ * Custom argument handler
+ * {@link org.eclipse.jgit.treewalk.AbstractTreeIterator} from string values.
* <p>
* Assumes the parser has been initialized with a Repository.
*/
@@ -82,8 +83,11 @@ public class AbstractTreeIteratorHandler extends
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public AbstractTreeIteratorHandler(final CmdLineParser parser,
final OptionDef option,
@@ -92,6 +96,7 @@ public class AbstractTreeIteratorHandler extends
clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
final String name = params.getParameter(0);
@@ -144,6 +149,7 @@ public class AbstractTreeIteratorHandler extends
return 1;
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_treeish;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
index 3dcb2a3147..e071bdf839 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java
@@ -61,11 +61,9 @@ import org.eclipse.jgit.revwalk.RevTree;
import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.transport.RefSpec;
import org.eclipse.jgit.treewalk.AbstractTreeIterator;
-import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.IllegalAnnotationError;
import org.kohsuke.args4j.NamedOptionDef;
-import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.OptionDef;
import org.kohsuke.args4j.OptionHandlerRegistry;
import org.kohsuke.args4j.spi.OptionHandler;
@@ -105,9 +103,10 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
* them into the given object.
*
* @param bean
- * instance of a class annotated by {@link Option} and
- * {@link Argument}. this object will receive values.
- *
+ * instance of a class annotated by
+ * {@link org.kohsuke.args4j.Option} and
+ * {@link org.kohsuke.args4j.Argument}. this object will receive
+ * values.
* @throws IllegalAnnotationError
* if the option bean class is using args4j annotations
* incorrectly.
@@ -121,8 +120,10 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
* them into the given object.
*
* @param bean
- * instance of a class annotated by {@link Option} and
- * {@link Argument}. this object will receive values.
+ * instance of a class annotated by
+ * {@link org.kohsuke.args4j.Option} and
+ * {@link org.kohsuke.args4j.Argument}. this object will receive
+ * values.
* @param repo
* repository this parser can translate options through.
* @throws IllegalAnnotationError
@@ -140,6 +141,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
this.db = repo;
}
+ /** {@inheritDoc} */
@Override
public void parseArgument(final String... args) throws CmdLineException {
final ArrayList<String> tmp = new ArrayList<>(args.length);
@@ -223,6 +225,8 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
}
/**
+ * Check if array contains help option
+ *
* @param args
* non null
* @return true if the given array contains help option
@@ -292,6 +296,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
}
}
+ /** {@inheritDoc} */
@Override
protected OptionHandler createOptionHandler(OptionDef o, Setter setter) {
if (o instanceof NamedOptionDef)
@@ -301,6 +306,7 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser {
}
+ /** {@inheritDoc} */
@Override
public void printSingleLineUsage(Writer w, ResourceBundle rb) {
List<OptionHandler> options = getOptions();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java
index 74bab2d2ed..0e5b0f5b16 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java
@@ -56,7 +56,8 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Custom argument handler {@link ObjectId} from string values.
+ * Custom argument handler {@link org.eclipse.jgit.lib.ObjectId} from string
+ * values.
* <p>
* Assumes the parser has been initialized with a Repository.
*/
@@ -69,8 +70,11 @@ public class ObjectIdHandler extends OptionHandler<ObjectId> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public ObjectIdHandler(final CmdLineParser parser, final OptionDef option,
final Setter<? super ObjectId> setter) {
@@ -78,6 +82,7 @@ public class ObjectIdHandler extends OptionHandler<ObjectId> {
clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
final String name = params.getParameter(0);
@@ -96,6 +101,7 @@ public class ObjectIdHandler extends OptionHandler<ObjectId> {
CLIText.format(CLIText.get().notAnObject), name);
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_object;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java
index 3de7a81091..7d7c806507 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java
@@ -19,15 +19,21 @@ import org.kohsuke.args4j.spi.Setter;
public class OptionWithValuesListHandler extends OptionHandler<List<?>> {
/**
+ * Constructor for OptionWithValuesListHandler.
+ *
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public OptionWithValuesListHandler(CmdLineParser parser,
OptionDef option, Setter<List<?>> setter) {
super(parser, option, setter);
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(Parameters params) throws CmdLineException {
final List<String> list = new ArrayList<>();
@@ -44,6 +50,7 @@ public class OptionWithValuesListHandler extends OptionHandler<List<?>> {
return list.size();
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_values;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
index b873c3dc2c..1a6b65625d 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java
@@ -59,10 +59,11 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Create a {@link TreeFilter} to patch math names.
+ * Create a {@link org.eclipse.jgit.treewalk.filter.TreeFilter} to patch math
+ * names.
* <p>
* This handler consumes all arguments to the end of the command line, and is
- * meant to be used on an {@link Option} of name "--".
+ * meant to be used on an {@link org.kohsuke.args4j.Option} of name "--".
*/
public class PathTreeFilterHandler extends OptionHandler<TreeFilter> {
/**
@@ -71,14 +72,18 @@ public class PathTreeFilterHandler extends OptionHandler<TreeFilter> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public PathTreeFilterHandler(final CmdLineParser parser,
final OptionDef option, final Setter<? super TreeFilter> setter) {
super(parser, option, setter);
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
final List<PathFilter> filters = new ArrayList<>();
@@ -102,6 +107,7 @@ public class PathTreeFilterHandler extends OptionHandler<TreeFilter> {
return filters.size();
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_paths;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java
index f50c7aded7..dd8520af74 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java
@@ -53,7 +53,8 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Custom argument handler {@link RefSpec} from string values.
+ * Custom argument handler {@link org.eclipse.jgit.transport.RefSpec} from
+ * string values.
* <p>
* Assumes the parser has been initialized with a Repository.
*/
@@ -64,20 +65,25 @@ public class RefSpecHandler extends OptionHandler<RefSpec> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public RefSpecHandler(final CmdLineParser parser, final OptionDef option,
final Setter<? super RefSpec> setter) {
super(parser, option, setter);
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
setter.addValue(new RefSpec(params.getParameter(0)));
return 1;
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_refspec;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
index 27555e3442..d2fa764326 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
@@ -60,7 +60,8 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Custom argument handler {@link RevCommit} from string values.
+ * Custom argument handler {@link org.eclipse.jgit.revwalk.RevCommit} from
+ * string values.
* <p>
* Assumes the parser has been initialized with a Repository.
*/
@@ -73,8 +74,11 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public RevCommitHandler(final CmdLineParser parser, final OptionDef option,
final Setter<? super RevCommit> setter) {
@@ -82,6 +86,7 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
String name = params.getParameter(0);
@@ -145,6 +150,7 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
setter.addValue(c);
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_commitish;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
index 15ed5890e9..9444363be0 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
@@ -59,7 +59,8 @@ import org.kohsuke.args4j.spi.Parameters;
import org.kohsuke.args4j.spi.Setter;
/**
- * Custom argument handler {@link RevTree} from string values.
+ * Custom argument handler {@link org.eclipse.jgit.revwalk.RevTree} from string
+ * values.
* <p>
* Assumes the parser has been initialized with a Repository.
*/
@@ -72,8 +73,11 @@ public class RevTreeHandler extends OptionHandler<RevTree> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public RevTreeHandler(final CmdLineParser parser, final OptionDef option,
final Setter<? super RevTree> setter) {
@@ -81,6 +85,7 @@ public class RevTreeHandler extends OptionHandler<RevTree> {
clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
final String name = params.getParameter(0);
@@ -112,6 +117,7 @@ public class RevTreeHandler extends OptionHandler<RevTree> {
return 1;
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_treeish;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java
index ae5263fba7..d60071f178 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java
@@ -57,8 +57,9 @@ import org.kohsuke.args4j.spi.Setter;
/**
* Custom Argument handler for jgit command selection.
* <p>
- * Translates a single argument string to a {@link TextBuiltin} instance which
- * we can execute at runtime with the remaining arguments of the parser.
+ * Translates a single argument string to a
+ * {@link org.eclipse.jgit.pgm.TextBuiltin} instance which we can execute at
+ * runtime with the remaining arguments of the parser.
*/
public class SubcommandHandler extends OptionHandler<TextBuiltin> {
private final org.eclipse.jgit.pgm.opt.CmdLineParser clp;
@@ -69,8 +70,11 @@ public class SubcommandHandler extends OptionHandler<TextBuiltin> {
* This constructor is used only by args4j.
*
* @param parser
+ * a {@link org.kohsuke.args4j.CmdLineParser} object.
* @param option
+ * a {@link org.kohsuke.args4j.OptionDef} object.
* @param setter
+ * a {@link org.kohsuke.args4j.spi.Setter} object.
*/
public SubcommandHandler(final CmdLineParser parser,
final OptionDef option, final Setter<? super TextBuiltin> setter) {
@@ -78,6 +82,7 @@ public class SubcommandHandler extends OptionHandler<TextBuiltin> {
clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser;
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(final Parameters params) throws CmdLineException {
final String name = params.getParameter(0);
@@ -95,6 +100,7 @@ public class SubcommandHandler extends OptionHandler<TextBuiltin> {
return 1;
}
+ /** {@inheritDoc} */
@Override
public String getDefaultMetaVariable() {
return CLIText.get().metaVar_command;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java
index e22b2e49b1..2487a926dc 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java
@@ -71,6 +71,8 @@ import org.kohsuke.args4j.spi.StringOptionHandler;
public class UntrackedFilesHandler extends StringOptionHandler {
/**
+ * <p>Constructor for UntrackedFilesHandler.</p>
+ *
* @param parser
* The parser to which this handler belongs to.
* @param option
@@ -83,6 +85,7 @@ public class UntrackedFilesHandler extends StringOptionHandler {
super(parser, option, setter);
}
+ /** {@inheritDoc} */
@Override
public int parseArguments(Parameters params) throws CmdLineException {
String alias = params.getParameter(-1);