From 0210e0e299bed69176e0a929d0b67f3cf9fb1e37 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 18 Dec 2017 00:18:40 +0100 Subject: [PATCH] Fix javadoc in org.eclipse.jgit annotations and api packages Change-Id: I2761ea91f8dfed16ea54e7a6646af03a30c15ec9 Signed-off-by: Matthias Sohn --- .../eclipse/jgit/annotations/Nullable.java | 1 - .../src/org/eclipse/jgit/api/AddCommand.java | 24 +- .../org/eclipse/jgit/api/AddNoteCommand.java | 14 +- .../org/eclipse/jgit/api/ApplyCommand.java | 9 +- .../src/org/eclipse/jgit/api/ApplyResult.java | 6 +- .../org/eclipse/jgit/api/ArchiveCommand.java | 34 +- .../org/eclipse/jgit/api/BlameCommand.java | 17 +- .../org/eclipse/jgit/api/CheckoutCommand.java | 34 +- .../org/eclipse/jgit/api/CheckoutResult.java | 24 +- .../eclipse/jgit/api/CherryPickCommand.java | 26 +- .../eclipse/jgit/api/CherryPickResult.java | 28 +- .../org/eclipse/jgit/api/CleanCommand.java | 9 +- .../org/eclipse/jgit/api/CloneCommand.java | 44 +- .../org/eclipse/jgit/api/CommitCommand.java | 55 ++- .../eclipse/jgit/api/CreateBranchCommand.java | 25 +- .../eclipse/jgit/api/DeleteBranchCommand.java | 15 +- .../eclipse/jgit/api/DeleteTagCommand.java | 9 +- .../org/eclipse/jgit/api/DescribeCommand.java | 42 +- .../src/org/eclipse/jgit/api/DiffCommand.java | 21 +- .../org/eclipse/jgit/api/FetchCommand.java | 50 +- .../jgit/api/GarbageCollectCommand.java | 13 +- .../src/org/eclipse/jgit/api/Git.java | 445 ++++++++++-------- .../src/org/eclipse/jgit/api/GitCommand.java | 42 +- .../src/org/eclipse/jgit/api/InitCommand.java | 14 +- .../eclipse/jgit/api/ListBranchCommand.java | 6 + .../eclipse/jgit/api/ListNotesCommand.java | 17 +- .../org/eclipse/jgit/api/ListTagCommand.java | 7 +- .../src/org/eclipse/jgit/api/LogCommand.java | 62 ++- .../org/eclipse/jgit/api/LsRemoteCommand.java | 23 +- .../org/eclipse/jgit/api/MergeCommand.java | 36 +- .../src/org/eclipse/jgit/api/MergeResult.java | 51 +- .../org/eclipse/jgit/api/NameRevCommand.java | 24 +- .../src/org/eclipse/jgit/api/PullCommand.java | 54 ++- .../src/org/eclipse/jgit/api/PullResult.java | 13 +- .../src/org/eclipse/jgit/api/PushCommand.java | 71 ++- .../org/eclipse/jgit/api/RebaseCommand.java | 57 ++- .../org/eclipse/jgit/api/RebaseResult.java | 32 +- .../org/eclipse/jgit/api/ReflogCommand.java | 9 +- .../eclipse/jgit/api/RemoteAddCommand.java | 8 +- .../eclipse/jgit/api/RemoteListCommand.java | 10 +- .../eclipse/jgit/api/RemoteRemoveCommand.java | 10 +- .../eclipse/jgit/api/RemoteSetUrlCommand.java | 10 +- .../eclipse/jgit/api/RemoveNoteCommand.java | 17 +- .../eclipse/jgit/api/RenameBranchCommand.java | 23 +- .../org/eclipse/jgit/api/ResetCommand.java | 20 +- .../org/eclipse/jgit/api/RevertCommand.java | 50 +- .../src/org/eclipse/jgit/api/RmCommand.java | 15 +- .../org/eclipse/jgit/api/ShowNoteCommand.java | 13 +- .../eclipse/jgit/api/StashApplyCommand.java | 22 +- .../eclipse/jgit/api/StashCreateCommand.java | 18 +- .../eclipse/jgit/api/StashDropCommand.java | 16 +- .../eclipse/jgit/api/StashListCommand.java | 3 +- .../src/org/eclipse/jgit/api/Status.java | 42 +- .../org/eclipse/jgit/api/StatusCommand.java | 28 +- .../eclipse/jgit/api/SubmoduleAddCommand.java | 16 +- .../jgit/api/SubmoduleInitCommand.java | 8 +- .../jgit/api/SubmoduleStatusCommand.java | 8 +- .../jgit/api/SubmoduleSyncCommand.java | 11 +- .../jgit/api/SubmoduleUpdateCommand.java | 22 +- .../src/org/eclipse/jgit/api/TagCommand.java | 36 +- .../eclipse/jgit/api/TransportCommand.java | 36 +- .../jgit/api/TransportConfigCallback.java | 2 + .../api/errors/AbortedByHookException.java | 7 + .../jgit/api/errors/CanceledException.java | 4 +- .../CannotDeleteCurrentBranchException.java | 4 +- .../api/errors/CheckoutConflictException.java | 7 +- .../errors/ConcurrentRefUpdateException.java | 23 +- .../api/errors/DetachedHeadException.java | 7 + .../jgit/api/errors/EmtpyCommitException.java | 7 + .../api/errors/FilterFailedException.java | 10 + .../jgit/api/errors/GitAPIException.java | 1 - .../errors/InvalidConfigurationException.java | 7 + .../errors/InvalidMergeHeadsException.java | 3 + .../errors/InvalidRebaseStepException.java | 8 + .../api/errors/InvalidRefNameException.java | 7 + .../api/errors/InvalidRemoteException.java | 13 +- .../api/errors/InvalidTagNameException.java | 3 + .../api/errors/JGitInternalException.java | 3 + .../MultipleParentsNotAllowedException.java | 7 + .../api/errors/NoFilepatternException.java | 7 + .../jgit/api/errors/NoHeadException.java | 7 + .../jgit/api/errors/NoMessageException.java | 7 + .../jgit/api/errors/PatchApplyException.java | 8 +- .../jgit/api/errors/PatchFormatException.java | 6 +- .../api/errors/RefAlreadyExistsException.java | 9 +- .../api/errors/RefNotAdvertisedException.java | 3 + .../jgit/api/errors/RefNotFoundException.java | 7 + .../errors/StashApplyFailureException.java | 5 + .../errors/TooLargeObjectInPackException.java | 4 + .../api/errors/TooLargePackException.java | 4 + .../jgit/api/errors/TransportException.java | 4 + .../api/errors/UnmergedPathsException.java | 4 + .../errors/WrongRepositoryStateException.java | 7 + 93 files changed, 1387 insertions(+), 723 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java index 7b9156710..f8a7a366d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/annotations/Nullable.java @@ -89,7 +89,6 @@ import java.lang.annotation.Target; * @see * The checker-framework manual - * * @since 4.2 */ @Documented diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java index 1ed79449e..f0408ab3d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java @@ -91,8 +91,10 @@ public class AddCommand extends GitCommand { private boolean update = false; /** + * Constructor for AddCommand * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public AddCommand(Repository repo) { super(repo); @@ -119,7 +121,10 @@ public class AddCommand extends GitCommand { /** * Allow clients to provide their own implementation of a FileTreeIterator + * * @param f + * a {@link org.eclipse.jgit.treewalk.WorkingTreeIterator} + * object. * @return {@code this} */ public AddCommand setWorkingTreeIterator(WorkingTreeIterator f) { @@ -128,11 +133,11 @@ public class AddCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code Add} command. Each instance of this class should only * be used for one invocation of the command. Don't call this method twice * on an instance. - * - * @return the DirCache after Add */ @Override public DirCache call() throws GitAPIException, NoFilepatternException { @@ -260,17 +265,18 @@ public class AddCommand extends GitCommand { } /** + * Set whether to only match against already tracked files + * * @param update * If set to true, the command only matches {@code filepattern} * against already tracked files in the index rather than the * working tree. That means that it will never stage new files, * but that it will stage modified new contents of tracked files * and that it will remove files from the index if the - * corresponding files in the working tree have been removed. - * In contrast to the git command line a {@code filepattern} must - * exist also if update is set to true as there is no - * concept of a working directory here. - * + * corresponding files in the working tree have been removed. In + * contrast to the git command line a {@code filepattern} must + * exist also if update is set to true as there is no concept of + * a working directory here. * @return {@code this} */ public AddCommand setUpdate(boolean update) { @@ -279,7 +285,9 @@ public class AddCommand extends GitCommand { } /** - * @return is the parameter update is set + * Whether to only match against already tracked files + * + * @return whether to only match against already tracked files */ public boolean isUpdate() { return update; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java index fa88fb78e..f80c8c76e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java @@ -75,12 +75,16 @@ public class AddNoteCommand extends GitCommand { private String notesRef = Constants.R_NOTES_COMMITS; /** + * Constructor for AddNoteCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected AddNoteCommand(Repository repo) { super(repo); } + /** {@inheritDoc} */ @Override public Note call() throws GitAPIException { checkCallable(); @@ -108,6 +112,7 @@ public class AddNoteCommand extends GitCommand { * has a note, the existing note will be replaced. * * @param id + * a {@link org.eclipse.jgit.revwalk.RevObject} * @return {@code this} */ public AddNoteCommand setObjectId(RevObject id) { @@ -117,6 +122,8 @@ public class AddNoteCommand extends GitCommand { } /** + * Set the notes message + * * @param message * the notes message used when adding a note * @return {@code this} @@ -152,12 +159,13 @@ public class AddNoteCommand extends GitCommand { } /** + * Set name of a {@code Ref} to read notes from + * * @param notesRef * the ref to read notes from. Note, the default value of - * {@link Constants#R_NOTES_COMMITS} will be used if nothing is - * set + * {@link org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS} will be + * used if nothing is set * @return {@code this} - * * @see Constants#R_NOTES_COMMITS */ public AddNoteCommand setNotesRef(String notesRef) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java index ba5673d97..cfc55d8cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java @@ -87,6 +87,8 @@ public class ApplyCommand extends GitCommand { } /** + * Set patch + * * @param in * the patch to apply * @return this instance @@ -98,16 +100,13 @@ public class ApplyCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code ApplyCommand} command with all the options and * parameters collected by the setter methods (e.g. * {@link #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. - * - * @return an {@link ApplyResult} object representing the command result - * @throws GitAPIException - * @throws PatchFormatException - * @throws PatchApplyException */ @Override public ApplyResult call() throws GitAPIException, PatchFormatException, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java index 2ef6650e9..60561fce5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyResult.java @@ -47,7 +47,7 @@ import java.util.ArrayList; import java.util.List; /** - * Encapsulates the result of a {@link ApplyCommand} + * Encapsulates the result of a {@link org.eclipse.jgit.api.ApplyCommand} * * @since 2.0 */ @@ -56,6 +56,8 @@ public class ApplyResult { private List updatedFiles = new ArrayList<>(); /** + * Add updated file + * * @param f * an updated file * @return this instance @@ -67,6 +69,8 @@ public class ApplyResult { } /** + * Get updated files + * * @return updated files */ public List getUpdatedFiles() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java index 7ea8e73b3..c29ed0e22 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -70,19 +70,16 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; /** * Create an archive of files from a named tree. *

- * Examples (git is a {@link Git} instance): + * Examples (git is a {@link org.eclipse.jgit.api.Git} instance): *

* Create a tarball from HEAD: * *

  * ArchiveCommand.registerFormat("tar", new TarFormat());
  * try {
- *	git.archive()
- *		.setTree(db.resolve("HEAD"))
- *		.setOutputStream(out)
- *		.call();
+ * 	git.archive().setTree(db.resolve("HEAD")).setOutputStream(out).call();
  * } finally {
- *	ArchiveCommand.unregisterFormat("tar");
+ * 	ArchiveCommand.unregisterFormat("tar");
  * }
  * 
*

@@ -103,7 +100,6 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * * @see Git * documentation about archive - * * @since 3.1 */ public class ArchiveCommand extends GitCommand { @@ -383,7 +379,10 @@ public class ArchiveCommand extends GitCommand { private String suffix; /** + * Constructor for ArchiveCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public ArchiveCommand(Repository repo) { super(repo); @@ -440,9 +439,7 @@ public class ArchiveCommand extends GitCommand { } } - /** - * @return the stream to which the archive has been written - */ + /** {@inheritDoc} */ @Override public OutputStream call() throws GitAPIException { checkCallable(); @@ -456,6 +453,8 @@ public class ArchiveCommand extends GitCommand { } /** + * Set the tag, commit, or tree object to produce an archive for + * * @param tree * the tag, commit, or tree object to produce an archive for * @return this @@ -470,6 +469,8 @@ public class ArchiveCommand extends GitCommand { } /** + * Set string prefixed to filenames in archive + * * @param prefix * string prefixed to filenames in archive (e.g., "master/"). * null means to not use any leading prefix. @@ -502,8 +503,10 @@ public class ArchiveCommand extends GitCommand { } /** + * Set output stream + * * @param out - * the stream to which to write the archive + * the stream to which to write the archive * @return this */ public ArchiveCommand setOutputStream(OutputStream out) { @@ -512,10 +515,11 @@ public class ArchiveCommand extends GitCommand { } /** + * Set archive format + * * @param fmt - * archive format (e.g., "tar" or "zip"). - * null means to choose automatically based on - * the archive filename. + * archive format (e.g., "tar" or "zip"). null means to choose + * automatically based on the archive filename. * @return this */ public ArchiveCommand setFormat(String fmt) { @@ -524,6 +528,8 @@ public class ArchiveCommand extends GitCommand { } /** + * Set archive format options + * * @param options * archive format options (e.g., level=9 for zip compression). * @return this diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java index b1c81ff15..f7576e9e9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java @@ -69,7 +69,8 @@ import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.io.AutoLFInputStream; /** - * Blame command for building a {@link BlameResult} for a file path. + * Blame command for building a {@link org.eclipse.jgit.blame.BlameResult} for a + * file path. */ public class BlameCommand extends GitCommand { @@ -86,7 +87,10 @@ public class BlameCommand extends GitCommand { private Boolean followFileRenames; /** + * Constructor for BlameCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public BlameCommand(Repository repo) { super(repo); @@ -108,6 +112,7 @@ public class BlameCommand extends GitCommand { * Set diff algorithm * * @param diffAlgorithm + * a {@link org.eclipse.jgit.diff.DiffAlgorithm} object. * @return this command */ public BlameCommand setDiffAlgorithm(DiffAlgorithm diffAlgorithm) { @@ -119,6 +124,7 @@ public class BlameCommand extends GitCommand { * Set raw text comparator * * @param textComparator + * a {@link org.eclipse.jgit.diff.RawTextComparator} * @return this command */ public BlameCommand setTextComparator(RawTextComparator textComparator) { @@ -130,6 +136,7 @@ public class BlameCommand extends GitCommand { * Set start commit id * * @param commit + * id of a commit * @return this command */ public BlameCommand setStartCommit(AnyObjectId commit) { @@ -164,7 +171,7 @@ public class BlameCommand extends GitCommand { * most recent commit to stop traversal at. Usually an active * branch tip, tag, or HEAD. * @return {@code this} - * @throws IOException + * @throws java.io.IOException * the repository cannot be read. */ public BlameCommand reverse(AnyObjectId start, AnyObjectId end) @@ -182,7 +189,7 @@ public class BlameCommand extends GitCommand { * most recent commits to stop traversal at. Usually an active * branch tip, tag, or HEAD. * @return {@code this} - * @throws IOException + * @throws java.io.IOException * the repository cannot be read. */ public BlameCommand reverse(AnyObjectId start, Collection end) @@ -193,10 +200,10 @@ public class BlameCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Generate a list of lines with information about when the lines were * introduced into the file path. - * - * @return list of lines */ @Override public BlameResult call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java index db59a9bff..507168816 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -91,7 +91,7 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; /** * Checkout a branch to the working tree. *

- * Examples (git is a {@link Git} instance): + * Examples (git is a {@link org.eclipse.jgit.api.Git} instance): *

* Check out an existing branch: * @@ -126,9 +126,9 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * .setStartPoint("origin/stable").call(); * * - * @see Git documentation about Checkout + * @see Git + * documentation about Checkout */ public class CheckoutCommand extends GitCommand { @@ -183,26 +183,17 @@ public class CheckoutCommand extends GitCommand { private Set actuallyModifiedPaths; /** + * Constructor for CheckoutCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected CheckoutCommand(Repository repo) { super(repo); this.paths = new LinkedList<>(); } - /** - * @throws RefAlreadyExistsException - * when trying to create (without force) a branch with a name - * that already exists - * @throws RefNotFoundException - * if the start point or branch can not be found - * @throws InvalidRefNameException - * if the provided name is null or otherwise - * invalid - * @throws CheckoutConflictException - * if the checkout results in a conflict - * @return the newly created branch - */ + /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException, @@ -418,11 +409,12 @@ public class CheckoutCommand extends GitCommand { /** * Checkout paths into index and working directory, firing a - * {@link WorkingTreeModifiedEvent} if the working tree was modified. + * {@link org.eclipse.jgit.events.WorkingTreeModifiedEvent} if the working + * tree was modified. * * @return this instance - * @throws IOException - * @throws RefNotFoundException + * @throws java.io.IOException + * @throws org.eclipse.jgit.api.errors.RefNotFoundException */ protected CheckoutCommand checkoutPaths() throws IOException, RefNotFoundException { @@ -739,6 +731,8 @@ public class CheckoutCommand extends GitCommand { } /** + *

getResult.

+ * * @return the result, never null */ public CheckoutResult getResult() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java index 2186eb4b5..16f4685bc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutResult.java @@ -46,8 +46,7 @@ import java.util.ArrayList; import java.util.List; /** - * Encapsulates the result of a {@link CheckoutCommand} - * + * Encapsulates the result of a {@link org.eclipse.jgit.api.CheckoutCommand} */ public class CheckoutResult { @@ -168,6 +167,8 @@ public class CheckoutResult { } /** + * Get status + * * @return the status */ public Status getStatus() { @@ -175,33 +176,44 @@ public class CheckoutResult { } /** + * Get list of file that created a checkout conflict + * * @return the list of files that created a checkout conflict, or an empty - * list if {@link #getStatus()} is not {@link Status#CONFLICTS}; + * list if {@link #getStatus()} is not + * {@link org.eclipse.jgit.api.CheckoutResult.Status#CONFLICTS}; */ public List getConflictList() { return conflictList; } /** + * Get the list of files that could not be deleted during checkout + * * @return the list of files that could not be deleted during checkout, or * an empty list if {@link #getStatus()} is not - * {@link Status#NONDELETED}; + * {@link org.eclipse.jgit.api.CheckoutResult.Status#NONDELETED}; */ public List getUndeletedList() { return undeletedList; } /** + * Get the list of files that where modified during checkout + * * @return the list of files that where modified during checkout, or an - * empty list if {@link #getStatus()} is not {@link Status#OK} + * empty list if {@link #getStatus()} is not + * {@link org.eclipse.jgit.api.CheckoutResult.Status#OK} */ public List getModifiedList() { return modifiedList; } /** + * Get the list of files that where removed during checkout + * * @return the list of files that where removed during checkout, or an empty - * list if {@link #getStatus()} is not {@link Status#OK} + * list if {@link #getStatus()} is not + * {@link org.eclipse.jgit.api.CheckoutResult.Status#OK} */ public List getRemovedList() { return removedList; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java index eed7b2a25..771798a50 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -96,25 +96,22 @@ public class CherryPickCommand extends GitCommand { private boolean noCommit = false; /** + * Constructor for CherryPickCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected CherryPickCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code Cherry-Pick} command with all the options and * parameters collected by the setter methods (e.g. {@link #include(Ref)} 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. - * - * @return the result of the cherry-pick - * @throws GitAPIException - * @throws WrongRepositoryStateException - * @throws ConcurrentRefUpdateException - * @throws UnmergedPathsException - * @throws NoMessageException - * @throws NoHeadException */ @Override public CherryPickResult call() throws GitAPIException, NoMessageException, @@ -224,6 +221,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Include a reference to a commit + * * @param commit * a reference to a commit which is cherry-picked to the current * head @@ -236,6 +235,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Include a commit + * * @param commit * the Id of a commit which is cherry-picked to the current head * @return {@code this} @@ -245,6 +246,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Include a commit + * * @param name * a name given to the commit * @param commit @@ -257,6 +260,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Set the name that should be used in the "OURS" place for conflict markers + * * @param ourCommitName * the name that should be used in the "OURS" place for conflict * markers @@ -284,6 +289,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Set the {@code MergeStrategy} + * * @param strategy * The merge strategy to use during this Cherry-pick. * @return {@code this} @@ -295,6 +302,8 @@ public class CherryPickCommand extends GitCommand { } /** + * Set the (1-based) parent number to diff against + * * @param mainlineParentNumber * the (1-based) parent number to diff against. This allows * cherry-picking of merges. @@ -332,6 +341,7 @@ public class CherryPickCommand extends GitCommand { return headName; } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java index b121291fc..ff55aebd9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java @@ -46,12 +46,11 @@ import java.util.List; import java.util.Map; import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.merge.ResolveMerger; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; import org.eclipse.jgit.revwalk.RevCommit; /** - * Encapsulates the result of a {@link CherryPickCommand}. + * Encapsulates the result of a {@link org.eclipse.jgit.api.CherryPickCommand}. */ public class CherryPickResult { @@ -91,6 +90,8 @@ public class CherryPickResult { private final Map failingPaths; /** + * Constructor for CherryPickResult + * * @param newHead * commit the head points at after this cherry-pick * @param cherryPickedRefs @@ -104,9 +105,12 @@ public class CherryPickResult { } /** + * Constructor for CherryPickResult + * * @param failingPaths * list of paths causing this cherry-pick to fail (see - * {@link ResolveMerger#getFailingPaths()} for details) + * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()} + * for details) */ public CherryPickResult(Map failingPaths) { this.status = CherryPickStatus.FAILED; @@ -130,6 +134,8 @@ public class CherryPickResult { CherryPickStatus.CONFLICTING); /** + * Get status + * * @return the status this cherry-pick resulted in */ public CherryPickStatus getStatus() { @@ -137,28 +143,34 @@ public class CherryPickResult { } /** + * Get the new head after this cherry-pick + * * @return the commit the head points at after this cherry-pick, * null if {@link #getStatus} is not - * {@link CherryPickStatus#OK} + * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#OK} */ public RevCommit getNewHead() { return newHead; } /** + * Get the cherry-picked {@code Ref}s + * * @return the list of successfully cherry-picked Ref's, * null if {@link #getStatus} is not - * {@link CherryPickStatus#OK} + * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#OK} */ public List getCherryPickedRefs() { return cherryPickedRefs; } /** + * Get the list of paths causing this cherry-pick to fail + * * @return the list of paths causing this cherry-pick to fail (see - * {@link ResolveMerger#getFailingPaths()} for details), - * null if {@link #getStatus} is not - * {@link CherryPickStatus#FAILED} + * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()} + * for details), null if {@link #getStatus} is not + * {@link org.eclipse.jgit.api.CherryPickResult.CherryPickStatus#FAILED} */ public Map getFailingPaths() { return failingPaths; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java index e41a03b81..c81425067 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java @@ -79,21 +79,22 @@ public class CleanCommand extends GitCommand> { private boolean force = false; /** + * Constructor for CleanCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected CleanCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code clean} command with all the options and parameters * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) - * - * @return a set of strings representing each file cleaned. - * @throws GitAPIException - * @throws NoWorkTreeException */ @Override public Set call() throws NoWorkTreeException, GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index cd099aa64..1601a5dfc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -167,6 +167,8 @@ public class CloneCommand extends TransportCommand { } /** + * {@inheritDoc} + *

* Executes the {@code Clone} command. * * The Git instance returned by this command needs to be closed by the @@ -174,11 +176,6 @@ public class CloneCommand extends TransportCommand { * instance. It is recommended to call this method as soon as you don't need * a reference to this {@link Git} instance and the underlying * {@link Repository} instance anymore. - * - * @return the newly created {@code Git} object with associated repository - * @throws InvalidRemoteException - * @throws org.eclipse.jgit.api.errors.TransportException - * @throws GitAPIException */ @Override public Git call() throws GitAPIException, InvalidRemoteException, @@ -450,9 +447,11 @@ public class CloneCommand extends TransportCommand { } /** + * Set the URI to clone from + * * @param uri - * the URI to clone from, or {@code null} to unset the URI. - * The URI must be set before {@link #call} is called. + * the URI to clone from, or {@code null} to unset the URI. The + * URI must be set before {@link #call} is called. * @return this instance */ public CloneCommand setURI(String uri) { @@ -465,12 +464,11 @@ public class CloneCommand extends TransportCommand { * directory isn't set, a name associated with the source uri will be used. * * @see URIish#getHumanishName() - * * @param directory * the directory to clone to, or {@code null} if the directory * name should be taken from the source uri * @return this instance - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both @@ -483,11 +481,13 @@ public class CloneCommand extends TransportCommand { } /** + * Set the repository meta directory (.git) + * * @param gitDir * the repository meta directory, or {@code null} to choose one * automatically at clone time * @return this instance - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both @@ -501,10 +501,12 @@ public class CloneCommand extends TransportCommand { } /** + * Set whether the cloned repository shall be bare + * * @param bare * whether the cloned repository is bare or not * @return this instance - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both @@ -536,13 +538,15 @@ public class CloneCommand extends TransportCommand { } /** + * Set the initial branch + * * @param branch * the initial branch to check out when cloning the repository. * Can be specified as ref name (refs/heads/master), - * branch name (master) or tag name (v1.2.3). - * The default is to use the branch pointed to by the cloned - * repository's HEAD and can be requested by passing {@code null} - * or HEAD. + * branch name (master) or tag name + * (v1.2.3). The default is to use the branch + * pointed to by the cloned repository's HEAD and can be + * requested by passing {@code null} or HEAD. * @return this instance */ public CloneCommand setBranch(String branch) { @@ -558,8 +562,8 @@ public class CloneCommand extends TransportCommand { * this is set to NullProgressMonitor * * @see NullProgressMonitor - * * @param monitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} * @return {@code this} */ public CloneCommand setProgressMonitor(ProgressMonitor monitor) { @@ -571,6 +575,8 @@ public class CloneCommand extends TransportCommand { } /** + * Set whether all branches have to be fetched + * * @param cloneAllBranches * true when all branches have to be fetched (indicates wildcard * in created fetch refspec), false otherwise. @@ -582,6 +588,8 @@ public class CloneCommand extends TransportCommand { } /** + * Set whether to clone submodules + * * @param cloneSubmodules * true to initialize and update submodules. Ignored when * {@link #setBare(boolean)} is set to true. @@ -593,6 +601,8 @@ public class CloneCommand extends TransportCommand { } /** + * Set branches to clone + * * @param branchesToClone * collection of branches to clone. Ignored when allSelected is * true. Must be specified as full ref names (e.g. @@ -605,6 +615,8 @@ public class CloneCommand extends TransportCommand { } /** + * Set whether to skip checking out a branch + * * @param noCheckout * if set to true no branch will be checked out * after the clone. This enhances performance of the clone diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java index e29fc0546..8a89ba161 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java @@ -140,33 +140,22 @@ public class CommitCommand extends GitCommand { private Boolean allowEmpty; /** + * Constructor for CommitCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected CommitCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code commit} command with all the options and parameters * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) - * - * @return a {@link RevCommit} object representing the successful commit. - * @throws NoHeadException - * when called on a git repo without a HEAD reference - * @throws NoMessageException - * when called without specifying a commit message - * @throws UnmergedPathsException - * when the current index contained unmerged paths (conflicts) - * @throws ConcurrentRefUpdateException - * when HEAD or branch ref is updated concurrently by someone - * else - * @throws WrongRepositoryStateException - * when repository is not in the right state for committing - * @throws AbortedByHookException - * if there are either pre-commit or commit-msg hooks present in - * the repository and one of them rejects the commit. */ @Override public RevCommit call() throws GitAPIException, NoHeadException, @@ -602,6 +591,8 @@ public class CommitCommand extends GitCommand { } /** + * Set the commit message + * * @param message * the commit message used for the {@code commit} * @return {@code this} @@ -613,6 +604,8 @@ public class CommitCommand extends GitCommand { } /** + * Set whether to allow to create an empty commit + * * @param allowEmpty * whether it should be allowed to create a commit which has the * same tree as it's sole predecessor (a commit which doesn't @@ -623,8 +616,9 @@ public class CommitCommand extends GitCommand { *

* By default when creating a commit containing only specified * paths an attempt to create an empty commit leads to a - * {@link JGitInternalException}. By setting this flag to - * true this exception will not be thrown. + * {@link org.eclipse.jgit.api.errors.JGitInternalException}. By + * setting this flag to true this exception will not + * be thrown. * @return {@code this} * @since 4.2 */ @@ -634,6 +628,8 @@ public class CommitCommand extends GitCommand { } /** + * Get the commit message + * * @return the commit message used for the commit */ public String getMessage() { @@ -673,10 +669,12 @@ public class CommitCommand extends GitCommand { } /** + * Get the committer + * * @return the committer used for the {@code commit}. If no committer was * specified {@code null} is returned and the default - * {@link PersonIdent} of this repo is used during execution of the - * command + * {@link org.eclipse.jgit.lib.PersonIdent} of this repo is used + * during execution of the command */ public PersonIdent getCommitter() { return committer; @@ -715,10 +713,12 @@ public class CommitCommand extends GitCommand { } /** + * Get the author + * * @return the author used for the {@code commit}. If no author was * specified {@code null} is returned and the default - * {@link PersonIdent} of this repo is used during execution of the - * command + * {@link org.eclipse.jgit.lib.PersonIdent} of this repo is used + * during execution of the command */ public PersonIdent getAuthor() { return author; @@ -730,6 +730,8 @@ public class CommitCommand extends GitCommand { * not affected. This corresponds to the parameter -a on the command line. * * @param all + * whether to auto-stage all files that have been modified and + * deleted * @return {@code this} * @throws JGitInternalException * in case of an illegal combination of arguments/ options @@ -745,11 +747,12 @@ public class CommitCommand extends GitCommand { } /** - * Used to amend the tip of the current branch. If set to true, the previous - * commit will be amended. This is equivalent to --amend on the command - * line. + * Used to amend the tip of the current branch. If set to {@code true}, the + * previous commit will be amended. This is equivalent to --amend on the + * command line. * * @param amend + * whether to ammend the tip of the current branch * @return {@code this} */ public CommitCommand setAmend(boolean amend) { @@ -790,7 +793,7 @@ public class CommitCommand extends GitCommand { * will be replaced by the change id. * * @param insertChangeId - * + * whether to insert a change id * @return {@code this} */ public CommitCommand setInsertChangeId(boolean insertChangeId) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java index 39420d0ee..29baf4cd6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java @@ -103,23 +103,16 @@ public class CreateBranchCommand extends GitCommand { } /** + * Constructor for CreateBranchCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected CreateBranchCommand(Repository repo) { super(repo); } - /** - * @throws RefAlreadyExistsException - * when trying to create (without force) a branch with a name - * that already exists - * @throws RefNotFoundException - * if the start point can not be found - * @throws InvalidRefNameException - * if the provided name is null or otherwise - * invalid - * @return the newly created branch - */ + /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException { @@ -297,6 +290,8 @@ public class CreateBranchCommand extends GitCommand { } /** + * Set the name of the new branch + * * @param name * the name of the new branch * @return this instance @@ -308,6 +303,8 @@ public class CreateBranchCommand extends GitCommand { } /** + * Set whether to create the branch forcefully + * * @param force * if true and the branch with the given name * already exists, the start-point of an existing branch will be @@ -322,6 +319,8 @@ public class CreateBranchCommand extends GitCommand { } /** + * Set the start point + * * @param startPoint * corresponds to the start-point option; if null, * the current HEAD will be used @@ -335,6 +334,8 @@ public class CreateBranchCommand extends GitCommand { } /** + * Set the start point + * * @param startPoint * corresponds to the start-point option; if null, * the current HEAD will be used @@ -348,6 +349,8 @@ public class CreateBranchCommand extends GitCommand { } /** + * Set the upstream mode + * * @param mode * corresponds to the --track/--no-track/--set-upstream options; * may be null diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java index d7e7e5c29..31e7281d6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java @@ -84,19 +84,16 @@ public class DeleteBranchCommand extends GitCommand> { private boolean force; /** + * Constructor for DeleteBranchCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected DeleteBranchCommand(Repository repo) { super(repo); } - /** - * @throws NotMergedException - * when trying to delete a branch which has not been merged into - * the currently checked out branch without force - * @throws CannotDeleteCurrentBranchException - * @return the list with the (full) names of the deleted branches - */ + /** {@inheritDoc} */ @Override public List call() throws GitAPIException, NotMergedException, CannotDeleteCurrentBranchException { @@ -181,6 +178,8 @@ public class DeleteBranchCommand extends GitCommand> { } /** + * Set the names of the branches to delete + * * @param branchnames * the names of the branches to delete; if not set, this will do * nothing; invalid branch names will simply be ignored @@ -195,6 +194,8 @@ public class DeleteBranchCommand extends GitCommand> { } /** + * Set whether to forcefully delete branches + * * @param force * true corresponds to the -D option, * false to the -d option (default)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java index 77e353999..63a090caf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java @@ -71,15 +71,16 @@ public class DeleteTagCommand extends GitCommand> { private final Set tags = new HashSet<>(); /** + * Constructor for DeleteTagCommand + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected DeleteTagCommand(Repository repo) { super(repo); } - /** - * @return the list with the full names of the deleted tags - */ + /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); @@ -124,6 +125,8 @@ public class DeleteTagCommand extends GitCommand> { } /** + * Set names of the tags to delete + * * @param tags * the names of the tags to delete; if not set, this will do * nothing; invalid tag names will simply be ignored diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java index 68b1bd9e2..01fe4aa9e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java @@ -104,8 +104,10 @@ public class DescribeCommand extends GitCommand { private List matchers = new ArrayList<>(); /** + * Constructor for DescribeCommand. * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected DescribeCommand(Repository repo) { super(repo); @@ -123,7 +125,7 @@ public class DescribeCommand extends GitCommand { * the supplied commit does not exist. * @throws IncorrectObjectTypeException * the supplied id is not a commit or an annotated tag. - * @throws IOException + * @throws java.io.IOException * a pack file or loose object could not be read. */ public DescribeCommand setTarget(ObjectId target) throws IOException { @@ -135,14 +137,15 @@ public class DescribeCommand extends GitCommand { * Sets the commit to be described. * * @param rev - * Commit ID, tag, branch, ref, etc. - * See {@link Repository#resolve(String)} for allowed syntax. + * Commit ID, tag, branch, ref, etc. See + * {@link org.eclipse.jgit.lib.Repository#resolve(String)} for + * allowed syntax. * @return {@code this} * @throws IncorrectObjectTypeException * the supplied id is not a commit or an annotated tag. - * @throws RefNotFoundException - * the given rev didn't resolve to any object. - * @throws IOException + * @throws org.eclipse.jgit.api.errors.RefNotFoundException + * the given rev didn't resolve to any object. + * @throws java.io.IOException * a pack file or loose object could not be read. */ public DescribeCommand setTarget(String rev) throws IOException, @@ -160,7 +163,6 @@ public class DescribeCommand extends GitCommand { * @param longDesc * true if always the long format should be used. * @return {@code this} - * * @see Git documentation about describe @@ -180,15 +182,17 @@ public class DescribeCommand extends GitCommand { } /** - * Sets one or more {@code glob(7)} patterns that tags must match to be considered. - * If multiple patterns are provided, tags only need match one of them. + * Sets one or more {@code glob(7)} patterns that tags must match to be + * considered. If multiple patterns are provided, tags only need match one + * of them. * - * @param patterns the {@code glob(7)} pattern or patterns + * @param patterns + * the {@code glob(7)} pattern or patterns * @return {@code this} - * @throws InvalidPatternException if the pattern passed in was invalid. - * - * @see Git documentation about describe * @since 4.9 */ @@ -229,16 +233,10 @@ public class DescribeCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Describes the specified commit. Target defaults to HEAD if no commit was * set explicitly. - * - * @return if there's a tag that points to the commit being described, this - * tag name is returned. Otherwise additional suffix is added to the - * nearest tag, just like git-describe(1). - *

- * If none of the ancestors of the commit being described has any - * tags at all, then this method returns null, indicating that - * there's no way to describe this tag. */ @Override public String call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java index b137fc53c..4c6f35114 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java @@ -95,19 +95,22 @@ public class DiffCommand extends GitCommand> { private ProgressMonitor monitor = NullProgressMonitor.INSTANCE; /** + * Constructor for DiffCommand + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected DiffCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code Diff} command with all the options and parameters * collected by the setter methods (e.g. {@link #setCached(boolean)} 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. - * - * @return a DiffEntry for each path which is different */ @Override public List call() throws GitAPIException { @@ -162,9 +165,10 @@ public class DiffCommand extends GitCommand> { } /** + * Whether to view the changes staged for the next commit * * @param cached - * whether to view the changes you staged for the next commit + * whether to view the changes staged for the next commit * @return this instance */ public DiffCommand setCached(boolean cached) { @@ -173,6 +177,8 @@ public class DiffCommand extends GitCommand> { } /** + * Set path filter + * * @param pathFilter * parameter, used to limit the diff to the named path * @return this instance @@ -183,6 +189,8 @@ public class DiffCommand extends GitCommand> { } /** + * Set old tree + * * @param oldTree * the previous state * @return this instance @@ -193,6 +201,8 @@ public class DiffCommand extends GitCommand> { } /** + * Set new tree + * * @param newTree * the updated state * @return this instance @@ -203,6 +213,8 @@ public class DiffCommand extends GitCommand> { } /** + * Set whether to return only names and status of changed files + * * @param showNameAndStatusOnly * whether to return only names and status of changed files * @return this instance @@ -213,6 +225,8 @@ public class DiffCommand extends GitCommand> { } /** + * Set output stream + * * @param out * the stream to write line data * @return this instance @@ -263,7 +277,6 @@ public class DiffCommand extends GitCommand> { * is set to NullProgressMonitor * * @see NullProgressMonitor - * * @param monitor * a progress monitor * @return this instance diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java index 5270283ed..b2c28dab0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java @@ -122,7 +122,10 @@ public class FetchCommand extends TransportCommand { } /** + * Constructor for FetchCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected FetchCommand(Repository repo) { super(repo); @@ -210,17 +213,12 @@ public class FetchCommand extends TransportCommand { } /** - * Executes the {@code fetch} command with all the options and parameters + * {@inheritDoc} + *

+ * Execute the {@code fetch} command with all the options and parameters * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) - * - * @return a {@link FetchResult} object representing the successful fetch - * result - * @throws InvalidRemoteException - * when called with an invalid remote uri - * @throws org.eclipse.jgit.api.errors.TransportException - * when an error occurs during transport */ @Override public FetchResult call() throws GitAPIException, InvalidRemoteException, @@ -288,6 +286,7 @@ public class FetchCommand extends TransportCommand { * * @see Constants#DEFAULT_REMOTE_NAME * @param remote + * name of a remote * @return {@code this} */ public FetchCommand setRemote(String remote) { @@ -297,6 +296,8 @@ public class FetchCommand extends TransportCommand { } /** + * Get the remote + * * @return the remote used for the remote operation */ public String getRemote() { @@ -304,6 +305,8 @@ public class FetchCommand extends TransportCommand { } /** + * Get timeout + * * @return the timeout used for the fetch operation */ public int getTimeout() { @@ -311,16 +314,19 @@ public class FetchCommand extends TransportCommand { } /** - * @return whether to check received objects checked for validity + * Whether to check received objects for validity + * + * @return whether to check received objects for validity */ public boolean isCheckFetchedObjects() { return checkFetchedObjects; } /** - * If set to true, objects received will be checked for validity + * If set to {@code true}, objects received will be checked for validity * * @param checkFetchedObjects + * whether to check objects for validity * @return {@code this} */ public FetchCommand setCheckFetchedObjects(boolean checkFetchedObjects) { @@ -330,7 +336,9 @@ public class FetchCommand extends TransportCommand { } /** - * @return whether or not to remove refs which no longer exist in the source + * Whether to remove refs which no longer exist in the source + * + * @return whether to remove refs which no longer exist in the source */ public boolean isRemoveDeletedRefs() { if (removeDeletedRefs != null) @@ -347,9 +355,11 @@ public class FetchCommand extends TransportCommand { } /** - * If set to true, refs are removed which no longer exist in the source + * If set to {@code true}, refs are removed which no longer exist in the + * source * * @param removeDeletedRefs + * whether to remove deleted {@code Ref}s * @return {@code this} */ public FetchCommand setRemoveDeletedRefs(boolean removeDeletedRefs) { @@ -359,6 +369,8 @@ public class FetchCommand extends TransportCommand { } /** + * Get progress monitor + * * @return the progress monitor for the fetch operation */ public ProgressMonitor getProgressMonitor() { @@ -370,8 +382,8 @@ public class FetchCommand extends TransportCommand { * this is set to NullProgressMonitor * * @see NullProgressMonitor - * * @param monitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} * @return {@code this} */ public FetchCommand setProgressMonitor(ProgressMonitor monitor) { @@ -384,6 +396,8 @@ public class FetchCommand extends TransportCommand { } /** + * Get list of {@code RefSpec}s + * * @return the ref specs */ public List getRefSpecs() { @@ -394,6 +408,7 @@ public class FetchCommand extends TransportCommand { * The ref specs to be used in the fetch operation * * @param specs + * String representation of {@code RefSpec}s * @return {@code this} * @since 4.9 */ @@ -406,6 +421,7 @@ public class FetchCommand extends TransportCommand { * The ref specs to be used in the fetch operation * * @param specs + * one or multiple {@link org.eclipse.jgit.transport.RefSpec}s * @return {@code this} */ public FetchCommand setRefSpecs(RefSpec... specs) { @@ -416,6 +432,7 @@ public class FetchCommand extends TransportCommand { * The ref specs to be used in the fetch operation * * @param specs + * list of {@link org.eclipse.jgit.transport.RefSpec}s * @return {@code this} */ public FetchCommand setRefSpecs(List specs) { @@ -426,6 +443,8 @@ public class FetchCommand extends TransportCommand { } /** + * Whether to do a dry run + * * @return the dry run preference for the fetch operation */ public boolean isDryRun() { @@ -436,6 +455,7 @@ public class FetchCommand extends TransportCommand { * Sets whether the fetch operation should be a dry run * * @param dryRun + * whether to do a dry run * @return {@code this} */ public FetchCommand setDryRun(boolean dryRun) { @@ -445,6 +465,8 @@ public class FetchCommand extends TransportCommand { } /** + * Get thin-pack preference + * * @return the thin-pack preference for fetch operation */ public boolean isThin() { @@ -457,6 +479,7 @@ public class FetchCommand extends TransportCommand { * Default setting is Transport.DEFAULT_FETCH_THIN * * @param thin + * the thin-pack preference * @return {@code this} */ public FetchCommand setThin(boolean thin) { @@ -469,6 +492,7 @@ public class FetchCommand extends TransportCommand { * Sets the specification of annotated tag behavior during fetch * * @param tagOpt + * the {@link org.eclipse.jgit.transport.TagOpt} * @return {@code this} */ public FetchCommand setTagOpt(TagOpt tagOpt) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java index 0f38db53b..7ea277157 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java @@ -61,7 +61,6 @@ import org.eclipse.jgit.lib.ProgressMonitor; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.StoredConfig; import org.eclipse.jgit.storage.pack.PackConfig; -import org.eclipse.jgit.util.GitDateParser; /** * A class used to execute a {@code gc} command. It has setters for all @@ -97,7 +96,10 @@ public class GarbageCollectCommand extends GitCommand { private PackConfig pconfig; /** + * Constructor for GarbageCollectCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected GarbageCollectCommand(Repository repo) { super(repo); @@ -105,6 +107,8 @@ public class GarbageCollectCommand extends GitCommand { } /** + * Set progress monitor + * * @param monitor * a progress monitor * @return this instance @@ -118,8 +122,8 @@ public class GarbageCollectCommand extends GitCommand { * During gc() or prune() each unreferenced, loose object which has been * created or modified after expire will not be pruned. Only * older objects may be pruned. If set to null then every object is a - * candidate for pruning. Use {@link GitDateParser} to parse time formats - * used by git gc. + * candidate for pruning. Use {@link org.eclipse.jgit.util.GitDateParser} to + * parse time formats used by git gc. * * @param expire * minimal age of objects to be pruned. @@ -191,6 +195,7 @@ public class GarbageCollectCommand extends GitCommand { return this; } + /** {@inheritDoc} */ @Override public Properties call() throws GitAPIException { checkCallable(); @@ -229,7 +234,7 @@ public class GarbageCollectCommand extends GitCommand { * Computes and returns the repository statistics. * * @return the repository statistics - * @throws GitAPIException + * @throws org.eclipse.jgit.api.errors.GitAPIException * thrown if the repository statistics cannot be computed * @since 3.0 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java index 96995693a..516620b43 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java @@ -89,25 +89,30 @@ public class Git implements AutoCloseable { private final boolean closeRepo; /** + * Open repository + * * @param dir * the repository to open. May be either the GIT_DIR, or the * working tree directory that contains {@code .git}. - * @return a {@link Git} object for the existing git repository - * @throws IOException + * @return a {@link org.eclipse.jgit.api.Git} object for the existing git + * repository + * @throws java.io.IOException */ public static Git open(File dir) throws IOException { return open(dir, FS.DETECTED); } /** + * Open repository + * * @param dir * the repository to open. May be either the GIT_DIR, or the * working tree directory that contains {@code .git}. * @param fs * filesystem abstraction to use when accessing the repository. - * @return a {@link Git} object for the existing git repository. Closing this - * instance will close the repo. - * @throws IOException + * @return a {@link org.eclipse.jgit.api.Git} object for the existing git + * repository. Closing this instance will close the repo. + * @throws java.io.IOException */ public static Git open(File dir, FS fs) throws IOException { RepositoryCache.FileKey key; @@ -119,31 +124,36 @@ public class Git implements AutoCloseable { } /** + * Wrap repository + * * @param repo * the git repository this class is interacting with; * {@code null} is not allowed. - * @return a {@link Git} object for the existing git repository. The caller is - * responsible for closing the repository; {@link #close()} on this - * instance does not close the repo. + * @return a {@link org.eclipse.jgit.api.Git} object for the existing git + * repository. The caller is responsible for closing the repository; + * {@link #close()} on this instance does not close the repo. */ public static Git wrap(Repository repo) { return new Git(repo); } /** - * Frees resources associated with this instance. + * {@inheritDoc} + *

+ * Free resources associated with this instance. *

- * If the repository was opened by a static factory method in this class, then - * this method calls {@link Repository#close()} on the underlying repository - * instance. (Whether this actually releases underlying resources, such as - * file handles, may vary; see {@link Repository} for more details.) + * If the repository was opened by a static factory method in this class, + * then this method calls {@link Repository#close()} on the underlying + * repository instance. (Whether this actually releases underlying + * resources, such as file handles, may vary; see {@link Repository} for + * more details.) *

- * If the repository was created by a caller and passed into {@link - * #Git(Repository)} or a static factory method in this class, then this - * method does not call close on the underlying repository. + * If the repository was created by a caller and passed into + * {@link #Git(Repository)} or a static factory method in this class, then + * this method does not call close on the underlying repository. *

- * In all cases, after calling this method you should not use this {@link Git} - * instance anymore. + * In all cases, after calling this method you should not use this + * {@link Git} instance anymore. * * @since 3.2 */ @@ -154,23 +164,23 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to execute a {@code clone} command + * Return a command object to execute a {@code clone} command * - * @see Git documentation about clone - * @return a {@link CloneCommand} used to collect all optional parameters - * and to finally execute the {@code clone} command + * @return a {@link org.eclipse.jgit.api.CloneCommand} used to collect all + * optional parameters and to finally execute the {@code clone} + * command */ public static CloneCommand cloneRepository() { return new CloneCommand(); } /** - * Returns a command to list remote branches/tags without a local - * repository. + * Return a command to list remote branches/tags without a local repository. * - * @return a {@link LsRemoteCommand} + * @return a {@link org.eclipse.jgit.api.LsRemoteCommand} * @since 3.1 */ public static LsRemoteCommand lsRemoteRepository() { @@ -178,24 +188,25 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to execute a {@code init} command + * Return a command object to execute a {@code init} command * - * @see Git documentation about init - * @return a {@link InitCommand} used to collect all optional parameters and - * to finally execute the {@code init} command + * @see Git + * documentation about init + * @return a {@link org.eclipse.jgit.api.InitCommand} used to collect all + * optional parameters and to finally execute the {@code init} + * command */ public static InitCommand init() { return new InitCommand(); } /** - * Constructs a new {@link Git} object which can interact with the specified - * git repository. + * Construct a new {@link org.eclipse.jgit.api.Git} object which can + * interact with the specified git repository. *

- * All command classes returned by methods of this class will always interact - * with this git repository. + * All command classes returned by methods of this class will always + * interact with this git repository. *

* The caller is responsible for closing the repository; {@link #close()} on * this instance does not close the repo. @@ -216,75 +227,78 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to execute a {@code Commit} command + * Return a command object to execute a {@code Commit} command * - * @see Git documentation about Commit - * @return a {@link CommitCommand} used to collect all optional parameters - * and to finally execute the {@code Commit} command + * @return a {@link org.eclipse.jgit.api.CommitCommand} used to collect all + * optional parameters and to finally execute the {@code Commit} + * command */ public CommitCommand commit() { return new CommitCommand(repo); } /** - * Returns a command object to execute a {@code Log} command + * Return a command object to execute a {@code Log} command * - * @see Git documentation about Log - * @return a {@link LogCommand} used to collect all optional parameters and - * to finally execute the {@code Log} command + * @see Git + * documentation about Log + * @return a {@link org.eclipse.jgit.api.LogCommand} used to collect all + * optional parameters and to finally execute the {@code Log} + * command */ public LogCommand log() { return new LogCommand(repo); } /** - * Returns a command object to execute a {@code Merge} command + * Return a command object to execute a {@code Merge} command * - * @see Git documentation about Merge - * @return a {@link MergeCommand} used to collect all optional parameters - * and to finally execute the {@code Merge} command + * @return a {@link org.eclipse.jgit.api.MergeCommand} used to collect all + * optional parameters and to finally execute the {@code Merge} + * command */ public MergeCommand merge() { return new MergeCommand(repo); } /** - * Returns a command object to execute a {@code Pull} command + * Return a command object to execute a {@code Pull} command * - * @return a {@link PullCommand} + * @return a {@link org.eclipse.jgit.api.PullCommand} */ public PullCommand pull() { return new PullCommand(repo); } /** - * Returns a command object used to create branches + * Return a command object used to create branches * - * @return a {@link CreateBranchCommand} + * @return a {@link org.eclipse.jgit.api.CreateBranchCommand} */ public CreateBranchCommand branchCreate() { return new CreateBranchCommand(repo); } /** - * Returns a command object used to delete branches + * Return a command object used to delete branches * - * @return a {@link DeleteBranchCommand} + * @return a {@link org.eclipse.jgit.api.DeleteBranchCommand} */ public DeleteBranchCommand branchDelete() { return new DeleteBranchCommand(repo); } /** - * Returns a command object used to list branches + * Return a command object used to list branches * - * @return a {@link ListBranchCommand} + * @return a {@link org.eclipse.jgit.api.ListBranchCommand} */ public ListBranchCommand branchList() { return new ListBranchCommand(repo); @@ -292,170 +306,180 @@ public class Git implements AutoCloseable { /** * - * Returns a command object used to list tags + * Return a command object used to list tags * - * @return a {@link ListTagCommand} + * @return a {@link org.eclipse.jgit.api.ListTagCommand} */ public ListTagCommand tagList() { return new ListTagCommand(repo); } /** - * Returns a command object used to rename branches + * Return a command object used to rename branches * - * @return a {@link RenameBranchCommand} + * @return a {@link org.eclipse.jgit.api.RenameBranchCommand} */ public RenameBranchCommand branchRename() { return new RenameBranchCommand(repo); } /** - * Returns a command object to execute a {@code Add} command + * Return a command object to execute a {@code Add} command * - * @see Git documentation about Add - * @return a {@link AddCommand} used to collect all optional parameters and - * to finally execute the {@code Add} command + * @see Git + * documentation about Add + * @return a {@link org.eclipse.jgit.api.AddCommand} used to collect all + * optional parameters and to finally execute the {@code Add} + * command */ public AddCommand add() { return new AddCommand(repo); } /** - * Returns a command object to execute a {@code Tag} command + * Return a command object to execute a {@code Tag} command * - * @see Git documentation about Tag - * @return a {@link TagCommand} used to collect all optional parameters and - * to finally execute the {@code Tag} command + * @see Git + * documentation about Tag + * @return a {@link org.eclipse.jgit.api.TagCommand} used to collect all + * optional parameters and to finally execute the {@code Tag} + * command */ public TagCommand tag() { return new TagCommand(repo); } /** - * Returns a command object to execute a {@code Fetch} command + * Return a command object to execute a {@code Fetch} command * - * @see Git documentation about Fetch - * @return a {@link FetchCommand} used to collect all optional parameters - * and to finally execute the {@code Fetch} command + * @return a {@link org.eclipse.jgit.api.FetchCommand} used to collect all + * optional parameters and to finally execute the {@code Fetch} + * command */ public FetchCommand fetch() { return new FetchCommand(repo); } /** - * Returns a command object to execute a {@code Push} command + * Return a command object to execute a {@code Push} command * - * @see Git documentation about Push - * @return a {@link PushCommand} used to collect all optional parameters and - * to finally execute the {@code Push} command + * @see Git + * documentation about Push + * @return a {@link org.eclipse.jgit.api.PushCommand} used to collect all + * optional parameters and to finally execute the {@code Push} + * command */ public PushCommand push() { return new PushCommand(repo); } /** - * Returns a command object to execute a {@code cherry-pick} command + * Return a command object to execute a {@code cherry-pick} command * - * @see Git documentation about cherry-pick - * @return a {@link CherryPickCommand} used to collect all optional - * parameters and to finally execute the {@code cherry-pick} command + * @return a {@link org.eclipse.jgit.api.CherryPickCommand} used to collect + * all optional parameters and to finally execute the + * {@code cherry-pick} command */ public CherryPickCommand cherryPick() { return new CherryPickCommand(repo); } /** - * Returns a command object to execute a {@code revert} command + * Return a command object to execute a {@code revert} command * - * @see Git documentation about reverting changes - * @return a {@link RevertCommand} used to collect all optional parameters - * and to finally execute the {@code cherry-pick} command + * @return a {@link org.eclipse.jgit.api.RevertCommand} used to collect all + * optional parameters and to finally execute the + * {@code cherry-pick} command */ public RevertCommand revert() { return new RevertCommand(repo); } /** - * Returns a command object to execute a {@code Rebase} command + * Return a command object to execute a {@code Rebase} command * - * @see Git documentation about rebase - * @return a {@link RebaseCommand} used to collect all optional parameters - * and to finally execute the {@code rebase} command + * @return a {@link org.eclipse.jgit.api.RebaseCommand} used to collect all + * optional parameters and to finally execute the {@code rebase} + * command */ public RebaseCommand rebase() { return new RebaseCommand(repo); } /** - * Returns a command object to execute a {@code rm} command + * Return a command object to execute a {@code rm} command * - * @see Git documentation about rm - * @return a {@link RmCommand} used to collect all optional parameters and - * to finally execute the {@code rm} command + * @see Git + * documentation about rm + * @return a {@link org.eclipse.jgit.api.RmCommand} used to collect all + * optional parameters and to finally execute the {@code rm} command */ public RmCommand rm() { return new RmCommand(repo); } /** - * Returns a command object to execute a {@code checkout} command + * Return a command object to execute a {@code checkout} command * - * @see Git documentation about checkout - * @return a {@link CheckoutCommand} used to collect all optional parameters - * and to finally execute the {@code checkout} command + * @return a {@link org.eclipse.jgit.api.CheckoutCommand} used to collect + * all optional parameters and to finally execute the + * {@code checkout} command */ public CheckoutCommand checkout() { return new CheckoutCommand(repo); } /** - * Returns a command object to execute a {@code reset} command + * Return a command object to execute a {@code reset} command * - * @see Git documentation about reset - * @return a {@link ResetCommand} used to collect all optional parameters - * and to finally execute the {@code reset} command + * @return a {@link org.eclipse.jgit.api.ResetCommand} used to collect all + * optional parameters and to finally execute the {@code reset} + * command */ public ResetCommand reset() { return new ResetCommand(repo); } /** - * Returns a command object to execute a {@code status} command + * Return a command object to execute a {@code status} command * - * @see Git documentation about status - * @return a {@link StatusCommand} used to collect all optional parameters - * and to finally execute the {@code status} command + * @return a {@link org.eclipse.jgit.api.StatusCommand} used to collect all + * optional parameters and to finally execute the {@code status} + * command */ public StatusCommand status() { return new StatusCommand(repo); } /** - * Returns a command to create an archive from a tree + * Return a command to create an archive from a tree * - * @return a {@link ArchiveCommand} + * @return a {@link org.eclipse.jgit.api.ArchiveCommand} * @since 3.1 */ public ArchiveCommand archive() { @@ -463,179 +487,185 @@ public class Git implements AutoCloseable { } /** - * Returns a command to add notes to an object + * Return a command to add notes to an object * - * @return a {@link AddNoteCommand} + * @return a {@link org.eclipse.jgit.api.AddNoteCommand} */ public AddNoteCommand notesAdd() { return new AddNoteCommand(repo); } /** - * Returns a command to remove notes on an object + * Return a command to remove notes on an object * - * @return a {@link RemoveNoteCommand} + * @return a {@link org.eclipse.jgit.api.RemoveNoteCommand} */ public RemoveNoteCommand notesRemove() { return new RemoveNoteCommand(repo); } /** - * Returns a command to list all notes + * Return a command to list all notes * - * @return a {@link ListNotesCommand} + * @return a {@link org.eclipse.jgit.api.ListNotesCommand} */ public ListNotesCommand notesList() { return new ListNotesCommand(repo); } /** - * Returns a command to show notes on an object + * Return a command to show notes on an object * - * @return a {@link ShowNoteCommand} + * @return a {@link org.eclipse.jgit.api.ShowNoteCommand} */ public ShowNoteCommand notesShow() { return new ShowNoteCommand(repo); } /** - * Returns a command object to execute a {@code ls-remote} command + * Return a command object to execute a {@code ls-remote} command * - * @see Git documentation about ls-remote - * @return a {@link LsRemoteCommand} used to collect all optional parameters - * and to finally execute the {@code status} command + * @return a {@link org.eclipse.jgit.api.LsRemoteCommand} used to collect + * all optional parameters and to finally execute the {@code status} + * command */ public LsRemoteCommand lsRemote() { return new LsRemoteCommand(repo); } /** - * Returns a command object to execute a {@code clean} command + * Return a command object to execute a {@code clean} command * - * @see Git documentation about Clean - * @return a {@link CleanCommand} used to collect all optional parameters - * and to finally execute the {@code clean} command + * @return a {@link org.eclipse.jgit.api.CleanCommand} used to collect all + * optional parameters and to finally execute the {@code clean} + * command */ public CleanCommand clean() { return new CleanCommand(repo); } /** - * Returns a command object to execute a {@code blame} command + * Return a command object to execute a {@code blame} command * - * @see Git documentation about Blame - * @return a {@link BlameCommand} used to collect all optional parameters - * and to finally execute the {@code blame} command + * @return a {@link org.eclipse.jgit.api.BlameCommand} used to collect all + * optional parameters and to finally execute the {@code blame} + * command */ public BlameCommand blame() { return new BlameCommand(repo); } /** - * Returns a command object to execute a {@code reflog} command + * Return a command object to execute a {@code reflog} command * - * @see Git documentation about reflog - * @return a {@link ReflogCommand} used to collect all optional parameters - * and to finally execute the {@code reflog} command + * @return a {@link org.eclipse.jgit.api.ReflogCommand} used to collect all + * optional parameters and to finally execute the {@code reflog} + * command */ public ReflogCommand reflog() { return new ReflogCommand(repo); } /** - * Returns a command object to execute a {@code diff} command + * Return a command object to execute a {@code diff} command * - * @see Git documentation about diff - * @return a {@link DiffCommand} used to collect all optional parameters and - * to finally execute the {@code diff} command + * @see Git + * documentation about diff + * @return a {@link org.eclipse.jgit.api.DiffCommand} used to collect all + * optional parameters and to finally execute the {@code diff} + * command */ public DiffCommand diff() { return new DiffCommand(repo); } /** - * Returns a command object used to delete tags + * Return a command object used to delete tags * - * @return a {@link DeleteTagCommand} + * @return a {@link org.eclipse.jgit.api.DeleteTagCommand} */ public DeleteTagCommand tagDelete() { return new DeleteTagCommand(repo); } /** - * Returns a command object to execute a {@code submodule add} command + * Return a command object to execute a {@code submodule add} command * - * @return a {@link SubmoduleAddCommand} used to add a new submodule to a - * parent repository + * @return a {@link org.eclipse.jgit.api.SubmoduleAddCommand} used to add a + * new submodule to a parent repository */ public SubmoduleAddCommand submoduleAdd() { return new SubmoduleAddCommand(repo); } /** - * Returns a command object to execute a {@code submodule init} command + * Return a command object to execute a {@code submodule init} command * - * @return a {@link SubmoduleInitCommand} used to initialize the - * repository's config with settings from the .gitmodules file in - * the working tree + * @return a {@link org.eclipse.jgit.api.SubmoduleInitCommand} used to + * initialize the repository's config with settings from the + * .gitmodules file in the working tree */ public SubmoduleInitCommand submoduleInit() { return new SubmoduleInitCommand(repo); } /** - * Returns a command object to execute a {@code submodule status} command + * Return a command object to execute a {@code submodule status} command * - * @return a {@link SubmoduleStatusCommand} used to report the status of a - * repository's configured submodules + * @return a {@link org.eclipse.jgit.api.SubmoduleStatusCommand} used to + * report the status of a repository's configured submodules */ public SubmoduleStatusCommand submoduleStatus() { return new SubmoduleStatusCommand(repo); } /** - * Returns a command object to execute a {@code submodule sync} command + * Return a command object to execute a {@code submodule sync} command * - * @return a {@link SubmoduleSyncCommand} used to update the URL of a - * submodule from the parent repository's .gitmodules file + * @return a {@link org.eclipse.jgit.api.SubmoduleSyncCommand} used to + * update the URL of a submodule from the parent repository's + * .gitmodules file */ public SubmoduleSyncCommand submoduleSync() { return new SubmoduleSyncCommand(repo); } /** - * Returns a command object to execute a {@code submodule update} command + * Return a command object to execute a {@code submodule update} command * - * @return a {@link SubmoduleUpdateCommand} used to update the submodules in - * a repository to the configured revision + * @return a {@link org.eclipse.jgit.api.SubmoduleUpdateCommand} used to + * update the submodules in a repository to the configured revision */ public SubmoduleUpdateCommand submoduleUpdate() { return new SubmoduleUpdateCommand(repo); } /** - * Returns a command object used to list stashed commits + * Return a command object used to list stashed commits * - * @return a {@link StashListCommand} + * @return a {@link org.eclipse.jgit.api.StashListCommand} */ public StashListCommand stashList() { return new StashListCommand(repo); } /** - * Returns a command object used to create a stashed commit + * Return a command object used to create a stashed commit * - * @return a {@link StashCreateCommand} + * @return a {@link org.eclipse.jgit.api.StashCreateCommand} * @since 2.0 */ public StashCreateCommand stashCreate() { @@ -643,9 +673,9 @@ public class Git implements AutoCloseable { } /** - * Returns a command object used to apply a stashed commit + * Returs a command object used to apply a stashed commit * - * @return a {@link StashApplyCommand} + * @return a {@link org.eclipse.jgit.api.StashApplyCommand} * @since 2.0 */ public StashApplyCommand stashApply() { @@ -653,9 +683,9 @@ public class Git implements AutoCloseable { } /** - * Returns a command object used to drop a stashed commit + * Return a command object used to drop a stashed commit * - * @return a {@link StashDropCommand} + * @return a {@link org.eclipse.jgit.api.StashDropCommand} * @since 2.0 */ public StashDropCommand stashDrop() { @@ -663,14 +693,14 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to execute a {@code apply} command + * Return a command object to execute a {@code apply} command * - * @see Git documentation about apply - * - * @return a {@link ApplyCommand} used to collect all optional parameters - * and to finally execute the {@code apply} command + * @return a {@link org.eclipse.jgit.api.ApplyCommand} used to collect all + * optional parameters and to finally execute the {@code apply} + * command * @since 2.0 */ public ApplyCommand apply() { @@ -678,14 +708,14 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to execute a {@code gc} command - * - * @see Git documentation about gc + * Return a command object to execute a {@code gc} command * - * @return a {@link GarbageCollectCommand} used to collect all optional - * parameters and to finally execute the {@code gc} command + * @see Git + * documentation about gc + * @return a {@link org.eclipse.jgit.api.GarbageCollectCommand} used to + * collect all optional parameters and to finally execute the + * {@code gc} command * @since 2.2 */ public GarbageCollectCommand gc() { @@ -693,9 +723,9 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to find human-readable names of revisions. + * Return a command object to find human-readable names of revisions. * - * @return a {@link NameRevCommand}. + * @return a {@link org.eclipse.jgit.api.NameRevCommand}. * @since 3.0 */ public NameRevCommand nameRev() { @@ -703,10 +733,10 @@ public class Git implements AutoCloseable { } /** - * Returns a command object to come up with a short name that describes a + * Return a command object to come up with a short name that describes a * commit in terms of the nearest git tag. * - * @return a {@link DescribeCommand}. + * @return a {@link org.eclipse.jgit.api.DescribeCommand}. * @since 3.2 */ public DescribeCommand describe() { @@ -716,7 +746,7 @@ public class Git implements AutoCloseable { /** * Return a command used to list the available remotes. * - * @return a {@link RemoteListCommand} + * @return a {@link org.eclipse.jgit.api.RemoteListCommand} * @since 4.2 */ public RemoteListCommand remoteList() { @@ -726,7 +756,7 @@ public class Git implements AutoCloseable { /** * Return a command used to add a new remote. * - * @return a {@link RemoteAddCommand} + * @return a {@link org.eclipse.jgit.api.RemoteAddCommand} * @since 4.2 */ public RemoteAddCommand remoteAdd() { @@ -736,7 +766,7 @@ public class Git implements AutoCloseable { /** * Return a command used to remove an existing remote. * - * @return a {@link RemoteRemoveCommand} + * @return a {@link org.eclipse.jgit.api.RemoteRemoveCommand} * @since 4.2 */ public RemoteRemoveCommand remoteRemove() { @@ -746,7 +776,7 @@ public class Git implements AutoCloseable { /** * Return a command used to change the URL of an existing remote. * - * @return a {@link RemoteSetUrlCommand} + * @return a {@link org.eclipse.jgit.api.RemoteSetUrlCommand} * @since 4.2 */ public RemoteSetUrlCommand remoteSetUrl() { @@ -754,6 +784,8 @@ public class Git implements AutoCloseable { } /** + * Get repository + * * @return the git repository this class is interacting with; see * {@link #close()} for notes on closing this repository. */ @@ -761,6 +793,7 @@ public class Git implements AutoCloseable { return repo; } + /** {@inheritDoc} */ @Override public String toString() { return "Git[" + repo + "]"; //$NON-NLS-1$//$NON-NLS-2$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java index 2a23408b5..ee7d75cf9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java @@ -48,18 +48,20 @@ import org.eclipse.jgit.lib.Repository; /** * Common superclass of all commands in the package {@code org.eclipse.jgit.api} *

- * This class ensures that all commands fulfill the {@link Callable} interface. - * It also has a property {@link #repo} holding a reference to the git - * {@link Repository} this command should work with. + * This class ensures that all commands fulfill the + * {@link java.util.concurrent.Callable} interface. It also has a property + * {@link #repo} holding a reference to the git + * {@link org.eclipse.jgit.lib.Repository} this command should work with. *

* Finally this class stores a state telling whether it is allowed to call - * {@link #call()} on this instance. Instances of {@link GitCommand} can only be - * used for one single successful call to {@link #call()}. Afterwards this - * instance may not be used anymore to set/modify any properties or to call - * {@link #call()} again. This is achieved by setting the {@link #callable} - * property to false after the successful execution of {@link #call()} and to - * check the state (by calling {@link #checkCallable()}) before setting of - * properties and inside {@link #call()}. + * {@link #call()} on this instance. Instances of + * {@link org.eclipse.jgit.api.GitCommand} can only be used for one single + * successful call to {@link #call()}. Afterwards this instance may not be used + * anymore to set/modify any properties or to call {@link #call()} again. This + * is achieved by setting the {@link #callable} property to false after the + * successful execution of {@link #call()} and to check the state (by calling + * {@link #checkCallable()}) before setting of properties and inside + * {@link #call()}. * * @param * the return type which is expected from {@link #call()} @@ -78,14 +80,18 @@ public abstract class GitCommand implements Callable { * Creates a new command which interacts with a single repository * * @param repo - * the {@link Repository} this command should interact with + * the {@link org.eclipse.jgit.lib.Repository} this command + * should interact with */ protected GitCommand(Repository repo) { this.repo = repo; } /** - * @return the {@link Repository} this command is interacting with + * Get repository this command is working on + * + * @return the {@link org.eclipse.jgit.lib.Repository} this command is + * interacting with */ public Repository getRepository() { return repo; @@ -106,9 +112,9 @@ public abstract class GitCommand implements Callable { /** * Checks that the property {@link #callable} is {@code true}. If not then - * an {@link IllegalStateException} is thrown + * an {@link java.lang.IllegalStateException} is thrown * - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * when this method is called and the property {@link #callable} * is {@code false} */ @@ -120,11 +126,9 @@ public abstract class GitCommand implements Callable { } /** - * Executes the command - * - * @return T a result. Each command has its own return type - * @throws GitAPIException - * or subclass thereof when an error occurs + * {@inheritDoc} + *

+ * Execute the command */ @Override public abstract T call() throws GitAPIException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java index 649484cf6..293d63f5c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java @@ -69,9 +69,9 @@ public class InitCommand implements Callable { private boolean bare; /** + * {@inheritDoc} + *

* Executes the {@code Init} command. - * - * @return the newly created {@code Git} object with associated repository */ @Override public Git call() throws GitAPIException { @@ -127,7 +127,7 @@ public class InitCommand implements Callable { * @param directory * the directory to init to * @return this instance - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both @@ -141,10 +141,12 @@ public class InitCommand implements Callable { } /** + * Set the repository meta directory (.git) + * * @param gitDir * the repository meta directory * @return this instance - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both @@ -176,9 +178,11 @@ public class InitCommand implements Callable { } /** + * Set whether the repository is bare or not + * * @param bare * whether the repository is bare or not - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java index 961eeaadd..cdae782c6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java @@ -95,12 +95,16 @@ public class ListBranchCommand extends GitCommand> { } /** + * Constructor for ListBranchCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected ListBranchCommand(Repository repo) { super(repo); } + /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); @@ -154,6 +158,8 @@ public class ListBranchCommand extends GitCommand> { } /** + * Set the list mode + * * @param listMode * optional: corresponds to the -r/-a options; by default, only * local branches will be listed diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java index 476c10bdb..41691fbfc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java @@ -68,15 +68,16 @@ public class ListNotesCommand extends GitCommand> { private String notesRef = Constants.R_NOTES_COMMITS; /** + * Constructor for ListNotesCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected ListNotesCommand(Repository repo) { super(repo); } - /** - * @return the requested notes - */ + /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); @@ -101,12 +102,14 @@ public class ListNotesCommand extends GitCommand> { } /** + * Set the {@code Ref} to read notes from + * * @param notesRef - * the ref to read notes from. Note, the default value of - * {@link Constants#R_NOTES_COMMITS} will be used if nothing is - * set + * the name of the {@code Ref} to read notes from. Note, the + * default value of + * {@link org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS} will be + * used if nothing is set * @return {@code this} - * * @see Constants#R_NOTES_COMMITS */ public ListNotesCommand setNotesRef(String notesRef) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java index d649a53db..9161211d7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java @@ -65,15 +65,16 @@ import org.eclipse.jgit.revwalk.RevWalk; public class ListTagCommand extends GitCommand> { /** + * Constructor for ListTagCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected ListTagCommand(Repository repo) { super(repo); } - /** - * @return the tags available - */ + /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java index f8fe95a88..fd6c1fa1b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java @@ -78,7 +78,7 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter; * to finally execute the command. Each instance of this class should only be * used for one invocation of the command (means: one call to {@link #call()}) *

- * Examples (git is a {@link Git} instance): + * Examples (git is a {@link org.eclipse.jgit.api.Git} instance): *

* Get newest 10 commits, starting from the current branch: * @@ -114,7 +114,10 @@ public class LogCommand extends GitCommand> { private int skip = -1; /** + * Constructor for LogCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected LogCommand(Repository repo) { super(repo); @@ -122,15 +125,13 @@ public class LogCommand extends GitCommand> { } /** + * {@inheritDoc} + *

* Executes the {@code Log} command with all the options and parameters * collected by the setter methods (e.g. {@link #add(AnyObjectId)}, * {@link #not(AnyObjectId)}, ..) 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. - * - * @return an iteration over RevCommits - * @throws NoHeadException - * of the references ref cannot be resolved */ @Override public Iterable call() throws GitAPIException, NoHeadException { @@ -174,23 +175,26 @@ public class LogCommand extends GitCommand> { * * @see RevWalk#markStart(RevCommit) * @param start + * the id of the commit to start from * @return {@code this} - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * the commit supplied is not available from the object * database. This usually indicates the supplied commit is * invalid, but the reference was constructed during an earlier - * invocation to {@link RevWalk#lookupCommit(AnyObjectId)}. - * @throws IncorrectObjectTypeException + * invocation to + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. + * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * the object was not parsed yet and it was discovered during * parsing that it is not actually a commit. This usually * indicates the caller supplied a non-commit SHA-1 to - * {@link RevWalk#lookupCommit(AnyObjectId)}. + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. Expect only + * {@link java.lang.Exception#getCause()}. Expect only * {@code IOException's} to be wrapped. Subclasses of - * {@link IOException} (e.g. {@link MissingObjectException}) are + * {@link java.io.IOException} (e.g. + * {@link org.eclipse.jgit.errors.MissingObjectException}) are * typically not wrapped here but thrown as original exception */ public LogCommand add(AnyObjectId start) throws MissingObjectException, @@ -202,23 +206,26 @@ public class LogCommand extends GitCommand> { * Same as {@code --not start}, or {@code ^start} * * @param start + * a {@link org.eclipse.jgit.lib.AnyObjectId} * @return {@code this} - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * the commit supplied is not available from the object * database. This usually indicates the supplied commit is * invalid, but the reference was constructed during an earlier - * invocation to {@link RevWalk#lookupCommit(AnyObjectId)}. - * @throws IncorrectObjectTypeException + * invocation to + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. + * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * the object was not parsed yet and it was discovered during * parsing that it is not actually a commit. This usually * indicates the caller supplied a non-commit SHA-1 to - * {@link RevWalk#lookupCommit(AnyObjectId)}. + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. Expect only + * {@link java.lang.Exception#getCause()}. Expect only * {@code IOException's} to be wrapped. Subclasses of - * {@link IOException} (e.g. {@link MissingObjectException}) are + * {@link java.io.IOException} (e.g. + * {@link org.eclipse.jgit.errors.MissingObjectException}) are * typically not wrapped here but thrown as original exception */ public LogCommand not(AnyObjectId start) throws MissingObjectException, @@ -230,24 +237,28 @@ public class LogCommand extends GitCommand> { * Adds the range {@code since..until} * * @param since + * a {@link org.eclipse.jgit.lib.AnyObjectId} object. * @param until + * a {@link org.eclipse.jgit.lib.AnyObjectId} object. * @return {@code this} - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * the commit supplied is not available from the object * database. This usually indicates the supplied commit is * invalid, but the reference was constructed during an earlier - * invocation to {@link RevWalk#lookupCommit(AnyObjectId)}. - * @throws IncorrectObjectTypeException + * invocation to + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. + * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * the object was not parsed yet and it was discovered during * parsing that it is not actually a commit. This usually * indicates the caller supplied a non-commit SHA-1 to - * {@link RevWalk#lookupCommit(AnyObjectId)}. + * {@link org.eclipse.jgit.revwalk.RevWalk#lookupCommit(AnyObjectId)}. * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. Expect only + * {@link java.lang.Exception#getCause()}. Expect only * {@code IOException's} to be wrapped. Subclasses of - * {@link IOException} (e.g. {@link MissingObjectException}) are + * {@link java.io.IOException} (e.g. + * {@link org.eclipse.jgit.errors.MissingObjectException}) are * typically not wrapped here but thrown as original exception */ public LogCommand addRange(AnyObjectId since, AnyObjectId until) @@ -260,7 +271,7 @@ public class LogCommand extends GitCommand> { * * @see #add(AnyObjectId) * @return {@code this} - * @throws IOException + * @throws java.io.IOException * the references could not be accessed */ public LogCommand all() throws IOException { @@ -354,8 +365,7 @@ public class LogCommand extends GitCommand> { /** - * Sets a filter for the LogCommand. - * + * Set a filter for the LogCommand. * * @param aFilter * the filter that this instance of LogCommand diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java index 5157a411f..3dcc3a558 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java @@ -83,6 +83,8 @@ public class LsRemoteCommand extends private String uploadPack; /** + * Constructor for LsRemoteCommand + * * @param repo * local repository or null for operation without local * repository @@ -98,6 +100,7 @@ public class LsRemoteCommand extends * * @see Constants#DEFAULT_REMOTE_NAME * @param remote + * a {@link java.lang.String} object. * @return {@code this} */ public LsRemoteCommand setRemote(String remote) { @@ -110,6 +113,7 @@ public class LsRemoteCommand extends * Include refs/heads in references results * * @param heads + * whether to include refs/heads * @return {@code this} */ public LsRemoteCommand setHeads(boolean heads) { @@ -121,6 +125,7 @@ public class LsRemoteCommand extends * Include refs/tags in references results * * @param tags + * whether to include tags * @return {@code this} */ public LsRemoteCommand setTags(boolean tags) { @@ -132,6 +137,8 @@ public class LsRemoteCommand extends * The full path of git-upload-pack on the remote host * * @param uploadPack + * the full path of executable providing the git-upload-pack + * service on remote host * @return {@code this} */ public LsRemoteCommand setUploadPack(String uploadPack) { @@ -140,18 +147,12 @@ public class LsRemoteCommand extends } /** - * Executes the {@code LsRemote} command with all the options and parameters + * {@inheritDoc} + *

+ * Execute the {@code LsRemote} command with all the options and parameters * collected by the setter methods (e.g. {@link #setHeads(boolean)}) 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. - * - * @return a collection of references in the remote repository - * @throws GitAPIException - * or subclass thereof when an error occurs - * @throws InvalidRemoteException - * when called with an invalid remote uri - * @throws org.eclipse.jgit.api.errors.TransportException - * for errors that occurs during transport */ @Override public Collection call() throws GitAPIException, @@ -164,9 +165,9 @@ public class LsRemoteCommand extends * Same as {@link #call()}, but return Map instead of Collection. * * @return a map from names to references in the remote repository - * @throws GitAPIException + * @throws org.eclipse.jgit.api.errors.GitAPIException * or subclass thereof when an error occurs - * @throws InvalidRemoteException + * @throws org.eclipse.jgit.api.errors.InvalidRemoteException * when called with an invalid remote uri * @throws org.eclipse.jgit.api.errors.TransportException * for errors that occurs during transport diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java index 75460fbd1..44ff18fcc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java @@ -211,19 +211,22 @@ public class MergeCommand extends GitCommand { private Boolean commit; /** + * Constructor for MergeCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected MergeCommand(Repository repo) { super(repo); } /** - * Executes the {@code Merge} command with all the options and parameters + * {@inheritDoc} + *

+ * Execute the {@code Merge} command with all the options and parameters * collected by the setter methods (e.g. {@link #include(Ref)}) 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. - * - * @return the result of the merge */ @Override @SuppressWarnings("boxing") @@ -492,9 +495,10 @@ public class MergeCommand extends GitCommand { } /** + * Set merge strategy * * @param mergeStrategy - * the {@link MergeStrategy} to be used + * the {@link org.eclipse.jgit.merge.MergeStrategy} to be used * @return {@code this} */ public MergeCommand setStrategy(MergeStrategy mergeStrategy) { @@ -504,6 +508,8 @@ public class MergeCommand extends GitCommand { } /** + * Reference to a commit to be merged with the current head + * * @param aCommit * a reference to a commit which is merged with the current head * @return {@code this} @@ -515,6 +521,8 @@ public class MergeCommand extends GitCommand { } /** + * Id of a commit which is to be merged with the current head + * * @param aCommit * the Id of a commit which is merged with the current head * @return {@code this} @@ -524,8 +532,10 @@ public class MergeCommand extends GitCommand { } /** + * Include a commit + * * @param name - * a name given to the commit + * a name of a {@code Ref} pointing to the commit * @param aCommit * the Id of a commit which is merged with the current head * @return {@code this} @@ -541,9 +551,10 @@ public class MergeCommand extends GitCommand { * HEAD. Otherwise, perform the merge and commit the result. *

* In case the merge was successful but this flag was set to - * true a {@link MergeResult} with status - * {@link MergeStatus#MERGED_SQUASHED} or - * {@link MergeStatus#FAST_FORWARD_SQUASHED} is returned. + * true a {@link org.eclipse.jgit.api.MergeResult} with status + * {@link org.eclipse.jgit.api.MergeResult.MergeStatus#MERGED_SQUASHED} or + * {@link org.eclipse.jgit.api.MergeResult.MergeStatus#FAST_FORWARD_SQUASHED} + * is returned. * * @param squash * whether to squash commits or not @@ -582,9 +593,11 @@ public class MergeCommand extends GitCommand { * true if this command should commit (this is the * default behavior). false if this command should * not commit. In case the merge was successful but this flag was - * set to false a {@link MergeResult} with type - * {@link MergeResult} with status - * {@link MergeStatus#MERGED_NOT_COMMITTED} is returned + * set to false a + * {@link org.eclipse.jgit.api.MergeResult} with type + * {@link org.eclipse.jgit.api.MergeResult} with status + * {@link org.eclipse.jgit.api.MergeResult.MergeStatus#MERGED_NOT_COMMITTED} + * is returned * @return {@code this} * @since 3.0 */ @@ -612,7 +625,6 @@ public class MergeCommand extends GitCommand { * is set to NullProgressMonitor * * @see NullProgressMonitor - * * @param monitor * A progress monitor * @return this instance diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java index c487ef650..765b3209d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java @@ -53,11 +53,10 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.merge.MergeChunk; import org.eclipse.jgit.merge.MergeChunk.ConflictState; import org.eclipse.jgit.merge.MergeStrategy; -import org.eclipse.jgit.merge.ResolveMerger; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; /** - * Encapsulates the result of a {@link MergeCommand}. + * Encapsulates the result of a {@link org.eclipse.jgit.api.MergeCommand}. */ public class MergeResult { @@ -249,6 +248,8 @@ public class MergeResult { private List checkoutConflicts; /** + * Constructor for MergeResult. + * * @param newHead * the object the head points at after the merge * @param base @@ -260,10 +261,10 @@ public class MergeResult { * @param mergeStatus * the status the merge resulted in * @param mergeStrategy - * the used {@link MergeStrategy} + * the used {@link org.eclipse.jgit.merge.MergeStrategy} * @param lowLevelResults * merge results as returned by - * {@link ResolveMerger#getMergeResults()} + * {@link org.eclipse.jgit.merge.ResolveMerger#getMergeResults()} * @since 2.0 */ public MergeResult(ObjectId newHead, ObjectId base, @@ -275,6 +276,8 @@ public class MergeResult { } /** + * Constructor for MergeResult. + * * @param newHead * the object the head points at after the merge * @param base @@ -286,9 +289,10 @@ public class MergeResult { * @param mergeStatus * the status the merge resulted in * @param mergeStrategy - * the used {@link MergeStrategy} + * the used {@link org.eclipse.jgit.merge.MergeStrategy} * @param lowLevelResults - * merge results as returned by {@link ResolveMerger#getMergeResults()} + * merge results as returned by + * {@link org.eclipse.jgit.merge.ResolveMerger#getMergeResults()} * @param description * a user friendly description of the merge result */ @@ -302,6 +306,8 @@ public class MergeResult { } /** + * Constructor for MergeResult. + * * @param newHead * the object the head points at after the merge * @param base @@ -313,13 +319,13 @@ public class MergeResult { * @param mergeStatus * the status the merge resulted in * @param mergeStrategy - * the used {@link MergeStrategy} + * the used {@link org.eclipse.jgit.merge.MergeStrategy} * @param lowLevelResults * merge results as returned by - * {@link ResolveMerger#getMergeResults()} + * {@link org.eclipse.jgit.merge.ResolveMerger#getMergeResults()} * @param failingPaths * list of paths causing this merge to fail as returned by - * {@link ResolveMerger#getFailingPaths()} + * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()} * @param description * a user friendly description of the merge result */ @@ -354,6 +360,8 @@ public class MergeResult { } /** + * Get the object the head points at after the merge + * * @return the object the head points at after the merge */ public ObjectId getNewHead() { @@ -361,6 +369,8 @@ public class MergeResult { } /** + * Get the merge status + * * @return the status the merge resulted in */ public MergeStatus getMergeStatus() { @@ -368,6 +378,8 @@ public class MergeResult { } /** + * Get the commits which have been merged + * * @return all the commits which have been merged together */ public ObjectId[] getMergedCommits() { @@ -375,6 +387,8 @@ public class MergeResult { } /** + * Get the common base + * * @return base the common base which was used to produce a content-merge. * May be null if the merge-result was produced without * computing a common base @@ -383,6 +397,7 @@ public class MergeResult { return base; } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { @@ -402,6 +417,8 @@ public class MergeResult { } /** + * Set conflicts + * * @param conflicts * the conflicts to set */ @@ -410,7 +427,10 @@ public class MergeResult { } /** + * Add a conflict + * * @param path + * path of the file to add a conflict for * @param conflictingRanges * the conflicts to set */ @@ -421,8 +441,12 @@ public class MergeResult { } /** + * Add a conflict + * * @param path + * path of the file to add a conflict for * @param lowLevelResult + * a {@link org.eclipse.jgit.merge.MergeResult} */ public void addConflict(String path, org.eclipse.jgit.merge.MergeResult lowLevelResult) { if (!lowLevelResult.containsConflicts()) @@ -462,9 +486,10 @@ public class MergeResult { /** * Returns information about the conflicts which occurred during a - * {@link MergeCommand}. The returned value maps the path of a conflicting - * file to a two-dimensional int-array of line-numbers telling where in the - * file conflict markers for which merged commit can be found. + * {@link org.eclipse.jgit.api.MergeCommand}. The returned value maps the + * path of a conflicting file to a two-dimensional int-array of line-numbers + * telling where in the file conflict markers for which merged commit can be + * found. *

* If the returned value contains a mapping "path"->[x][y]=z then this * means @@ -505,7 +530,7 @@ public class MergeResult { /** * Returns a list of paths causing this merge to fail as returned by - * {@link ResolveMerger#getFailingPaths()} + * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()} * * @return the list of paths causing this merge to fail or null * if no failure occurred diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java index 2a86fabed..a9d9759a7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java @@ -57,7 +57,6 @@ import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Ref; -import org.eclipse.jgit.lib.RefDatabase; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.FIFORevQueue; import org.eclipse.jgit.revwalk.RevCommit; @@ -120,6 +119,7 @@ public class NameRevCommand extends GitCommand> { * Create a new name-rev command. * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected NameRevCommand(Repository repo) { super(repo); @@ -134,6 +134,7 @@ public class NameRevCommand extends GitCommand> { }; } + /** {@inheritDoc} */ @Override public Map call() throws GitAPIException { try { @@ -199,13 +200,13 @@ public class NameRevCommand extends GitCommand> { * @param id * object ID to add. * @return {@code this} - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * the object supplied is not available from the object * database. - * @throws JGitInternalException + * @throws org.eclipse.jgit.api.errors.JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. + * {@link java.lang.Exception#getCause()}. */ public NameRevCommand add(ObjectId id) throws MissingObjectException, JGitInternalException { @@ -227,13 +228,13 @@ public class NameRevCommand extends GitCommand> { * @param ids * object IDs to add. * @return {@code this} - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * the object supplied is not available from the object * database. - * @throws JGitInternalException + * @throws org.eclipse.jgit.api.errors.JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. + * {@link java.lang.Exception#getCause()}. */ public NameRevCommand add(Iterable ids) throws MissingObjectException, JGitInternalException { @@ -250,7 +251,8 @@ public class NameRevCommand extends GitCommand> { * prefix added by {@link #addPrefix(String)}. * * @param prefix - * prefix to add; see {@link RefDatabase#getRefs(String)} + * prefix to add; see + * {@link org.eclipse.jgit.lib.RefDatabase#getRefs(String)} * @return {@code this} */ public NameRevCommand addPrefix(String prefix) { @@ -260,8 +262,8 @@ public class NameRevCommand extends GitCommand> { } /** - * Add all annotated tags under {@code refs/tags/} to the set that all results - * must match. + * Add all annotated tags under {@code refs/tags/} to the set that all + * results must match. *

* Calls {@link #addRef(Ref)}; see that method for a note on matching * priority. @@ -270,7 +272,7 @@ public class NameRevCommand extends GitCommand> { * @throws JGitInternalException * a low-level exception of JGit has occurred. The original * exception can be retrieved by calling - * {@link Exception#getCause()}. + * {@link java.lang.Exception#getCause()}. */ public NameRevCommand addAnnotatedTags() { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java index aa97996df..f0ad29db4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java @@ -52,7 +52,6 @@ import org.eclipse.jgit.api.MergeCommand.FastForwardMode; import org.eclipse.jgit.api.MergeCommand.FastForwardMode.Merge; import org.eclipse.jgit.api.RebaseCommand.Operation; import org.eclipse.jgit.api.errors.CanceledException; -import org.eclipse.jgit.api.errors.DetachedHeadException; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.InvalidConfigurationException; import org.eclipse.jgit.api.errors.InvalidRemoteException; @@ -104,13 +103,18 @@ public class PullCommand extends TransportCommand { private FetchRecurseSubmodulesMode submoduleRecurseMode = null; /** + * Constructor for PullCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected PullCommand(Repository repo) { super(repo); } /** + * Set progress monitor + * * @param monitor * a progress monitor * @return this instance @@ -139,6 +143,7 @@ public class PullCommand extends TransportCommand { * branch.[name].rebase and branch.autosetuprebase. * * @param useRebase + * whether to use rebase after fetching * @return {@code this} */ public PullCommand setRebase(boolean useRebase) { @@ -149,7 +154,8 @@ public class PullCommand extends TransportCommand { } /** - * Sets the {@link BranchRebaseMode} to use after fetching. + * Sets the {@link org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode} to + * use after fetching. * *

*
BranchRebaseMode.REBASE
@@ -176,7 +182,8 @@ public class PullCommand extends TransportCommand { * {@code pull.rebase}. * * @param rebaseMode - * the {@link BranchRebaseMode} to use + * the {@link org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode} + * to use * @return {@code this} * @since 4.5 */ @@ -187,23 +194,13 @@ public class PullCommand extends TransportCommand { } /** - * Executes the {@code Pull} command with all the options and parameters + * {@inheritDoc} + *

+ * Execute the {@code Pull} command with all the options and parameters * collected by the setter methods (e.g. * {@link #setProgressMonitor(ProgressMonitor)}) 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. - * - * @return the result of the pull - * @throws WrongRepositoryStateException - * @throws InvalidConfigurationException - * @throws DetachedHeadException - * @throws InvalidRemoteException - * @throws CanceledException - * @throws RefNotFoundException - * @throws RefNotAdvertisedException - * @throws NoHeadException - * @throws org.eclipse.jgit.api.errors.TransportException - * @throws GitAPIException */ @Override public PullResult call() throws GitAPIException, @@ -370,6 +367,7 @@ public class PullCommand extends TransportCommand { * * @see Constants#DEFAULT_REMOTE_NAME * @param remote + * name of the remote to pull from * @return {@code this} * @since 3.3 */ @@ -386,6 +384,7 @@ public class PullCommand extends TransportCommand { * the current branch is used. * * @param remoteBranchName + * remote branch name to be used for pull operation * @return {@code this} * @since 3.3 */ @@ -396,6 +395,8 @@ public class PullCommand extends TransportCommand { } /** + * Get the remote name used for pull operation + * * @return the remote used for the pull operation if it was set explicitly * @since 3.3 */ @@ -404,6 +405,8 @@ public class PullCommand extends TransportCommand { } /** + * Get the remote branch name for the pull operation + * * @return the remote branch name used for the pull operation if it was set * explicitly * @since 3.3 @@ -413,6 +416,8 @@ public class PullCommand extends TransportCommand { } /** + * Set the @{code MergeStrategy} + * * @param strategy * The merge strategy to use during this pull operation. * @return {@code this} @@ -424,9 +429,10 @@ public class PullCommand extends TransportCommand { } /** - * Sets the specification of annotated tag behavior during fetch + * Set the specification of annotated tag behavior during fetch * * @param tagOpt + * the {@link org.eclipse.jgit.transport.TagOpt} * @return {@code this} * @since 4.7 */ @@ -437,8 +443,8 @@ public class PullCommand extends TransportCommand { } /** - * Sets the fast forward mode. It is used if pull is configured to do a - * merge as opposed to rebase. If non-{@code null} takes precedence over the + * Set the fast forward mode. It is used if pull is configured to do a merge + * as opposed to rebase. If non-{@code null} takes precedence over the * fast-forward mode configured in git config. * * @param fastForwardMode @@ -461,6 +467,9 @@ public class PullCommand extends TransportCommand { * Set the mode to be used for recursing into submodules. * * @param recurse + * the + * {@link org.eclipse.jgit.lib.SubmoduleConfig.FetchRecurseSubmodulesMode} + * to be used for recursing into submodules * @return {@code this} * @since 4.7 * @see FetchCommand#setRecurseSubmodules(FetchRecurseSubmodulesMode) @@ -475,13 +484,14 @@ public class PullCommand extends TransportCommand { * Reads the rebase mode to use for a pull command from the repository * configuration. This is the value defined for the configurations * {@code branch.[branchName].rebase}, or,if not set, {@code pull.rebase}. - * If neither is set, yields {@link BranchRebaseMode#NONE}. + * If neither is set, yields + * {@link org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode#NONE}. * * @param branchName * name of the local branch * @param config - * the {@link Config} to read the value from - * @return the {@link BranchRebaseMode} + * the {@link org.eclipse.jgit.lib.Config} to read the value from + * @return the {@link org.eclipse.jgit.lib.BranchConfig.BranchRebaseMode} * @since 4.5 */ public static BranchRebaseMode getRebaseMode(String branchName, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java index c1eb89db7..721008834 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java @@ -45,7 +45,7 @@ package org.eclipse.jgit.api; import org.eclipse.jgit.transport.FetchResult; /** - * Encapsulates the result of a {@link PullCommand} + * Encapsulates the result of a {@link org.eclipse.jgit.api.PullCommand} */ public class PullResult { private final FetchResult fetchResult; @@ -73,6 +73,8 @@ public class PullResult { } /** + * Get fetch result + * * @return the fetch result, or null */ public FetchResult getFetchResult() { @@ -80,6 +82,8 @@ public class PullResult { } /** + * Get merge result + * * @return the merge result, or null */ public MergeResult getMergeResult() { @@ -87,6 +91,8 @@ public class PullResult { } /** + * Get rebase result + * * @return the rebase result, or null */ public RebaseResult getRebaseResult() { @@ -94,6 +100,8 @@ public class PullResult { } /** + * Get name of the remote configuration from which fetch was tried + * * @return the name of the remote configuration from which fetch was tried, * or null */ @@ -102,6 +110,8 @@ public class PullResult { } /** + * Whether the pull was successful + * * @return whether the pull was successful */ public boolean isSuccessful() { @@ -112,6 +122,7 @@ public class PullResult { return true; } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java index bf8884261..e1d99460f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java @@ -105,7 +105,12 @@ public class PushCommand extends private List pushOptions; /** + *

+ * Constructor for PushCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected PushCommand(Repository repo) { super(repo); @@ -114,17 +119,12 @@ public class PushCommand extends } /** - * Executes the {@code push} command with all the options and parameters + * {@inheritDoc} + *

+ * Execute the {@code push} command with all the options and parameters * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) - * - * @return an iteration over {@link PushResult} objects - * @throws InvalidRemoteException - * when called with an invalid remote uri - * @throws org.eclipse.jgit.api.errors.TransportException - * when an error occurs with the transport - * @throws GitAPIException */ @Override public Iterable call() throws GitAPIException, @@ -209,6 +209,7 @@ public class PushCommand extends * * @see Constants#DEFAULT_REMOTE_NAME * @param remote + * the remote name * @return {@code this} */ public PushCommand setRemote(String remote) { @@ -218,6 +219,8 @@ public class PushCommand extends } /** + * Get remote name + * * @return the remote used for the remote operation */ public String getRemote() { @@ -231,6 +234,8 @@ public class PushCommand extends * * @see RemoteConfig#DEFAULT_RECEIVE_PACK * @param receivePack + * name of the remote executable providing the receive-pack + * service * @return {@code this} */ public PushCommand setReceivePack(String receivePack) { @@ -240,6 +245,8 @@ public class PushCommand extends } /** + * Get the name of the remote executable providing the receive-pack service + * * @return the receive-pack used for the remote operation */ public String getReceivePack() { @@ -247,6 +254,8 @@ public class PushCommand extends } /** + * Get timeout used for push operation + * * @return the timeout used for the push operation */ public int getTimeout() { @@ -254,6 +263,8 @@ public class PushCommand extends } /** + * Get the progress monitor + * * @return the progress monitor for the push operation */ public ProgressMonitor getProgressMonitor() { @@ -265,8 +276,8 @@ public class PushCommand extends * is set to NullProgressMonitor * * @see NullProgressMonitor - * * @param monitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} * @return {@code this} */ public PushCommand setProgressMonitor(ProgressMonitor monitor) { @@ -279,7 +290,9 @@ public class PushCommand extends } /** - * @return the ref lease specs + * Get the RefLeaseSpecs. + * + * @return the RefLeaseSpecs * @since 4.7 */ public List getRefLeaseSpecs() { @@ -287,10 +300,11 @@ public class PushCommand extends } /** - * The ref lease specs to be used in the push operation, - * for a force-with-lease push operation. + * The ref lease specs to be used in the push operation, for a + * force-with-lease push operation. * * @param specs + * a {@link org.eclipse.jgit.transport.RefLeaseSpec} object. * @return {@code this} * @since 4.7 */ @@ -299,10 +313,11 @@ public class PushCommand extends } /** - * The ref lease specs to be used in the push operation, - * for a force-with-lease push operation. + * The ref lease specs to be used in the push operation, for a + * force-with-lease push operation. * * @param specs + * list of {@code RefLeaseSpec}s * @return {@code this} * @since 4.7 */ @@ -316,6 +331,9 @@ public class PushCommand extends } /** + * Get RefSpecs. + *

+ * * @return the ref specs */ public List getRefSpecs() { @@ -325,7 +343,7 @@ public class PushCommand extends /** * The ref specs to be used in the push operation * - * @param specs + * @param specs a {@link org.eclipse.jgit.transport.RefSpec} object. * @return {@code this} */ public PushCommand setRefSpecs(RefSpec... specs) { @@ -339,6 +357,7 @@ public class PushCommand extends * The ref specs to be used in the push operation * * @param specs + * list of {@link org.eclipse.jgit.transport.RefSpec}s * @return {@code this} */ public PushCommand setRefSpecs(List specs) { @@ -408,6 +427,8 @@ public class PushCommand extends } /** + * Whether to run the push operation as a dry run + * * @return the dry run preference for the push operation */ public boolean isDryRun() { @@ -417,7 +438,7 @@ public class PushCommand extends /** * Sets whether the push operation should be a dry run * - * @param dryRun + * @param dryRun a boolean. * @return {@code this} */ public PushCommand setDryRun(boolean dryRun) { @@ -427,6 +448,8 @@ public class PushCommand extends } /** + * Get the thin-pack preference + * * @return the thin-pack preference for push operation */ public boolean isThin() { @@ -434,11 +457,12 @@ public class PushCommand extends } /** - * Sets the thin-pack preference for push operation. + * Set the thin-pack preference for push operation. * * Default setting is Transport.DEFAULT_PUSH_THIN * * @param thin + * the thin-pack preference value * @return {@code this} */ public PushCommand setThin(boolean thin) { @@ -448,6 +472,9 @@ public class PushCommand extends } /** + * Whether this push should be executed atomically (all references updated, + * or none) + * * @return true if all-or-nothing behavior is requested. * @since 4.2 */ @@ -461,6 +488,7 @@ public class PushCommand extends * Default setting is false. * * @param atomic + * whether to run the push atomically * @return {@code this} * @since 4.2 */ @@ -471,6 +499,8 @@ public class PushCommand extends } /** + * Whether to push forcefully + * * @return the force preference for push operation */ public boolean isForce() { @@ -481,6 +511,7 @@ public class PushCommand extends * Sets the force preference for push operation. * * @param force + * whether to push forcefully * @return {@code this} */ public PushCommand setForce(boolean force) { @@ -493,6 +524,7 @@ public class PushCommand extends * Sets the output stream to write sideband messages to * * @param out + * an {@link java.io.OutputStream} * @return {@code this} * @since 3.0 */ @@ -502,6 +534,8 @@ public class PushCommand extends } /** + * Get push options + * * @return the option strings associated with the push operation * @since 4.5 */ @@ -510,9 +544,10 @@ public class PushCommand extends } /** - * Sets the option strings associated with the push operation. + * Set the option strings associated with the push operation. * * @param pushOptions + * a {@link java.util.List} of push option strings * @return {@code this} * @since 4.5 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java index 955c50b37..b86a2fdf8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -238,7 +238,12 @@ public class RebaseCommand extends GitCommand { private boolean preserveMerges = false; /** + *

+ * Constructor for RebaseCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RebaseCommand(Repository repo) { super(repo); @@ -247,16 +252,12 @@ public class RebaseCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code Rebase} command with all the options and parameters * collected by the setter methods 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. - * - * @return an object describing the result of this command - * @throws GitAPIException - * @throws WrongRepositoryStateException - * @throws NoHeadException - * @throws RefNotFoundException */ @Override public RebaseResult call() throws GitAPIException, NoHeadException, @@ -1228,12 +1229,14 @@ public class RebaseCommand extends GitCommand { } /** - * checks if we can fast-forward and returns the new head if it is possible + * Check if we can fast-forward and returns the new head if it is possible * * @param newCommit + * a {@link org.eclipse.jgit.revwalk.RevCommit} object to check + * if we can fast-forward to. * @return the new head, or null - * @throws IOException - * @throws GitAPIException + * @throws java.io.IOException + * @throws org.eclipse.jgit.api.errors.GitAPIException */ public RevCommit tryFastForward(RevCommit newCommit) throws IOException, GitAPIException { @@ -1436,6 +1439,8 @@ public class RebaseCommand extends GitCommand { /** + * Set upstream {@code RevCommit} + * * @param upstream * the upstream commit * @return {@code this} @@ -1447,6 +1452,8 @@ public class RebaseCommand extends GitCommand { } /** + * Set the upstream commit + * * @param upstream * id of the upstream commit * @return {@code this} @@ -1464,10 +1471,12 @@ public class RebaseCommand extends GitCommand { } /** + * Set the upstream branch + * * @param upstream - * the upstream branch + * the name of the upstream branch * @return {@code this} - * @throws RefNotFoundException + * @throws org.eclipse.jgit.api.errors.RefNotFoundException */ public RebaseCommand setUpstream(String upstream) throws RefNotFoundException { @@ -1502,6 +1511,8 @@ public class RebaseCommand extends GitCommand { } /** + * Set the operation to execute during rebase + * * @param operation * the operation to perform * @return {@code this} @@ -1512,6 +1523,8 @@ public class RebaseCommand extends GitCommand { } /** + * Set progress monitor + * * @param monitor * a progress monitor * @return this instance @@ -1525,15 +1538,18 @@ public class RebaseCommand extends GitCommand { } /** - * Enables interactive rebase + * Enable interactive rebase *

* Does not stop after initialization of interactive rebase. This is * equivalent to - * {@link RebaseCommand#runInteractively(InteractiveHandler, boolean) + * {@link org.eclipse.jgit.api.RebaseCommand#runInteractively(InteractiveHandler, boolean) * runInteractively(handler, false)}; *

* * @param handler + * the + * {@link org.eclipse.jgit.api.RebaseCommand.InteractiveHandler} + * to use * @return this */ public RebaseCommand runInteractively(InteractiveHandler handler) { @@ -1541,14 +1557,17 @@ public class RebaseCommand extends GitCommand { } /** - * Enables interactive rebase + * Enable interactive rebase *

* If stopAfterRebaseInteractiveInitialization is {@code true} the rebase * stops after initialization of interactive rebase returning - * {@link RebaseResult#INTERACTIVE_PREPARED_RESULT} + * {@link org.eclipse.jgit.api.RebaseResult#INTERACTIVE_PREPARED_RESULT} *

* * @param handler + * the + * {@link org.eclipse.jgit.api.RebaseCommand.InteractiveHandler} + * to use * @param stopAfterRebaseInteractiveInitialization * if {@code true} the rebase stops after initialization * @return this instance @@ -1562,6 +1581,8 @@ public class RebaseCommand extends GitCommand { } /** + * Set the MergeStrategy. + * * @param strategy * The merge strategy to use during this rebase operation. * @return {@code this} @@ -1573,9 +1594,11 @@ public class RebaseCommand extends GitCommand { } /** + * Whether to preserve merges during rebase + * * @param preserve - * True to re-create merges during rebase. Defaults to false, a - * flattening rebase. + * {@code true} to re-create merges during rebase. Defaults to + * {@code false}, a flattening rebase. * @return {@code this} * @since 3.5 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java index 92c1347ab..bad6a7c71 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java @@ -45,12 +45,11 @@ package org.eclipse.jgit.api; import java.util.List; import java.util.Map; -import org.eclipse.jgit.merge.ResolveMerger; import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason; import org.eclipse.jgit.revwalk.RevCommit; /** - * The result of a {@link RebaseCommand} execution + * The result of a {@link org.eclipse.jgit.api.RebaseCommand} execution */ public class RebaseResult { /** @@ -279,6 +278,8 @@ public class RebaseResult { } /** + * Get the status + * * @return the overall status */ public Status getStatus() { @@ -286,33 +287,46 @@ public class RebaseResult { } /** - * @return the current commit if status is {@link Status#STOPPED}, otherwise - * null + * Get the current commit if status is + * {@link org.eclipse.jgit.api.RebaseResult.Status#STOPPED}, otherwise + * null + * + * @return the current commit if status is + * {@link org.eclipse.jgit.api.RebaseResult.Status#STOPPED}, + * otherwise null */ public RevCommit getCurrentCommit() { return currentCommit; } /** + * Get the list of paths causing this rebase to fail + * * @return the list of paths causing this rebase to fail (see - * {@link ResolveMerger#getFailingPaths()} for details) if status is - * {@link Status#FAILED}, otherwise null + * {@link org.eclipse.jgit.merge.ResolveMerger#getFailingPaths()} + * for details) if status is + * {@link org.eclipse.jgit.api.RebaseResult.Status#FAILED}, + * otherwise null */ public Map getFailingPaths() { return failingPaths; } /** - * @return the list of conflicts if status is {@link Status#CONFLICTS} + * Get the list of conflicts + * + * @return the list of conflicts if status is + * {@link org.eclipse.jgit.api.RebaseResult.Status#CONFLICTS} */ public List getConflicts() { return conflicts; } /** - * @return the list of uncommitted changes if status is - * {@link Status#UNCOMMITTED_CHANGES} + *

Getter for the field uncommittedChanges.

* + * @return the list of uncommitted changes if status is + * {@link org.eclipse.jgit.api.RebaseResult.Status#UNCOMMITTED_CHANGES} * @since 3.2 */ public List getUncommittedChanges() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java index 394bea5b6..bf3163aaa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java @@ -67,7 +67,10 @@ public class ReflogCommand extends GitCommand> { private String ref = Constants.HEAD; /** + * Constructor for ReflogCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public ReflogCommand(Repository repo) { super(repo); @@ -78,6 +81,7 @@ public class ReflogCommand extends GitCommand> { * value of HEAD will be used. * * @param ref + * the name of the {@code Ref} to log * @return {@code this} */ public ReflogCommand setRef(String ref) { @@ -87,10 +91,9 @@ public class ReflogCommand extends GitCommand> { } /** + * {@inheritDoc} + *

* Run the reflog command - * - * @throws GitAPIException - * @throws InvalidRefNameException */ @Override public Collection call() throws GitAPIException, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteAddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteAddCommand.java index 679566903..c43c5c6f9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteAddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteAddCommand.java @@ -63,7 +63,6 @@ import org.eclipse.jgit.transport.URIish; * @see Git * documentation about Remote - * * @since 4.2 */ public class RemoteAddCommand extends GitCommand { @@ -73,7 +72,10 @@ public class RemoteAddCommand extends GitCommand { private URIish uri; /** + * Constructor for RemoteAddCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RemoteAddCommand(Repository repo) { super(repo); @@ -100,10 +102,10 @@ public class RemoteAddCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code remote add} command with all the options and * parameters collected by the setter methods of this class. - * - * @return the {@link RemoteConfig} object of the added remote */ @Override public RemoteConfig call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteListCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteListCommand.java index f778eaa28..f96651f89 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteListCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteListCommand.java @@ -59,23 +59,27 @@ import org.eclipse.jgit.transport.RemoteConfig; * @see Git * documentation about Remote - * * @since 4.2 */ public class RemoteListCommand extends GitCommand> { /** + *

+ * Constructor for RemoteListCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RemoteListCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code remote} command with all the options and parameters * collected by the setter methods of this class. - * - * @return a list of {@link RemoteConfig} objects. */ @Override public List call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteRemoveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteRemoveCommand.java index 5782bf61b..7a5885cfd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteRemoveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteRemoveCommand.java @@ -61,7 +61,6 @@ import org.eclipse.jgit.transport.RemoteConfig; * @see Git * documentation about Remote - * * @since 4.2 */ public class RemoteRemoveCommand extends GitCommand { @@ -69,7 +68,12 @@ public class RemoteRemoveCommand extends GitCommand { private String name; /** + *

+ * Constructor for RemoteRemoveCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RemoteRemoveCommand(Repository repo) { super(repo); @@ -86,10 +90,10 @@ public class RemoteRemoveCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code remote} command with all the options and parameters * collected by the setter methods of this class. - * - * @return the {@link RemoteConfig} object of the removed remote */ @Override public RemoteConfig call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteSetUrlCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteSetUrlCommand.java index 6bd2ac799..d7b7a31bd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteSetUrlCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoteSetUrlCommand.java @@ -62,7 +62,6 @@ import org.eclipse.jgit.transport.URIish; * @see Git * documentation about Remote - * * @since 4.2 */ public class RemoteSetUrlCommand extends GitCommand { @@ -74,7 +73,12 @@ public class RemoteSetUrlCommand extends GitCommand { private boolean push; /** + *

+ * Constructor for RemoteSetUrlCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RemoteSetUrlCommand(Repository repo) { super(repo); @@ -112,10 +116,10 @@ public class RemoteSetUrlCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code remote} command with all the options and parameters * collected by the setter methods of this class. - * - * @return the {@link RemoteConfig} object of the modified remote */ @Override public RemoteConfig call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java index fd8aac75b..baae8248f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java @@ -73,12 +73,18 @@ public class RemoveNoteCommand extends GitCommand { private String notesRef = Constants.R_NOTES_COMMITS; /** + *

+ * Constructor for RemoveNoteCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RemoveNoteCommand(Repository repo) { super(repo); } + /** {@inheritDoc} */ @Override public Note call() throws GitAPIException { checkCallable(); @@ -105,6 +111,8 @@ public class RemoveNoteCommand extends GitCommand { * Sets the object id of object you want to remove a note * * @param id + * the {@link org.eclipse.jgit.revwalk.RevObject} to remove a + * note from. * @return {@code this} */ public RemoveNoteCommand setObjectId(RevObject id) { @@ -138,12 +146,13 @@ public class RemoveNoteCommand extends GitCommand { } /** + * Set the name of the Ref to remove a note from. + * * @param notesRef - * the ref to read notes from. Note, the default value of - * {@link Constants#R_NOTES_COMMITS} will be used if nothing is - * set + * the {@code Ref} to read notes from. Note, the default value of + * {@link org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS} will be + * used if nothing is set * @return {@code this} - * * @see Constants#R_NOTES_COMMITS */ public RemoveNoteCommand setNotesRef(String notesRef) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java index ce3a29f36..24d9dd401 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java @@ -77,25 +77,18 @@ public class RenameBranchCommand extends GitCommand { private String newName; /** + *

+ * Constructor for RenameBranchCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RenameBranchCommand(Repository repo) { super(repo); } - /** - * @throws RefNotFoundException - * if the old branch can not be found (branch with provided old - * name does not exist or old name resolves to a tag) - * @throws InvalidRefNameException - * if the provided new name is null or otherwise - * invalid - * @throws RefAlreadyExistsException - * if a branch with the new name already exists - * @throws DetachedHeadException - * if rename is tried without specifying the old name and HEAD - * is detached - */ + /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException, RefAlreadyExistsException, DetachedHeadException { @@ -198,6 +191,8 @@ public class RenameBranchCommand extends GitCommand { } /** + * Set the new name of the branch + * * @param newName * the new name * @return this instance @@ -209,6 +204,8 @@ public class RenameBranchCommand extends GitCommand { } /** + * Set the old name of the branch + * * @param oldName * the name of the branch to rename; if not set, the currently * checked out branch (if any) will be renamed diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java index c5222c2d5..86a69b019 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java @@ -126,20 +126,23 @@ public class ResetCommand extends GitCommand { private boolean isReflogDisabled; /** + *

+ * Constructor for ResetCommand. + *

* * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public ResetCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code Reset} command. Each instance of this class should * only be used for one invocation of the command. Don't call this method * twice on an instance. - * - * @return the Ref after reset - * @throws GitAPIException */ @Override public Ref call() throws GitAPIException, CheckoutConflictException { @@ -258,6 +261,8 @@ public class ResetCommand extends GitCommand { } /** + * Set the name of the Ref to reset to + * * @param ref * the ref to reset to, defaults to HEAD if not specified * @return this instance @@ -268,6 +273,8 @@ public class ResetCommand extends GitCommand { } /** + * Set the reset mode + * * @param mode * the mode of the reset command * @return this instance @@ -282,6 +289,8 @@ public class ResetCommand extends GitCommand { } /** + * Repository relative path of file or directory to reset + * * @param path * repository-relative path of file/directory to reset (with * / as separator) @@ -297,6 +306,8 @@ public class ResetCommand extends GitCommand { } /** + * Whether to disable reflog + * * @param disable * if {@code true} disables writing a reflog entry for this reset * command @@ -309,6 +320,8 @@ public class ResetCommand extends GitCommand { } /** + * Whether reflog is disabled + * * @return {@code true} if writing reflog is disabled for this reset command * @since 4.5 */ @@ -433,6 +446,7 @@ public class ResetCommand extends GitCommand { repo.writeMergeCommitMsg(null); } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java index c3152a93b..fa0d4c488 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java @@ -98,27 +98,24 @@ public class RevertCommand extends GitCommand { private MergeStrategy strategy = MergeStrategy.RECURSIVE; /** + *

+ * Constructor for RevertCommand. + *

+ * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected RevertCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code revert} command with all the options and parameters * collected by the setter methods (e.g. {@link #include(Ref)} 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. - * - * @return on success the {@link RevCommit} pointed to by the new HEAD is - * returned. If a failure occurred during revert null - * is returned. The list of successfully reverted {@link Ref}'s can - * be obtained by calling {@link #getRevertedRefs()} - * @throws GitAPIException - * @throws WrongRepositoryStateException - * @throws ConcurrentRefUpdateException - * @throws UnmergedPathsException - * @throws NoMessageException */ @Override public RevCommit call() throws NoMessageException, UnmergedPathsException, @@ -227,9 +224,10 @@ public class RevertCommand extends GitCommand { } /** + * Include a {@code Ref} to a commit to be reverted + * * @param commit - * a reference to a commit which is reverted into the current - * head + * a reference to a commit to be reverted into the current head * @return {@code this} */ public RevertCommand include(Ref commit) { @@ -239,8 +237,10 @@ public class RevertCommand extends GitCommand { } /** + * Include a commit to be reverted + * * @param commit - * the Id of a commit which is reverted into the current head + * the Id of a commit to be reverted into the current head * @return {@code this} */ public RevertCommand include(AnyObjectId commit) { @@ -248,8 +248,10 @@ public class RevertCommand extends GitCommand { } /** + * Include a commit to be reverted + * * @param name - * a name given to the commit + * name of a {@code Ref} referring to the commit * @param commit * the Id of a commit which is reverted into the current head * @return {@code this} @@ -260,6 +262,8 @@ public class RevertCommand extends GitCommand { } /** + * Set the name to be used in the "OURS" place for conflict markers + * * @param ourCommitName * the name that should be used in the "OURS" place for conflict * markers @@ -280,16 +284,20 @@ public class RevertCommand extends GitCommand { } /** - * @return the list of successfully reverted {@link Ref}'s. Never - * null but maybe an empty list if no commit was - * successfully cherry-picked + * Get the list of successfully reverted {@link org.eclipse.jgit.lib.Ref}'s. + * + * @return the list of successfully reverted + * {@link org.eclipse.jgit.lib.Ref}'s. Never null but + * maybe an empty list if no commit was successfully cherry-picked */ public List getRevertedRefs() { return revertedRefs; } /** - * @return the result of the merge failure, null if no merge + * Get the result of a merge failure + * + * @return the result of a merge failure, null if no merge * failure occurred during the revert */ public MergeResult getFailingResult() { @@ -297,6 +305,8 @@ public class RevertCommand extends GitCommand { } /** + * Get unmerged paths + * * @return the unmerged paths, will be null if no merge conflicts */ public List getUnmergedPaths() { @@ -304,8 +314,10 @@ public class RevertCommand extends GitCommand { } /** + * Set the merge strategy to use for this revert command + * * @param strategy - * The merge strategy to use during this revert command. + * The merge strategy to use for this revert command. * @return {@code this} * @since 3.4 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java index 48c23f59c..088aa15e5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java @@ -72,7 +72,7 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * class should only be used for one invocation of the command (means: one call * to {@link #call()}). *

- * Examples (git is a {@link Git} instance): + * Examples (git is a {@link org.eclipse.jgit.api.Git} instance): *

* Remove file "test.txt" from both index and working directory: * @@ -97,8 +97,10 @@ public class RmCommand extends GitCommand { private boolean cached = false; /** + * Constructor for RmCommand. * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ public RmCommand(Repository repo) { super(repo); @@ -106,6 +108,8 @@ public class RmCommand extends GitCommand { } /** + * Add file name pattern of files to be removed + * * @param filepattern * repository-relative path of file to remove (with * / as separator) @@ -121,8 +125,9 @@ public class RmCommand extends GitCommand { * Only remove the specified files from the index. * * @param cached - * true if files should only be removed from index, false if - * files should also be deleted from the working directory + * {@code true} if files should only be removed from index, + * {@code false} if files should also be deleted from the working + * directory * @return {@code this} * @since 2.2 */ @@ -133,11 +138,11 @@ public class RmCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code Rm} command. Each instance of this class should only * be used for one invocation of the command. Don't call this method twice * on an instance. - * - * @return the DirCache after Rm */ @Override public DirCache call() throws GitAPIException, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java index dbff4636e..eb81d20a5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java @@ -68,12 +68,16 @@ public class ShowNoteCommand extends GitCommand { private String notesRef = Constants.R_NOTES_COMMITS; /** + * Constructor for ShowNoteCommand. + * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} */ protected ShowNoteCommand(Repository repo) { super(repo); } + /** {@inheritDoc} */ @Override public Note call() throws GitAPIException { checkCallable(); @@ -96,6 +100,8 @@ public class ShowNoteCommand extends GitCommand { * Sets the object id of object you want a note on * * @param id + * the {@link org.eclipse.jgit.revwalk.RevObject} to show notes + * for. * @return {@code this} */ public ShowNoteCommand setObjectId(RevObject id) { @@ -105,12 +111,13 @@ public class ShowNoteCommand extends GitCommand { } /** + * Set the {@code Ref} to read notes from. + * * @param notesRef * the ref to read notes from. Note, the default value of - * {@link Constants#R_NOTES_COMMITS} will be used if nothing is - * set + * {@link org.eclipse.jgit.lib.Constants#R_NOTES_COMMITS} will be + * used if nothing is set * @return {@code this} - * * @see Constants#R_NOTES_COMMITS */ public ShowNoteCommand setNotesRef(String notesRef) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java index 08fde70ed..5f7928d4d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java @@ -88,7 +88,6 @@ import org.eclipse.jgit.treewalk.TreeWalk; * * @see Git documentation about Stash - * * @since 2.0 */ public class StashApplyCommand extends GitCommand { @@ -109,6 +108,8 @@ public class StashApplyCommand extends GitCommand { * Create command to apply the changes of a stashed commit * * @param repo + * the {@link org.eclipse.jgit.lib.Repository} to apply the stash + * to */ public StashApplyCommand(final Repository repo) { super(repo); @@ -121,6 +122,7 @@ public class StashApplyCommand extends GitCommand { * unspecified * * @param stashRef + * name of the stash {@code Ref} to apply * @return {@code this} */ public StashApplyCommand setStashRef(final String stashRef) { @@ -129,7 +131,10 @@ public class StashApplyCommand extends GitCommand { } /** + * Whether to ignore the repository state when applying the stash + * * @param willIgnoreRepositoryState + * whether to ignore the repository state when applying the stash * @return {@code this} * @since 3.2 */ @@ -154,14 +159,9 @@ public class StashApplyCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Apply the changes in a stashed commit to the working directory and index - * - * @return id of stashed commit that was applied TODO: Does anyone depend on - * this, or could we make it more like Merge/CherryPick/Revert? - * @throws GitAPIException - * @throws WrongRepositoryStateException - * @throws NoHeadException - * @throws StashApplyFailureException */ @Override public ObjectId call() throws GitAPIException, @@ -273,6 +273,8 @@ public class StashApplyCommand extends GitCommand { } /** + * Whether to restore the index state + * * @param applyIndex * true (default) if the command should restore the index state */ @@ -281,6 +283,8 @@ public class StashApplyCommand extends GitCommand { } /** + * Set the MergeStrategy to use. + * * @param strategy * The merge strategy to use in order to merge during this * command execution. @@ -293,6 +297,8 @@ public class StashApplyCommand extends GitCommand { } /** + * Whether the command should restore untracked files + * * @param applyUntracked * true (default) if the command should restore untracked files * @since 3.4 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java index 77a7fffb7..3495ff8a9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java @@ -115,6 +115,7 @@ public class StashCreateCommand extends GitCommand { * Create a command to stash changes in the working directory and index * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public StashCreateCommand(Repository repo) { super(repo); @@ -128,6 +129,7 @@ public class StashCreateCommand extends GitCommand { * id, and short commit message when used. * * @param message + * the stash message * @return {@code this} */ public StashCreateCommand setIndexMessage(String message) { @@ -142,6 +144,7 @@ public class StashCreateCommand extends GitCommand { * id, and short commit message when used. * * @param message + * the working directory message * @return {@code this} */ public StashCreateCommand setWorkingDirectoryMessage(String message) { @@ -153,6 +156,8 @@ public class StashCreateCommand extends GitCommand { * Set the person to use as the author and committer in the commits made * * @param person + * the {@link org.eclipse.jgit.lib.PersonIdent} of the person who + * creates the stash. * @return {@code this} */ public StashCreateCommand setPerson(PersonIdent person) { @@ -161,12 +166,13 @@ public class StashCreateCommand extends GitCommand { } /** - * Set the reference to update with the stashed commit id - * If null, no reference is updated + * Set the reference to update with the stashed commit id If null, no + * reference is updated *

- * This value defaults to {@link Constants#R_STASH} + * This value defaults to {@link org.eclipse.jgit.lib.Constants#R_STASH} * * @param ref + * the name of the {@code Ref} to update * @return {@code this} */ public StashCreateCommand setRef(String ref) { @@ -178,6 +184,7 @@ public class StashCreateCommand extends GitCommand { * Whether to include untracked files in the stash. * * @param includeUntracked + * whether to include untracked files in the stash * @return {@code this} * @since 3.4 */ @@ -232,11 +239,10 @@ public class StashCreateCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Stash the contents on the working directory and index in separate commits * and reset to the current HEAD commit. - * - * @return stashed commit or null if no changes to stash - * @throws GitAPIException */ @Override public RevCommit call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java index 85e7b3d29..cd8f8e6c9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java @@ -84,7 +84,10 @@ public class StashDropCommand extends GitCommand { private boolean all; /** + * Constructor for StashDropCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public StashDropCommand(Repository repo) { super(repo); @@ -101,6 +104,7 @@ public class StashDropCommand extends GitCommand { * unspecified * * @param stashRef + * the 0-based index of the stash reference * @return {@code this} */ public StashDropCommand setStashRef(final int stashRef) { @@ -112,11 +116,12 @@ public class StashDropCommand extends GitCommand { } /** - * Set wheter drop all stashed commits + * Set whether to drop all stashed commits * * @param all - * true to drop all stashed commits, false to drop only the - * stashed commit set via calling {@link #setStashRef(int)} + * {@code true} to drop all stashed commits, {@code false} to + * drop only the stashed commit set via calling + * {@link #setStashRef(int)} * @return {@code this} */ public StashDropCommand setAll(final boolean all) { @@ -173,11 +178,10 @@ public class StashDropCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Drop the configured entry from the stash reflog and return value of the * stash reference after the drop occurs - * - * @return commit id of stash reference or null if no more stashed changes - * @throws GitAPIException */ @Override public ObjectId call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java index 8420dd228..6451b709f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java @@ -70,12 +70,13 @@ public class StashListCommand extends GitCommand> { /** * Create a new stash list command * - * @param repo + * @param repo a {@link org.eclipse.jgit.lib.Repository} object. */ public StashListCommand(final Repository repo) { super(repo); } + /** {@inheritDoc} */ @Override public Collection call() throws GitAPIException, InvalidRefNameException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java index 5b7c73b47..909a74578 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Status.java @@ -70,7 +70,10 @@ public class Status { private final boolean hasUncommittedChanges; /** + * Constructor for Status. + * * @param diff + * the {@link org.eclipse.jgit.lib.IndexDiff} having the status */ public Status(IndexDiff diff) { super(); @@ -86,16 +89,20 @@ public class Status { } /** - * @return true if no differences exist between the working-tree, the index, - * and the current HEAD, false if differences do exist + * Whether the status is clean + * + * @return {@code true} if no differences exist between the working-tree, + * the index, and the current HEAD, {@code false} if differences do + * exist */ public boolean isClean() { return clean; } /** - * @return true if any tracked file is changed + * Whether there are uncommitted changes * + * @return {@code true} if any tracked file is changed * @since 3.2 */ public boolean hasUncommittedChanges() { @@ -103,14 +110,18 @@ public class Status { } /** + * Get files added to the index + * * @return list of files added to the index, not in HEAD (e.g. what you get - * if you call 'git add ...' on a newly created file) + * if you call {@code git add ...} on a newly created file) */ public Set getAdded() { return Collections.unmodifiableSet(diff.getAdded()); } /** + * Get changed files from HEAD to index + * * @return list of files changed from HEAD to index (e.g. what you get if * you modify an existing file and call 'git add ...' on it) */ @@ -119,6 +130,8 @@ public class Status { } /** + * Get removed files + * * @return list of files removed from index, but in HEAD (e.g. what you get * if you call 'git rm ...' on a existing file) */ @@ -127,6 +140,8 @@ public class Status { } /** + * Get missing files + * * @return list of files in index, but not filesystem (e.g. what you get if * you call 'rm ...' on a existing file) */ @@ -135,6 +150,8 @@ public class Status { } /** + * Get modified files relative to the index + * * @return list of files modified on disk relative to the index (e.g. what * you get if you modify an existing file without adding it to the * index) @@ -144,6 +161,8 @@ public class Status { } /** + * Get untracked files + * * @return list of files that are not ignored, and not in the index. (e.g. * what you get if you create a new file without adding it to the * index) @@ -153,6 +172,8 @@ public class Status { } /** + * Get untracked folders + * * @return set of directories that are not ignored, and not in the index. */ public Set getUntrackedFolders() { @@ -160,6 +181,8 @@ public class Status { } /** + * Get conflicting files + * * @return list of files that are in conflict. (e.g what you get if you * modify file that was modified by someone else in the meantime) */ @@ -168,7 +191,10 @@ public class Status { } /** - * @return a map from conflicting path to its {@link StageState}. + * Get StageState of conflicting files + * + * @return a map from conflicting path to its + * {@link org.eclipse.jgit.lib.IndexDiff.StageState}. * @since 3.0 */ public Map getConflictingStageState() { @@ -176,6 +202,8 @@ public class Status { } /** + * Get ignored files which are not in the index + * * @return set of files and folders that are ignored and not in the index. */ public Set getIgnoredNotInIndex() { @@ -183,9 +211,11 @@ public class Status { } /** + * Get uncommitted changes, i.e. all files changed in the index or working + * tree + * * @return set of files and folders that are known to the repo and changed * either in the index or in the working tree. - * * @since 3.2 */ public Set getUncommittedChanges() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java index 8f7804a00..98c5520e7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java @@ -64,9 +64,9 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * to finally execute the command. Each instance of this class should only be * used for one invocation of the command (means: one call to {@link #call()}) * - * @see Git documentation about Status + * @see Git + * documentation about Status */ public class StatusCommand extends GitCommand { private WorkingTreeIterator workingTreeIt; @@ -76,14 +76,21 @@ public class StatusCommand extends GitCommand { private IgnoreSubmoduleMode ignoreSubmoduleMode = null; /** + * Constructor for StatusCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ protected StatusCommand(Repository repo) { super(repo); } /** + * Whether to ignore submodules + * * @param mode + * the + * {@link org.eclipse.jgit.submodule.SubmoduleWalk.IgnoreSubmoduleMode} * @return {@code this} * @since 3.6 */ @@ -126,13 +133,12 @@ public class StatusCommand extends GitCommand { } /** + * {@inheritDoc} + *

* Executes the {@code Status} command with all the options and parameters * collected by the setter methods 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. - * - * @return a {@link Status} object telling about each path where working - * tree, index or HEAD differ from each other. */ @Override public Status call() throws GitAPIException, NoWorkTreeException { @@ -157,8 +163,9 @@ public class StatusCommand extends GitCommand { } /** - * To set the {@link WorkingTreeIterator} which should be used. If this - * method is not called a standard {@link FileTreeIterator} is used. + * To set the {@link org.eclipse.jgit.treewalk.WorkingTreeIterator} which + * should be used. If this method is not called a standard + * {@link org.eclipse.jgit.treewalk.FileTreeIterator} is used. * * @param workingTreeIt * a working tree iterator @@ -170,10 +177,11 @@ public class StatusCommand extends GitCommand { } /** - * To set the {@link ProgressMonitor} which contains callback methods to - * inform you about the progress of this command. + * To set the {@link org.eclipse.jgit.lib.ProgressMonitor} which contains + * callback methods to inform you about the progress of this command. * * @param progressMonitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} object. * @return {@code this} * @since 3.1 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java index 0519d454e..1aa050f56 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java @@ -69,8 +69,8 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter; * .gitmodules file and the repository config file, and also add the submodule * and .gitmodules file to the index. * - * @see Git documentation about submodules */ public class SubmoduleAddCommand extends @@ -83,7 +83,10 @@ public class SubmoduleAddCommand extends private ProgressMonitor monitor; /** + * Constructor for SubmoduleAddCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public SubmoduleAddCommand(final Repository repo) { super(repo); @@ -105,6 +108,7 @@ public class SubmoduleAddCommand extends * Set URI to clone submodule from * * @param uri + * a {@link java.lang.String} object. * @return this command */ public SubmoduleAddCommand setURI(final String uri) { @@ -118,6 +122,7 @@ public class SubmoduleAddCommand extends * * @see NullProgressMonitor * @param monitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} object. * @return this command */ public SubmoduleAddCommand setProgressMonitor(final ProgressMonitor monitor) { @@ -129,7 +134,7 @@ public class SubmoduleAddCommand extends * Is the configured already a submodule in the index? * * @return true if submodule exists in index, false otherwise - * @throws IOException + * @throws java.io.IOException */ protected boolean submoduleExists() throws IOException { TreeFilter filter = PathFilter.create(path); @@ -139,15 +144,14 @@ public class SubmoduleAddCommand extends } /** + * {@inheritDoc} + *

* Executes the {@code SubmoduleAddCommand} * * The {@code Repository} instance returned by this command needs to be * closed by the caller to free resources held by the {@code Repository} * instance. It is recommended to call this method as soon as you don't need * a reference to this {@code Repository} instance anymore. - * - * @return the newly created {@link Repository} - * @throws GitAPIException */ @Override public Repository call() throws GitAPIException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java index 4c5e317cb..acca02983 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java @@ -63,8 +63,8 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * .gitmodules file to a repository's config file for each submodule not * currently present in the repository's config file. * - * @see Git documentation about submodules */ public class SubmoduleInitCommand extends GitCommand> { @@ -72,7 +72,10 @@ public class SubmoduleInitCommand extends GitCommand> { private final Collection paths; /** + * Constructor for SubmoduleInitCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public SubmoduleInitCommand(final Repository repo) { super(repo); @@ -91,6 +94,7 @@ public class SubmoduleInitCommand extends GitCommand> { return this; } + /** {@inheritDoc} */ @Override public Collection call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java index 8b27e4c41..97ae66807 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java @@ -62,8 +62,8 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; /** * A class used to execute a submodule status command. * - * @see Git documentation about submodules */ public class SubmoduleStatusCommand extends @@ -72,7 +72,10 @@ public class SubmoduleStatusCommand extends private final Collection paths; /** + * Constructor for SubmoduleStatusCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public SubmoduleStatusCommand(final Repository repo) { super(repo); @@ -91,6 +94,7 @@ public class SubmoduleStatusCommand extends return this; } + /** {@inheritDoc} */ @Override public Map call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java index b5c0b1564..d22d820c3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java @@ -65,8 +65,8 @@ import org.eclipse.jgit.treewalk.filter.PathFilterGroup; * This will set the remote URL in a submodule's repository to the current value * in the .gitmodules file. * - * @see Git documentation about submodules */ public class SubmoduleSyncCommand extends GitCommand> { @@ -74,7 +74,10 @@ public class SubmoduleSyncCommand extends GitCommand> { private final Collection paths; /** + * Constructor for SubmoduleSyncCommand. + * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public SubmoduleSyncCommand(final Repository repo) { super(repo); @@ -97,8 +100,9 @@ public class SubmoduleSyncCommand extends GitCommand> { * Get branch that HEAD currently points to * * @param subRepo + * a {@link org.eclipse.jgit.lib.Repository} object. * @return shortened branch name, null on failures - * @throws IOException + * @throws java.io.IOException */ protected String getHeadBranch(final Repository subRepo) throws IOException { Ref head = subRepo.exactRef(Constants.HEAD); @@ -108,6 +112,7 @@ public class SubmoduleSyncCommand extends GitCommand> { return null; } + /** {@inheritDoc} */ @Override public Map call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java index 4faaac2db..4b4e18c13 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java @@ -96,7 +96,12 @@ public class SubmoduleUpdateCommand extends private boolean fetch = false; /** + *

+ * Constructor for SubmoduleUpdateCommand. + *

+ * * @param repo + * a {@link org.eclipse.jgit.lib.Repository} object. */ public SubmoduleUpdateCommand(final Repository repo) { super(repo); @@ -109,6 +114,7 @@ public class SubmoduleUpdateCommand extends * * @see NullProgressMonitor * @param monitor + * a {@link org.eclipse.jgit.lib.ProgressMonitor} object. * @return this command */ public SubmoduleUpdateCommand setProgressMonitor( @@ -122,6 +128,7 @@ public class SubmoduleUpdateCommand extends * is set to false * * @param fetch + * whether to fetch the submodules before we update them * @return this command * @since 4.9 */ @@ -143,18 +150,9 @@ public class SubmoduleUpdateCommand extends } /** - * Execute the SubmoduleUpdateCommand command. + * {@inheritDoc} * - * @return a collection of updated submodule paths - * @throws ConcurrentRefUpdateException - * @throws CheckoutConflictException - * @throws InvalidMergeHeadsException - * @throws InvalidConfigurationException - * @throws NoHeadException - * @throws NoMessageException - * @throws RefNotFoundException - * @throws WrongRepositoryStateException - * @throws GitAPIException + * Execute the SubmoduleUpdateCommand command. */ @Override public Collection call() throws InvalidConfigurationException, @@ -252,6 +250,8 @@ public class SubmoduleUpdateCommand extends } /** + * Setter for the field strategy. + * * @param strategy * The merge strategy to use during this update operation. * @return {@code this} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java index bdbb8620d..c29b753fc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java @@ -68,7 +68,7 @@ import org.eclipse.jgit.revwalk.RevWalk; /** * Create/update an annotated tag object or a simple unannotated tag *

- * Examples (git is a {@link Git} instance): + * Examples (git is a {@link org.eclipse.jgit.api.Git} instance): *

* Create a new tag for the current commit: * @@ -104,21 +104,22 @@ public class TagCommand extends GitCommand { private boolean annotated = true; /** - * @param repo + *

Constructor for TagCommand.

+ * + * @param repo a {@link org.eclipse.jgit.lib.Repository} object. */ protected TagCommand(Repository repo) { super(repo); } /** + * {@inheritDoc} + *

* Executes the {@code tag} command with all the options and parameters * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) * - * @return a {@link Ref} a ref pointing to a tag - * @throws NoHeadException - * when called on a git repo without a HEAD reference * @since 2.0 */ @Override @@ -226,6 +227,8 @@ public class TagCommand extends GitCommand { } /** + * Set the tag name. + * * @param name * the tag name used for the {@code tag} * @return {@code this} @@ -237,6 +240,8 @@ public class TagCommand extends GitCommand { } /** + * Get the tag name. + * * @return the tag name used for the tag */ public String getName() { @@ -244,6 +249,8 @@ public class TagCommand extends GitCommand { } /** + * Get the tag message. + * * @return the tag message used for the tag */ public String getMessage() { @@ -251,6 +258,8 @@ public class TagCommand extends GitCommand { } /** + * Set the tag message. + * * @param message * the tag message used for the {@code tag} * @return {@code this} @@ -262,6 +271,8 @@ public class TagCommand extends GitCommand { } /** + * Whether this tag is signed + * * @return whether the tag is signed */ public boolean isSigned() { @@ -273,6 +284,7 @@ public class TagCommand extends GitCommand { * corresponds to the parameter -s on the command line. * * @param signed + * a boolean. * @return {@code this} */ public TagCommand setSigned(boolean signed) { @@ -285,6 +297,7 @@ public class TagCommand extends GitCommand { * created from the info in the repository. * * @param tagger + * a {@link org.eclipse.jgit.lib.PersonIdent} object. * @return {@code this} */ public TagCommand setTagger(PersonIdent tagger) { @@ -293,6 +306,8 @@ public class TagCommand extends GitCommand { } /** + * Get the tagger who created the tag. + * * @return the tagger of the tag */ public PersonIdent getTagger() { @@ -300,6 +315,8 @@ public class TagCommand extends GitCommand { } /** + * Get the tag's object id + * * @return the object id of the tag */ public RevObject getObjectId() { @@ -311,6 +328,7 @@ public class TagCommand extends GitCommand { * pointed to from HEAD will be used. * * @param id + * a {@link org.eclipse.jgit.revwalk.RevObject} object. * @return {@code this} */ public TagCommand setObjectId(RevObject id) { @@ -319,6 +337,8 @@ public class TagCommand extends GitCommand { } /** + * Whether this is a forced update + * * @return is this a force update */ public boolean isForceUpdate() { @@ -330,6 +350,7 @@ public class TagCommand extends GitCommand { * corresponds to the parameter -f on the command line. * * @param forceUpdate + * whether this is a forced update * @return {@code this} */ public TagCommand setForceUpdate(boolean forceUpdate) { @@ -338,7 +359,10 @@ public class TagCommand extends GitCommand { } /** + * Configure this tag to be created as an annotated tag + * * @param annotated + * whether this shall be an annotated tag * @return {@code this} * @since 3.0 */ @@ -348,6 +372,8 @@ public class TagCommand extends GitCommand { } /** + * Whether this will create an annotated command + * * @return true if this command will create an annotated tag (default is * true) * @since 3.0 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java index 1541df5d3..9032329ce 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java @@ -47,11 +47,12 @@ import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.Transport; /** - * Base class for commands that use a {@link Transport} during execution. + * Base class for commands that use a + * {@link org.eclipse.jgit.transport.Transport} during execution. *

* This class provides standard configuration of a transport for options such as - * a {@link CredentialsProvider}, a timeout, and a - * {@link TransportConfigCallback}. + * a {@link org.eclipse.jgit.transport.CredentialsProvider}, a timeout, and a + * {@link org.eclipse.jgit.api.TransportConfigCallback}. * * @param * @param @@ -75,7 +76,9 @@ public abstract class TransportCommand extends protected TransportConfigCallback transportConfigCallback; /** - * @param repo + *

Constructor for TransportCommand.

+ * + * @param repo a {@link org.eclipse.jgit.lib.Repository} object. */ protected TransportCommand(final Repository repo) { super(repo); @@ -83,8 +86,11 @@ public abstract class TransportCommand extends } /** + * Set the credentialsProvider. + * * @param credentialsProvider - * the {@link CredentialsProvider} to use + * the {@link org.eclipse.jgit.transport.CredentialsProvider} to + * use * @return {@code this} */ public C setCredentialsProvider( @@ -94,6 +100,8 @@ public abstract class TransportCommand extends } /** + * Set timeout. + * * @param timeout * the timeout (in seconds) used for the transport step * @return {@code this} @@ -104,12 +112,15 @@ public abstract class TransportCommand extends } /** + * Set the TransportConfigCallback. + * * @param transportConfigCallback * if set, the callback will be invoked after the - * {@link Transport} has created, but before the - * {@link Transport} is used. The callback can use this - * opportunity to set additional type-specific configuration on - * the {@link Transport} instance. + * {@link org.eclipse.jgit.transport.Transport} has created, but + * before the {@link org.eclipse.jgit.transport.Transport} is + * used. The callback can use this opportunity to set additional + * type-specific configuration on the + * {@link org.eclipse.jgit.transport.Transport} instance. * @return {@code this} */ public C setTransportConfigCallback( @@ -119,6 +130,11 @@ public abstract class TransportCommand extends } /** @return {@code this} */ + /** + * Return this command + * + * @return this command + */ @SuppressWarnings("unchecked") protected final C self() { return (C) this; @@ -129,6 +145,7 @@ public abstract class TransportCommand extends * callback * * @param transport + * a {@link org.eclipse.jgit.transport.Transport} object. * @return {@code this} */ protected C configure(final Transport transport) { @@ -145,6 +162,7 @@ public abstract class TransportCommand extends * {@code this} command * * @param childCommand + * a {@link org.eclipse.jgit.api.TransportCommand} object. * @return {@code this} */ protected C configure(final TransportCommand childCommand) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java index 4faadbadd..f60926c56 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportConfigCallback.java @@ -64,7 +64,9 @@ public interface TransportConfigCallback { /** * Add any additional transport-specific configuration required. + * * @param transport + * a {@link org.eclipse.jgit.transport.Transport} object. */ public void configure(Transport transport); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java index 995611ef0..db6440b55 100755 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/AbortedByHookException.java @@ -67,6 +67,8 @@ public class AbortedByHookException extends GitAPIException { private final int returnCode; /** + * Constructor for AbortedByHookException + * * @param message * The error details. * @param hookName @@ -83,6 +85,8 @@ public class AbortedByHookException extends GitAPIException { } /** + * Get hook name + * * @return the type of the hook that interrupted the git command. */ public String getHookName() { @@ -90,12 +94,15 @@ public class AbortedByHookException extends GitAPIException { } /** + * Get return code + * * @return the hook process result. */ public int getReturnCode() { return returnCode; } + /** {@inheritDoc} */ @Override public String getMessage() { return MessageFormat.format(JGitText.get().commandRejectedByHook, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CanceledException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CanceledException.java index 3ad259783..5f831e420 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CanceledException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CanceledException.java @@ -45,7 +45,9 @@ public class CanceledException extends GitAPIException { private static final long serialVersionUID = 1L; /** - * @param message + *

Constructor for CanceledException.

+ * + * @param message a {@link java.lang.String} object. */ public CanceledException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CannotDeleteCurrentBranchException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CannotDeleteCurrentBranchException.java index 76d773229..65e05a173 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CannotDeleteCurrentBranchException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CannotDeleteCurrentBranchException.java @@ -44,8 +44,10 @@ public class CannotDeleteCurrentBranchException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for CannotDeleteCurrentBranchException + * * @param message - * the message + * error message */ public CannotDeleteCurrentBranchException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java index 7df35c925..3b71373b6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java @@ -53,7 +53,6 @@ public class CheckoutConflictException extends GitAPIException { * * @param conflictingPaths * list of conflicting paths - * * @param e * a {@link org.eclipse.jgit.errors.CheckoutConflictException} * exception @@ -82,7 +81,11 @@ public class CheckoutConflictException extends GitAPIException { this.conflictingPaths = conflictingPaths; } - /** @return all the paths where unresolved conflicts have been detected */ + /** + * Get conflicting paths + * + * @return all the paths where unresolved conflicts have been detected + */ public List getConflictingPaths() { return conflictingPaths; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ConcurrentRefUpdateException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ConcurrentRefUpdateException.java index b5e87f1f5..514d65e15 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ConcurrentRefUpdateException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ConcurrentRefUpdateException.java @@ -55,10 +55,16 @@ public class ConcurrentRefUpdateException extends GitAPIException { private Ref ref; /** + * Constructor for ConcurrentRefUpdateException. + * * @param message + * error message * @param ref + * a {@link org.eclipse.jgit.lib.Ref} * @param rc + * a {@link org.eclipse.jgit.lib.RefUpdate.Result} * @param cause + * a {@link java.lang.Throwable} */ public ConcurrentRefUpdateException(String message, Ref ref, RefUpdate.Result rc, Throwable cause) { @@ -69,9 +75,14 @@ public class ConcurrentRefUpdateException extends GitAPIException { } /** + * Constructor for ConcurrentRefUpdateException. + * * @param message + * error message * @param ref + * a {@link org.eclipse.jgit.lib.Ref} * @param rc + * a {@link org.eclipse.jgit.lib.RefUpdate.Result} */ public ConcurrentRefUpdateException(String message, Ref ref, RefUpdate.Result rc) { @@ -82,15 +93,21 @@ public class ConcurrentRefUpdateException extends GitAPIException { } /** - * @return the {@link Ref} which was tried to by updated + * Get Ref + * + * @return the {@link org.eclipse.jgit.lib.Ref} which was tried to by + * updated */ public Ref getRef() { return ref; } /** - * @return the result which was returned by {@link RefUpdate#update()} and - * which caused this error + * Get result + * + * @return the result which was returned by + * {@link org.eclipse.jgit.lib.RefUpdate#update()} and which caused + * this error */ public RefUpdate.Result getResult() { return rc; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/DetachedHeadException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/DetachedHeadException.java index 01b1f3147..30b585318 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/DetachedHeadException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/DetachedHeadException.java @@ -55,15 +55,22 @@ public class DetachedHeadException extends GitAPIException { } /** + * Constructor for DetachedHeadException. + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} object. */ public DetachedHeadException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for DetachedHeadException. + * * @param message + * error message */ public DetachedHeadException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java index b3cc1bfcf..0758791d5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/EmtpyCommitException.java @@ -46,15 +46,22 @@ public class EmtpyCommitException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for EmtpyCommitException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public EmtpyCommitException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for EmtpyCommitException. + * * @param message + * error message */ public EmtpyCommitException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/FilterFailedException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/FilterFailedException.java index fbc30ef16..f07e79f6a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/FilterFailedException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/FilterFailedException.java @@ -106,6 +106,8 @@ public class FilterFailedException extends GitAPIException { } /** + * Get filter command + * * @return the filterCommand */ public String getFilterCommand() { @@ -113,6 +115,8 @@ public class FilterFailedException extends GitAPIException { } /** + * Get path + * * @return the path of the file processed by the filter command */ public String getPath() { @@ -120,6 +124,8 @@ public class FilterFailedException extends GitAPIException { } /** + * Get output + * * @return the output generated by the filter command. Might be truncated to * limit memory consumption. */ @@ -128,6 +134,8 @@ public class FilterFailedException extends GitAPIException { } /** + * Get error + * * @return the error output returned by the filter command */ public String getError() { @@ -135,6 +143,8 @@ public class FilterFailedException extends GitAPIException { } /** + * Get return code + * * @return the return code returned by the filter command */ public int getReturnCode() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/GitAPIException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/GitAPIException.java index b251c7ddf..a2d6996f8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/GitAPIException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/GitAPIException.java @@ -40,7 +40,6 @@ package org.eclipse.jgit.api.errors; /** * Superclass of all exceptions thrown by the API classes in * {@code org.eclipse.jgit.api} - * */ public abstract class GitAPIException extends Exception { private static final long serialVersionUID = 1L; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidConfigurationException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidConfigurationException.java index cb89e469b..e99bfb160 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidConfigurationException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidConfigurationException.java @@ -45,15 +45,22 @@ public class InvalidConfigurationException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for InvalidConfigurationException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public InvalidConfigurationException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for InvalidConfigurationException. + * * @param message + * error message */ public InvalidConfigurationException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidMergeHeadsException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidMergeHeadsException.java index c8edb5720..9fbdce5b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidMergeHeadsException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidMergeHeadsException.java @@ -47,7 +47,10 @@ public class InvalidMergeHeadsException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for InvalidMergeHeadsException. + * * @param msg + * error message */ public InvalidMergeHeadsException(String msg) { super(msg); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRebaseStepException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRebaseStepException.java index ef89a98c9..1f03286d9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRebaseStepException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRebaseStepException.java @@ -45,16 +45,24 @@ package org.eclipse.jgit.api.errors; */ public class InvalidRebaseStepException extends GitAPIException { private static final long serialVersionUID = 1L; + /** + * Constructor for InvalidRebaseStepException. + * * @param msg + * error message */ public InvalidRebaseStepException(String msg) { super(msg); } /** + * Constructor for InvalidRebaseStepException. + * * @param msg + * error message * @param cause + * a {@link java.lang.Throwable} */ public InvalidRebaseStepException(String msg, Throwable cause) { super(msg, cause); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRefNameException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRefNameException.java index 287713c82..552c1480b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRefNameException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRefNameException.java @@ -44,15 +44,22 @@ public class InvalidRefNameException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for InvalidRefNameException + * * @param msg + * error message */ public InvalidRefNameException(String msg) { super(msg); } /** + * Constructor for InvalidRefNameException. + * * @param msg + * error message * @param cause + * a {@link java.lang.Throwable} */ public InvalidRefNameException(String msg, Throwable cause) { super(msg, cause); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRemoteException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRemoteException.java index 3f059b79c..4db5022f4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRemoteException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidRemoteException.java @@ -44,15 +44,22 @@ public class InvalidRemoteException extends GitAPIException { private static final long serialVersionUID = 1L; /** - * @param msg message describing the invalid remote. + * Constructor for InvalidRemoteException + * + * @param msg + * message describing the invalid remote. */ public InvalidRemoteException(String msg) { super(msg); } /** - * @param msg message describing the invalid remote. - * @param cause why the remote is invalid. + * Constructor for InvalidRemoteException + * + * @param msg + * message describing the invalid remote. + * @param cause + * why the remote is invalid. */ public InvalidRemoteException(String msg, Throwable cause) { super(msg, cause); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidTagNameException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidTagNameException.java index 1779c45e2..72ba0c3a4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidTagNameException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/InvalidTagNameException.java @@ -45,7 +45,10 @@ public class InvalidTagNameException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for InvalidTagNameException. + * * @param msg + * error message */ public InvalidTagNameException(String msg) { super(msg); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/JGitInternalException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/JGitInternalException.java index ca562005f..57d8a13d1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/JGitInternalException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/JGitInternalException.java @@ -63,7 +63,9 @@ public class JGitInternalException extends RuntimeException { * Construct an exception for low-level internal exceptions * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public JGitInternalException(String message, Throwable cause) { super(message, cause); @@ -73,6 +75,7 @@ public class JGitInternalException extends RuntimeException { * Construct an exception for low-level internal exceptions * * @param message + * error message */ public JGitInternalException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/MultipleParentsNotAllowedException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/MultipleParentsNotAllowedException.java index c71cc049d..506727283 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/MultipleParentsNotAllowedException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/MultipleParentsNotAllowedException.java @@ -49,15 +49,22 @@ public class MultipleParentsNotAllowedException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for MultipleParentsNotAllowedException. + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public MultipleParentsNotAllowedException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for MultipleParentsNotAllowedException. + * * @param message + * error message */ public MultipleParentsNotAllowedException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoFilepatternException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoFilepatternException.java index 1130c256f..893bf65c2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoFilepatternException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoFilepatternException.java @@ -48,15 +48,22 @@ public class NoFilepatternException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for NoFilepatternException. + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public NoFilepatternException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for NoFilepatternException. + * * @param message + * error message */ public NoFilepatternException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoHeadException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoHeadException.java index 50c4dc96b..43dbc4139 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoHeadException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoHeadException.java @@ -45,15 +45,22 @@ public class NoHeadException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for NoHeadException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public NoHeadException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for NoHeadException + * * @param message + * error message */ public NoHeadException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoMessageException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoMessageException.java index b7d8dc8db..fa6e79185 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoMessageException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/NoMessageException.java @@ -47,15 +47,22 @@ public class NoMessageException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for NoMessageException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public NoMessageException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for NoMessageException + * * @param message + * error message */ public NoMessageException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchApplyException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchApplyException.java index 4329860cd..6957dca2e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchApplyException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchApplyException.java @@ -46,21 +46,27 @@ package org.eclipse.jgit.api.errors; * Exception thrown when applying a patch fails * * @since 2.0 - * */ public class PatchApplyException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for PatchApplyException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public PatchApplyException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for PatchApplyException + * * @param message + * error message */ public PatchApplyException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchFormatException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchFormatException.java index 02ab42336..e10b8b436 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchFormatException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/PatchFormatException.java @@ -52,7 +52,6 @@ import org.eclipse.jgit.patch.FormatError; * Exception thrown when applying a patch fails due to an invalid format * * @since 2.0 - * */ public class PatchFormatException extends GitAPIException { private static final long serialVersionUID = 1L; @@ -60,7 +59,10 @@ public class PatchFormatException extends GitAPIException { private List errors; /** + * Constructor for PatchFormatException + * * @param errors + * a {@link java.util.List} of {@link FormatError}s */ public PatchFormatException(List errors) { super(MessageFormat.format(JGitText.get().patchFormatException, errors)); @@ -68,6 +70,8 @@ public class PatchFormatException extends GitAPIException { } /** + * Get list of errors + * * @return all the errors where unresolved conflicts have been detected */ public List getErrors() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefAlreadyExistsException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefAlreadyExistsException.java index 837028ce3..7e39361ef 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefAlreadyExistsException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefAlreadyExistsException.java @@ -37,17 +37,18 @@ */ package org.eclipse.jgit.api.errors; -import org.eclipse.jgit.lib.Ref; - /** - * Thrown when trying to create a {@link Ref} with the same name as an existing - * one + * Thrown when trying to create a {@link org.eclipse.jgit.lib.Ref} with the same + * name as an existing one */ public class RefAlreadyExistsException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for RefAlreadyExistsException + * * @param message + * error message */ public RefAlreadyExistsException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotAdvertisedException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotAdvertisedException.java index 2bd847765..b52cd58e8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotAdvertisedException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotAdvertisedException.java @@ -46,7 +46,10 @@ public class RefNotAdvertisedException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for RefNotAdvertisedException + * * @param message + * error message */ public RefNotAdvertisedException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotFoundException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotFoundException.java index b9f2a5617..406fa4583 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotFoundException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/RefNotFoundException.java @@ -44,8 +44,12 @@ public class RefNotFoundException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for RefNotFoundException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} * @since 4.1 */ public RefNotFoundException(String message, Throwable cause) { @@ -53,7 +57,10 @@ public class RefNotFoundException extends GitAPIException { } /** + * Constructor for RefNotFoundException + * * @param message + * error message */ public RefNotFoundException(String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/StashApplyFailureException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/StashApplyFailureException.java index 222c1db2b..517b51266 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/StashApplyFailureException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/StashApplyFailureException.java @@ -8,8 +8,12 @@ public class StashApplyFailureException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for StashApplyFailureException + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} * @since 4.1 */ public StashApplyFailureException(String message, Throwable cause) { @@ -20,6 +24,7 @@ public class StashApplyFailureException extends GitAPIException { * Create a StashApplyFailedException * * @param message + * error message */ public StashApplyFailureException(final String message) { super(message); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargeObjectInPackException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargeObjectInPackException.java index b841f57f1..ceaa6b247 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargeObjectInPackException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargeObjectInPackException.java @@ -47,6 +47,8 @@ public class TooLargeObjectInPackException extends TransportException { private static final long serialVersionUID = 1L; /** + * Constructor for TooLargeObjectInPackException + * * @param msg * message describing the transport failure. */ @@ -55,6 +57,8 @@ public class TooLargeObjectInPackException extends TransportException { } /** + * Constructor for TooLargeObjectInPackException + * * @param msg * message describing the transport exception. * @param cause diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargePackException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargePackException.java index 3833054da..462b70118 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargePackException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TooLargePackException.java @@ -46,6 +46,8 @@ public class TooLargePackException extends TransportException { private static final long serialVersionUID = 1L; /** + * Constructor for TooLargePackException + * * @param msg * message describing the transport failure. */ @@ -54,6 +56,8 @@ public class TooLargePackException extends TransportException { } /** + * Constructor for TooLargePackException + * * @param msg * message describing the transport exception. * @param cause diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TransportException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TransportException.java index 9f0e2fb25..5569928f3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TransportException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/TransportException.java @@ -44,6 +44,8 @@ public class TransportException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for TransportException + * * @param msg * message describing the transport failure. */ @@ -52,6 +54,8 @@ public class TransportException extends GitAPIException { } /** + * Constructor for TransportException + * * @param msg * message describing the transport exception. * @param cause diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/UnmergedPathsException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/UnmergedPathsException.java index 082f94c65..9d6318e42 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/UnmergedPathsException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/UnmergedPathsException.java @@ -63,8 +63,12 @@ public class UnmergedPathsException extends GitAPIException { } /** + * Constructor for UnmergedPathsException + * * @param message + * the message * @param cause + * a {@link java.lang.Throwable} * @since 4.1 */ public UnmergedPathsException(String message, Throwable cause) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/WrongRepositoryStateException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/WrongRepositoryStateException.java index dd2b3998e..4b5871149 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/WrongRepositoryStateException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/WrongRepositoryStateException.java @@ -46,15 +46,22 @@ public class WrongRepositoryStateException extends GitAPIException { private static final long serialVersionUID = 1L; /** + * Constructor for WrongRepositoryStateException. + * * @param message + * error message * @param cause + * a {@link java.lang.Throwable} */ public WrongRepositoryStateException(String message, Throwable cause) { super(message, cause); } /** + * Constructor for WrongRepositoryStateException. + * * @param message + * error message */ public WrongRepositoryStateException(String message) { super(message);