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); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java index 444ab1cb8..5ede3ea6d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/ContentSource.java @@ -55,13 +55,13 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectLoader; import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.ObjectStream; -import org.eclipse.jgit.treewalk.FileTreeIterator; import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.WorkingTreeIterator; import org.eclipse.jgit.treewalk.filter.PathFilter; /** - * Supplies the content of a file for {@link DiffFormatter}. + * Supplies the content of a file for + * {@link org.eclipse.jgit.diff.DiffFormatter}. *

* A content source is not thread-safe. Sources may contain state, including * information about the last ObjectLoader they returned. Callers must be @@ -83,8 +83,9 @@ public abstract class ContentSource { /** * Construct a content source for a working directory. * - * If the iterator is a {@link FileTreeIterator} an optimized version is - * used that doesn't require seeking through a TreeWalk. + * If the iterator is a {@link org.eclipse.jgit.treewalk.FileTreeIterator} + * an optimized version is used that doesn't require seeking through a + * TreeWalk. * * @param iterator * the iterator to obtain source files through. @@ -102,7 +103,7 @@ public abstract class ContentSource { * @param id * blob id of the file, if known. * @return the size in bytes. - * @throws IOException + * @throws java.io.IOException * the file cannot be accessed. */ public abstract long size(String path, ObjectId id) throws IOException; @@ -117,7 +118,7 @@ public abstract class ContentSource { * @return a loader that can supply the content of the file. The loader must * be used before another loader can be obtained from this same * source. - * @throws IOException + * @throws java.io.IOException * the file cannot be accessed. */ public abstract ObjectLoader open(String path, ObjectId id) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java index 5f01366c4..19eb39d93 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java @@ -44,7 +44,8 @@ package org.eclipse.jgit.diff; /** - * Compares two {@link Sequence}s to create an {@link EditList} of changes. + * Compares two {@link org.eclipse.jgit.diff.Sequence}s to create an + * {@link org.eclipse.jgit.diff.EditList} of changes. *

* An algorithm's {@code diff} method must be callable from concurrent threads * without data collisions. This permits some algorithms to use a singleton @@ -69,6 +70,8 @@ public abstract class DiffAlgorithm { } /** + * Get diff algorithm + * * @param alg * the diff algorithm for which an implementation should be * returned @@ -88,18 +91,18 @@ public abstract class DiffAlgorithm { /** * Compare two sequences and identify a list of edits between them. * - * @param - * type of sequence being compared. * @param cmp * the comparator supplying the element equivalence function. * @param a * the first (also known as old or pre-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}. + * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()}, + * {@link org.eclipse.jgit.diff.Edit#getEndA()}. * @param b * the second (also known as new or post-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}. + * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()}, + * {@link org.eclipse.jgit.diff.Edit#getEndB()}. * @return a modifiable edit list comparing the two sequences. If empty, the * sequences are identical according to {@code cmp}'s rules. The * result list is never null. @@ -244,20 +247,21 @@ public abstract class DiffAlgorithm { * proven to have no common starting or ending elements. The expected * elimination of common starting and ending elements is automatically * performed by the {@link #diff(SequenceComparator, Sequence, Sequence)} - * method, which invokes this method using {@link Subsequence}s. + * method, which invokes this method using + * {@link org.eclipse.jgit.diff.Subsequence}s. * - * @param - * type of sequence being compared. * @param cmp * the comparator supplying the element equivalence function. * @param a * the first (also known as old or pre-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}. + * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()}, + * {@link org.eclipse.jgit.diff.Edit#getEndA()}. * @param b * the second (also known as new or post-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}. + * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()}, + * {@link org.eclipse.jgit.diff.Edit#getEndB()}. * @return a modifiable edit list comparing the two sequences. */ public abstract EditList diffNonCommon( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java index ee709495e..063cefffa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java @@ -51,7 +51,9 @@ import org.eclipse.jgit.lib.Config.SectionParser; import org.eclipse.jgit.lib.ConfigConstants; import org.eclipse.jgit.util.StringUtils; -/** Keeps track of diff related configuration options. */ +/** + * Keeps track of diff related configuration options. + */ public class DiffConfig { /** Key for {@link Config#get(SectionParser)}. */ public static final Config.SectionParser KEY = DiffConfig::new; @@ -83,22 +85,38 @@ public class DiffConfig { ConfigConstants.CONFIG_KEY_RENAMELIMIT, 200); } - /** @return true if the prefix "a/" and "b/" should be suppressed. */ + /** + * If prefix should be suppressed + * + * @return true if the prefix "a/" and "b/" should be suppressed + */ public boolean isNoPrefix() { return noPrefix; } - /** @return true if rename detection is enabled by default. */ + /** + * If rename detection is enabled + * + * @return true if rename detection is enabled by default + */ public boolean isRenameDetectionEnabled() { return renameDetectionType != RenameDetectionType.FALSE; } - /** @return type of rename detection to perform. */ + /** + * Get the rename detection type + * + * @return type of rename detection to perform + */ public RenameDetectionType getRenameDetectionType() { return renameDetectionType; } - /** @return limit on number of paths to perform inexact rename detection. */ + /** + * Get the rename limit + * + * @return limit on number of paths to perform inexact rename detection + */ public int getRenameLimit() { return renameLimit; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java index 5eb194262..0f5ea7651 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java @@ -58,7 +58,9 @@ import org.eclipse.jgit.treewalk.TreeWalk; import org.eclipse.jgit.treewalk.filter.TreeFilter; import org.eclipse.jgit.treewalk.filter.TreeFilterMarker; -/** A value class representing a change to a file */ +/** + * A value class representing a change to a file + */ public class DiffEntry { /** Magical SHA1 used for file adds or deletes */ static final AbbreviatedObjectId A_ZERO = AbbreviatedObjectId @@ -107,9 +109,9 @@ public class DiffEntry { * @param walk * the TreeWalk to walk through. Must have exactly two trees. * @return headers describing the changed files. - * @throws IOException + * @throws java.io.IOException * the repository cannot be accessed. - * @throws IllegalArgumentException + * @throws java.lang.IllegalArgumentException * When given TreeWalk doesn't have exactly two trees. */ public static List scan(TreeWalk walk) throws IOException { @@ -127,9 +129,9 @@ public class DiffEntry { * @param includeTrees * include tree objects. * @return headers describing the changed files. - * @throws IOException + * @throws java.io.IOException * the repository cannot be accessed. - * @throws IllegalArgumentException + * @throws java.lang.IllegalArgumentException * when {@code includeTrees} is true and given TreeWalk is * recursive. Or when given TreeWalk doesn't have exactly two * trees @@ -155,9 +157,9 @@ public class DiffEntry { * queried through {{@link #isMarked(int)} (with the index from * this passed array). * @return headers describing the changed files. - * @throws IOException + * @throws java.io.IOException * the repository cannot be accessed. - * @throws IllegalArgumentException + * @throws java.lang.IllegalArgumentException * when {@code includeTrees} is true and given TreeWalk is * recursive. Or when given TreeWalk doesn't have exactly two * trees @@ -392,12 +394,20 @@ public class DiffEntry { return side == Side.OLD ? getOldPath() : getNewPath(); } - /** @return the old file mode, if described in the patch */ + /** + * Get the old file mode + * + * @return the old file mode, if described in the patch + */ public FileMode getOldMode() { return oldMode; } - /** @return the new file mode, if described in the patch */ + /** + * Get the new file mode + * + * @return the new file mode, if described in the patch + */ public FileMode getNewMode() { return newMode; } @@ -413,15 +423,22 @@ public class DiffEntry { return side == Side.OLD ? getOldMode() : getNewMode(); } - /** @return the type of change this patch makes on {@link #getNewPath()} */ + /** + * Get the change type + * + * @return the type of change this patch makes on {@link #getNewPath()} + */ public ChangeType getChangeType() { return changeType; } /** + * Get similarity score + * * @return similarity score between {@link #getOldPath()} and * {@link #getNewPath()} if {@link #getChangeType()} is - * {@link ChangeType#COPY} or {@link ChangeType#RENAME}. + * {@link org.eclipse.jgit.diff.DiffEntry.ChangeType#COPY} or + * {@link org.eclipse.jgit.diff.DiffEntry.ChangeType#RENAME}. */ public int getScore() { return score; @@ -466,10 +483,9 @@ public class DiffEntry { * * @param index * the index of the tree filter to check for (must be between 0 - * and {@link Integer#SIZE}). - * - * @return true, if the tree filter matched; false if not + * and {@link java.lang.Integer#SIZE}). * @since 2.3 + * @return a boolean. */ public boolean isMarked(int index) { return (treeFilterMarks & (1L << index)) != 0; @@ -498,6 +514,7 @@ public class DiffEntry { return side == Side.OLD ? getOldId() : getNewId(); } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java index 22366a6bd..bf9a27bdc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java @@ -84,7 +84,6 @@ import org.eclipse.jgit.lib.ProgressMonitor; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.patch.FileHeader; import org.eclipse.jgit.patch.FileHeader.PatchType; -import org.eclipse.jgit.patch.HunkHeader; import org.eclipse.jgit.revwalk.FollowFilter; import org.eclipse.jgit.revwalk.RevTree; import org.eclipse.jgit.revwalk.RevWalk; @@ -100,7 +99,6 @@ import org.eclipse.jgit.treewalk.filter.NotIgnoredFilter; import org.eclipse.jgit.treewalk.filter.PathFilter; import org.eclipse.jgit.treewalk.filter.TreeFilter; import org.eclipse.jgit.util.QuotedString; -import org.eclipse.jgit.util.io.DisabledOutputStream; /** * Format a Git style patch script. @@ -155,7 +153,11 @@ public class DiffFormatter implements AutoCloseable { this.out = out; } - /** @return the stream we are outputting data to. */ + /** + * Get output stream + * + * @return the stream we are outputting data to + */ protected OutputStream getOutputStream() { return out; } @@ -324,7 +326,11 @@ public class DiffFormatter implements AutoCloseable { return this.newPrefix; } - /** @return true if rename detection is enabled. */ + /** + * Get if rename detection is enabled + * + * @return true if rename detection is enabled + */ public boolean isDetectRenames() { return renameDetector != null; } @@ -348,7 +354,11 @@ public class DiffFormatter implements AutoCloseable { renameDetector = null; } - /** @return the rename detector if rename detection is enabled. */ + /** + * Get rename detector + * + * @return the rename detector if rename detection is enabled + */ public RenameDetector getRenameDetector() { return renameDetector; } @@ -366,9 +376,10 @@ public class DiffFormatter implements AutoCloseable { /** * Set the filter to produce only specific paths. * - * If the filter is an instance of {@link FollowFilter}, the filter path - * will be updated during successive scan or format invocations. The updated - * path can be obtained from {@link #getPathFilter()}. + * If the filter is an instance of + * {@link org.eclipse.jgit.revwalk.FollowFilter}, the filter path will be + * updated during successive scan or format invocations. The updated path + * can be obtained from {@link #getPathFilter()}. * * @param filter * the tree filter to apply. @@ -377,7 +388,11 @@ public class DiffFormatter implements AutoCloseable { pathFilter = filter != null ? filter : TreeFilter.ALL; } - /** @return the current path filter. */ + /** + * Get path filter + * + * @return the current path filter + */ public TreeFilter getPathFilter() { return pathFilter; } @@ -385,7 +400,7 @@ public class DiffFormatter implements AutoCloseable { /** * Flush the underlying output stream of this formatter. * - * @throws IOException + * @throws java.io.IOException * the stream's own flush method threw an exception. */ public void flush() throws IOException { @@ -393,6 +408,8 @@ public class DiffFormatter implements AutoCloseable { } /** + * {@inheritDoc} + *

* Release the internal ObjectReader state. * * @since 4.0 @@ -409,8 +426,8 @@ public class DiffFormatter implements AutoCloseable { * * No output is created, instead only the file paths that are different are * returned. Callers may choose to format these paths themselves, or convert - * them into {@link FileHeader} instances with a complete edit list by - * calling {@link #toFileHeader(DiffEntry)}. + * them into {@link org.eclipse.jgit.patch.FileHeader} instances with a + * complete edit list by calling {@link #toFileHeader(DiffEntry)}. *

* Either side may be null to indicate that the tree has beed added or * removed. The diff will be computed against nothing. @@ -420,7 +437,7 @@ public class DiffFormatter implements AutoCloseable { * @param b * the new (or updated) side or null * @return the paths that are different. - * @throws IOException + * @throws java.io.IOException * trees cannot be read or file contents cannot be read. */ public List scan(AnyObjectId a, AnyObjectId b) @@ -439,8 +456,8 @@ public class DiffFormatter implements AutoCloseable { * * No output is created, instead only the file paths that are different are * returned. Callers may choose to format these paths themselves, or convert - * them into {@link FileHeader} instances with a complete edit list by - * calling {@link #toFileHeader(DiffEntry)}. + * them into {@link org.eclipse.jgit.patch.FileHeader} instances with a + * complete edit list by calling {@link #toFileHeader(DiffEntry)}. *

* Either side may be null to indicate that the tree has beed added or * removed. The diff will be computed against nothing. @@ -450,7 +467,7 @@ public class DiffFormatter implements AutoCloseable { * @param b * the new (or updated) side or null * @return the paths that are different. - * @throws IOException + * @throws java.io.IOException * trees cannot be read or file contents cannot be read. */ public List scan(RevTree a, RevTree b) throws IOException { @@ -476,15 +493,15 @@ public class DiffFormatter implements AutoCloseable { * * No output is created, instead only the file paths that are different are * returned. Callers may choose to format these paths themselves, or convert - * them into {@link FileHeader} instances with a complete edit list by - * calling {@link #toFileHeader(DiffEntry)}. + * them into {@link org.eclipse.jgit.patch.FileHeader} instances with a + * complete edit list by calling {@link #toFileHeader(DiffEntry)}. * * @param a * the old (or previous) side. * @param b * the new (or updated) side. * @return the paths that are different. - * @throws IOException + * @throws java.io.IOException * trees cannot be read or file contents cannot be read. */ public List scan(AbstractTreeIterator a, AbstractTreeIterator b) @@ -596,7 +613,7 @@ public class DiffFormatter implements AutoCloseable { * the old (or previous) side or null * @param b * the new (or updated) side or null - * @throws IOException + * @throws java.io.IOException * trees cannot be read, file contents cannot be read, or the * patch cannot be output. */ @@ -618,7 +635,7 @@ public class DiffFormatter implements AutoCloseable { * the old (or previous) side or null * @param b * the new (or updated) side or null - * @throws IOException + * @throws java.io.IOException * trees cannot be read, file contents cannot be read, or the * patch cannot be output. */ @@ -639,7 +656,7 @@ public class DiffFormatter implements AutoCloseable { * the old (or previous) side or null * @param b * the new (or updated) side or null - * @throws IOException + * @throws java.io.IOException * trees cannot be read, file contents cannot be read, or the * patch cannot be output. */ @@ -655,7 +672,7 @@ public class DiffFormatter implements AutoCloseable { * * @param entries * entries describing the affected files. - * @throws IOException + * @throws java.io.IOException * a file's content cannot be read, or the output stream cannot * be written to. */ @@ -669,7 +686,7 @@ public class DiffFormatter implements AutoCloseable { * * @param ent * the entry to be formatted. - * @throws IOException + * @throws java.io.IOException * a file's content cannot be read, or the output stream cannot * be written to. */ @@ -712,11 +729,13 @@ public class DiffFormatter implements AutoCloseable { * existing file header containing the header lines to copy. * @param a * text source for the pre-image version of the content. This - * must match the content of {@link FileHeader#getOldId()}. + * must match the content of + * {@link org.eclipse.jgit.patch.FileHeader#getOldId()}. * @param b * text source for the post-image version of the content. This - * must match the content of {@link FileHeader#getNewId()}. - * @throws IOException + * must match the content of + * {@link org.eclipse.jgit.patch.FileHeader#getNewId()}. + * @throws java.io.IOException * writing to the supplied stream failed. */ public void format(final FileHeader head, final RawText a, final RawText b) @@ -743,7 +762,7 @@ public class DiffFormatter implements AutoCloseable { * the text A which was compared * @param b * the text B which was compared - * @throws IOException + * @throws java.io.IOException */ public void format(final EditList edits, final RawText a, final RawText b) throws IOException { @@ -791,7 +810,7 @@ public class DiffFormatter implements AutoCloseable { * RawText for accessing raw data * @param line * the line number within text - * @throws IOException + * @throws java.io.IOException */ protected void writeContextLine(final RawText text, final int line) throws IOException { @@ -809,7 +828,7 @@ public class DiffFormatter implements AutoCloseable { * RawText for accessing raw data * @param line * the line number within text - * @throws IOException + * @throws java.io.IOException */ protected void writeAddedLine(final RawText text, final int line) throws IOException { @@ -823,7 +842,7 @@ public class DiffFormatter implements AutoCloseable { * RawText for accessing raw data * @param line * the line number within text - * @throws IOException + * @throws java.io.IOException */ protected void writeRemovedLine(final RawText text, final int line) throws IOException { @@ -841,7 +860,7 @@ public class DiffFormatter implements AutoCloseable { * within second source * @param bEndLine * within second source - * @throws IOException + * @throws java.io.IOException */ protected void writeHunkHeader(int aStartLine, int aEndLine, int bStartLine, int bEndLine) throws IOException { @@ -894,7 +913,7 @@ public class DiffFormatter implements AutoCloseable { * the text object to obtain the line from. * @param cur * line number to output. - * @throws IOException + * @throws java.io.IOException * the stream threw an exception while writing to it. */ protected void writeLine(final char prefix, final RawText text, @@ -905,24 +924,26 @@ public class DiffFormatter implements AutoCloseable { } /** - * Creates a {@link FileHeader} representing the given {@link DiffEntry} + * Creates a {@link org.eclipse.jgit.patch.FileHeader} representing the + * given {@link org.eclipse.jgit.diff.DiffEntry} *

* This method does not use the OutputStream associated with this * DiffFormatter instance. It is therefore safe to instantiate this - * DiffFormatter instance with a {@link DisabledOutputStream} if this method - * is the only one that will be used. + * DiffFormatter instance with a + * {@link org.eclipse.jgit.util.io.DisabledOutputStream} if this method is + * the only one that will be used. * * @param ent * the DiffEntry to create the FileHeader for * @return a FileHeader representing the DiffEntry. The FileHeader's buffer * will contain only the header of the diff output. It will also - * contain one {@link HunkHeader}. - * @throws IOException + * contain one {@link org.eclipse.jgit.patch.HunkHeader}. + * @throws java.io.IOException * the stream threw an exception while writing to it, or one of * the blobs referenced by the DiffEntry could not be read. - * @throws CorruptObjectException + * @throws org.eclipse.jgit.errors.CorruptObjectException * one of the blobs referenced by the DiffEntry is corrupt. - * @throws MissingObjectException + * @throws org.eclipse.jgit.errors.MissingObjectException * one of the blobs referenced by the DiffEntry is missing. */ public FileHeader toFileHeader(DiffEntry ent) throws IOException, @@ -1046,12 +1067,12 @@ public class DiffFormatter implements AutoCloseable { * @param o * The stream the formatter will write the first header line to * @param type - * The {@link ChangeType} + * The {@link org.eclipse.jgit.diff.DiffEntry.ChangeType} * @param oldPath * old path to the file * @param newPath * new path to the file - * @throws IOException + * @throws java.io.IOException * the stream threw an exception while writing to it. */ protected void formatGitDiffFirstHeaderLine(ByteArrayOutputStream o, @@ -1136,11 +1157,13 @@ public class DiffFormatter implements AutoCloseable { } /** + * Format index line + * * @param o * the stream the formatter will write line data to * @param ent * the DiffEntry to create the FileHeader for - * @throws IOException + * @throws java.io.IOException * writing to the supplied stream failed. */ protected void formatIndexLine(OutputStream o, DiffEntry ent) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java index a2e167fd2..775d11a46 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java @@ -118,7 +118,11 @@ public class Edit { endB = be; } - /** @return the type of this region */ + /** + * Get type + * + * @return the type of this region + */ public final Type getType() { if (beginA < endA) { if (beginB < endB) @@ -134,37 +138,66 @@ public class Edit { } } - /** @return true if the edit is empty (lengths of both a and b is zero). */ + /** + * Whether edit is empty + * + * @return {@code true} if the edit is empty (lengths of both a and b is + * zero) + */ public final boolean isEmpty() { return beginA == endA && beginB == endB; } - /** @return start point in sequence A. */ + /** + * Get start point in sequence A + * + * @return start point in sequence A + */ public final int getBeginA() { return beginA; } - /** @return end point in sequence A. */ + /** + * Get end point in sequence A + * + * @return end point in sequence A + */ public final int getEndA() { return endA; } - /** @return start point in sequence B. */ + /** + * Get start point in sequence B + * + * @return start point in sequence B + */ public final int getBeginB() { return beginB; } - /** @return end point in sequence B. */ + /** + * Get end point in sequence B + * + * @return end point in sequence B + */ public final int getEndB() { return endB; } - /** @return length of the region in A. */ + /** + * Get length of the region in A + * + * @return length of the region in A + */ public final int getLengthA() { return endA - beginA; } - /** @return length of the region in B. */ + /** + * Get length of the region in B + * + * @return return length of the region in B + */ public final int getLengthB() { return endB - beginB; } @@ -210,17 +243,23 @@ public class Edit { return new Edit(cut.endA, endA, cut.endB, endB); } - /** Increase {@link #getEndA()} by 1. */ + /** + * Increase {@link #getEndA()} by 1. + */ public void extendA() { endA++; } - /** Increase {@link #getEndB()} by 1. */ + /** + * Increase {@link #getEndB()} by 1. + */ public void extendB() { endB++; } - /** Swap A and B, so the edit goes the other direction. */ + /** + * Swap A and B, so the edit goes the other direction. + */ public void swap() { final int sBegin = beginA; final int sEnd = endA; @@ -232,11 +271,13 @@ public class Edit { endB = sEnd; } + /** {@inheritDoc} */ @Override public int hashCode() { return beginA ^ endA; } + /** {@inheritDoc} */ @Override public boolean equals(final Object o) { if (o instanceof Edit) { @@ -247,6 +288,7 @@ public class Edit { return false; } + /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java index 14f7b4293..617e0d860 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java @@ -45,7 +45,9 @@ package org.eclipse.jgit.diff; import java.util.ArrayList; -/** Specialized list of {@link Edit}s in a document. */ +/** + * Specialized list of {@link org.eclipse.jgit.diff.Edit}s in a document. + */ public class EditList extends ArrayList { private static final long serialVersionUID = 1L; @@ -62,7 +64,9 @@ public class EditList extends ArrayList { return res; } - /** Create a new, empty edit list. */ + /** + * Create a new, empty edit list. + */ public EditList() { super(16); } @@ -78,6 +82,7 @@ public class EditList extends ArrayList { super(capacity); } + /** {@inheritDoc} */ @Override public String toString() { return "EditList" + super.toString(); //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java index cb1def620..04921200c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java @@ -44,13 +44,15 @@ package org.eclipse.jgit.diff; /** - * Wraps a {@link Sequence} to assign hash codes to elements. + * Wraps a {@link org.eclipse.jgit.diff.Sequence} to assign hash codes to + * elements. *

* This sequence acts as a proxy for the real sequence, caching element hash * codes so they don't need to be recomputed each time. Sequences of this type - * must be used with a {@link HashedSequenceComparator}. + * must be used with a {@link org.eclipse.jgit.diff.HashedSequenceComparator}. *

- * To construct an instance of this type use {@link HashedSequencePair}. + * To construct an instance of this type use + * {@link org.eclipse.jgit.diff.HashedSequencePair}. * * @param * the base sequence type. @@ -65,6 +67,7 @@ public final class HashedSequence extends Sequence { this.hashes = hashes; } + /** {@inheritDoc} */ @Override public int size() { return base.size(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java index 1ca7fdd9d..bd9618e0b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java @@ -44,13 +44,16 @@ package org.eclipse.jgit.diff; /** - * Wrap another comparator for use with {@link HashedSequence}. + * Wrap another comparator for use with + * {@link org.eclipse.jgit.diff.HashedSequence}. *

* This comparator acts as a proxy for the real comparator, evaluating the * cached hash code before testing the underlying comparator's equality. - * Comparators of this type must be used with a {@link HashedSequence}. + * Comparators of this type must be used with a + * {@link org.eclipse.jgit.diff.HashedSequence}. *

- * To construct an instance of this type use {@link HashedSequencePair}. + * To construct an instance of this type use + * {@link org.eclipse.jgit.diff.HashedSequencePair}. * * @param * the base sequence type. @@ -63,6 +66,7 @@ public final class HashedSequenceComparator extends this.cmp = cmp; } + /** {@inheritDoc} */ @Override public boolean equals(HashedSequence a, int ai, // HashedSequence b, int bi) { @@ -70,6 +74,7 @@ public final class HashedSequenceComparator extends && cmp.equals(a.base, ai, b.base, bi); } + /** {@inheritDoc} */ @Override public int hash(HashedSequence seq, int ptr) { return seq.hashes[ptr]; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java index bf6d967c5..8d120155a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequencePair.java @@ -44,7 +44,8 @@ package org.eclipse.jgit.diff; /** - * Wraps two {@link Sequence} instances to cache their element hash codes. + * Wraps two {@link org.eclipse.jgit.diff.Sequence} instances to cache their + * element hash codes. *

* This pair wraps two sequences that contain cached hash codes for the input * sequences. @@ -79,19 +80,31 @@ public class HashedSequencePair { this.baseB = b; } - /** @return obtain a comparator that uses the cached hash codes. */ + /** + * Get comparator + * + * @return obtain a comparator that uses the cached hash codes + */ public HashedSequenceComparator getComparator() { return new HashedSequenceComparator<>(cmp); } - /** @return wrapper around A that includes cached hash codes. */ + /** + * Get A + * + * @return wrapper around A that includes cached hash codes + */ public HashedSequence getA() { if (cachedA == null) cachedA = wrap(baseA); return cachedA; } - /** @return wrapper around B that includes cached hash codes. */ + /** + * Get B + * + * @return wrapper around B that includes cached hash codes + */ public HashedSequence getB() { if (cachedB == null) cachedB = wrap(baseB); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java index 4ef58455a..c1c6e9a6e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java @@ -85,8 +85,9 @@ import java.util.List; * So long as {@link #setMaxChainLength(int)} is a small constant (such as 64), * the algorithm runs in O(N * D) time, where N is the sum of the input lengths * and D is the number of edits in the resulting EditList. If the supplied - * {@link SequenceComparator} has a good hash function, this implementation - * typically out-performs {@link MyersDiff}, even though its theoretical running + * {@link org.eclipse.jgit.diff.SequenceComparator} has a good hash function, + * this implementation typically out-performs + * {@link org.eclipse.jgit.diff.MyersDiff}, even though its theoretical running * time is the same. *

* This implementation has an internal limitation that prevents it from handling @@ -130,6 +131,7 @@ public class HistogramDiff extends LowLevelDiffAlgorithm { maxChainLength = maxLen; } + /** {@inheritDoc} */ @Override public void diffNonCommon(EditList edits, HashedSequenceComparator cmp, HashedSequence a, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java index 55ceec801..9e5ff2555 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java @@ -43,8 +43,11 @@ package org.eclipse.jgit.diff; -/** Compares two sequences primarily based upon hash codes. */ +/** + * Compares two sequences primarily based upon hash codes. + */ public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm { + /** {@inheritDoc} */ @Override public EditList diffNonCommon( SequenceComparator cmp, S a, S b) { @@ -67,10 +70,9 @@ public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm { * proven to have no common starting or ending elements. The expected * elimination of common starting and ending elements is automatically * performed by the {@link #diff(SequenceComparator, Sequence, Sequence)} - * method, which invokes this method using {@link Subsequence}s. + * method, which invokes this method using + * {@link org.eclipse.jgit.diff.Subsequence}s. * - * @param - * type of sequence being compared. * @param edits * result list to append the region's edits onto. * @param cmp @@ -78,11 +80,13 @@ public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm { * @param a * the first (also known as old or pre-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'A' side: {@link Edit#getBeginA()}, {@link Edit#getEndA()}. + * 'A' side: {@link org.eclipse.jgit.diff.Edit#getBeginA()}, + * {@link org.eclipse.jgit.diff.Edit#getEndA()}. * @param b * the second (also known as new or post-image) sequence. Edits * returned by this algorithm will reference indexes using the - * 'B' side: {@link Edit#getBeginB()}, {@link Edit#getEndB()}. + * 'B' side: {@link org.eclipse.jgit.diff.Edit#getBeginB()}, + * {@link org.eclipse.jgit.diff.Edit#getEndB()}. * @param region * the region being compared within the two sequences. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java index a3860de04..646f264e0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java @@ -557,7 +557,10 @@ if (k < beginK || k > endK) } /** - * @param args two filenames specifying the contents to be diffed + * Main method + * + * @param args + * two filenames specifying the contents to be diffed */ public static void main(String[] args) { if (args.length != 2) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java index 146b91040..7f6aa9ab0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java @@ -58,7 +58,9 @@ public class PatchIdDiffFormatter extends DiffFormatter { private final MessageDigest digest; - /** Initialize a formatter to compute a patch id. */ + /** + * Initialize a formatter to compute a patch id. + */ public PatchIdDiffFormatter() { super(new DigestOutputStream(NullOutputStream.INSTANCE, Constants.newMessageDigest())); @@ -74,12 +76,14 @@ public class PatchIdDiffFormatter extends DiffFormatter { return ObjectId.fromRaw(digest.digest()); } + /** {@inheritDoc} */ @Override protected void writeHunkHeader(int aStartLine, int aEndLine, int bStartLine, int bEndLine) throws IOException { // The hunk header is not taken into account for patch id calculation } + /** {@inheritDoc} */ @Override protected void formatIndexLine(OutputStream o, DiffEntry ent) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java index 656319dd7..7be165910 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java @@ -103,7 +103,7 @@ public class RawText extends Sequence { * * @param file * the text file. - * @throws IOException + * @throws java.io.IOException * if Exceptions occur while reading the file */ public RawText(File file) throws IOException { @@ -111,6 +111,7 @@ public class RawText extends Sequence { } /** @return total number of items in the sequence. */ + /** {@inheritDoc} */ @Override public int size() { // The line map is always 2 entries larger than the number of lines in @@ -135,7 +136,7 @@ public class RawText extends Sequence { * @param i * index of the line to extract. Note this is 0-based, so line * number 1 is actually index 0. - * @throws IOException + * @throws java.io.IOException * the stream write operation failed. */ public void writeLine(final OutputStream out, final int i) @@ -244,7 +245,7 @@ public class RawText extends Sequence { * @param raw * input stream containing the raw file content. * @return true if raw is likely to be a binary file, false otherwise - * @throws IOException + * @throws java.io.IOException * if input stream could not be read */ public static boolean isBinary(InputStream raw) throws IOException { @@ -301,17 +302,20 @@ public class RawText extends Sequence { } /** - * Read a blob object into RawText, or throw BinaryBlobException if - * the blob is binary. + * Read a blob object into RawText, or throw BinaryBlobException if the blob + * is binary. * * @param ldr - * the ObjectLoader for the blob + * the ObjectLoader for the blob * @param threshold - * if the blob is larger than this size, it is always assumed to be binary. + * if the blob is larger than this size, it is always assumed to + * be binary. * @since 4.10 * @return the RawText representing the blob. - * @throws BinaryBlobException if the blob contains binary data. - * @throws IOException if the input could not be read. + * @throws org.eclipse.jgit.errors.BinaryBlobException + * if the blob contains binary data. + * @throws java.io.IOException + * if the input could not be read. */ public static RawText load(ObjectLoader ldr, int threshold) throws IOException, BinaryBlobException { long sz = ldr.getSize(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java index 2793fa2e8..ed2eebb85 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java @@ -50,7 +50,9 @@ import static org.eclipse.jgit.util.RawCharUtil.trimTrailingWhitespace; import org.eclipse.jgit.util.IntList; -/** Equivalence function for {@link RawText}. */ +/** + * Equivalence function for {@link org.eclipse.jgit.diff.RawText}. + */ public abstract class RawTextComparator extends SequenceComparator { /** No special treatment. */ public static final RawTextComparator DEFAULT = new RawTextComparator() { @@ -134,7 +136,9 @@ public abstract class RawTextComparator extends SequenceComparator { } }; - /** Ignores leading whitespace. */ + /** + * Ignore leading whitespace. + **/ public static final RawTextComparator WS_IGNORE_LEADING = new RawTextComparator() { @Override public boolean equals(RawText a, int ai, RawText b, int bi) { @@ -262,6 +266,7 @@ public abstract class RawTextComparator extends SequenceComparator { return hashRegion(seq.content, begin, end); } + /** {@inheritDoc} */ @Override public Edit reduceCommonStartEnd(RawText a, RawText b, Edit e) { // This is a faster exact match based form that tries to improve diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java index d899429c3..7bb217d04 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java @@ -65,7 +65,9 @@ import org.eclipse.jgit.lib.ObjectReader; import org.eclipse.jgit.lib.ProgressMonitor; import org.eclipse.jgit.lib.Repository; -/** Detect and resolve object renames. */ +/** + * Detect and resolve object renames. + */ public class RenameDetector { private static final int EXACT_RENAME_SCORE = 100; @@ -156,6 +158,8 @@ public class RenameDetector { } /** + * Get rename score + * * @return minimum score required to pair an add/delete as a rename. The * score ranges are within the bounds of (0, 100). */ @@ -173,7 +177,7 @@ public class RenameDetector { * * @param score * new rename score, must be within [0, 100]. - * @throws IllegalArgumentException + * @throws java.lang.IllegalArgumentException * the score was not within [0, 100]. */ public void setRenameScore(int score) { @@ -184,6 +188,8 @@ public class RenameDetector { } /** + * Get break score + * * @return the similarity score required to keep modified file pairs * together. Any modify pairs that score below this will be broken * apart into separate add/deletes. Values less than or equal to @@ -195,6 +201,8 @@ public class RenameDetector { } /** + * Set break score + * * @param breakScore * the similarity score required to keep modified file pairs * together. Any modify pairs that score below this will be @@ -206,7 +214,11 @@ public class RenameDetector { this.breakScore = breakScore; } - /** @return limit on number of paths to perform inexact rename detection. */ + /** + * Get rename limit + * + * @return limit on number of paths to perform inexact rename detection + */ public int getRenameLimit() { return renameLimit; } @@ -250,7 +262,7 @@ public class RenameDetector { * * @param entriesToAdd * one or more entries to add. - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if {@code getEntries} was already invoked. */ public void addAll(Collection entriesToAdd) { @@ -290,7 +302,7 @@ public class RenameDetector { * * @param entry * to add. - * @throws IllegalStateException + * @throws java.lang.IllegalStateException * if {@code getEntries} was already invoked. */ public void add(DiffEntry entry) { @@ -302,9 +314,9 @@ public class RenameDetector { *

* This convenience function runs without a progress monitor. * - * @return an unmodifiable list of {@link DiffEntry}s representing all files - * that have been changed. - * @throws IOException + * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s + * representing all files that have been changed. + * @throws java.io.IOException * file contents cannot be read from the repository. */ public List compute() throws IOException { @@ -316,9 +328,9 @@ public class RenameDetector { * * @param pm * report progress during the detection phases. - * @return an unmodifiable list of {@link DiffEntry}s representing all files - * that have been changed. - * @throws IOException + * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s + * representing all files that have been changed. + * @throws java.io.IOException * file contents cannot be read from the repository. */ public List compute(ProgressMonitor pm) throws IOException { @@ -339,9 +351,9 @@ public class RenameDetector { * reader to obtain objects from the repository with. * @param pm * report progress during the detection phases. - * @return an unmodifiable list of {@link DiffEntry}s representing all files - * that have been changed. - * @throws IOException + * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s + * representing all files that have been changed. + * @throws java.io.IOException * file contents cannot be read from the repository. */ public List compute(ObjectReader reader, ProgressMonitor pm) @@ -357,9 +369,9 @@ public class RenameDetector { * reader to obtain objects from the repository with. * @param pm * report progress during the detection phases. - * @return an unmodifiable list of {@link DiffEntry}s representing all files - * that have been changed. - * @throws IOException + * @return an unmodifiable list of {@link org.eclipse.jgit.diff.DiffEntry}s + * representing all files that have been changed. + * @throws java.io.IOException * file contents cannot be read from the repository. */ public List compute(ContentSource.Pair reader, ProgressMonitor pm) @@ -393,7 +405,9 @@ public class RenameDetector { return Collections.unmodifiableList(entries); } - /** Reset this rename detector for another rename detection pass. */ + /** + * Reset this rename detector for another rename detection pass. + */ public void reset() { entries = new ArrayList<>(); deleted = new ArrayList<>(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java index 53ab2f96e..c475132c2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Sequence.java @@ -52,13 +52,19 @@ package org.eclipse.jgit.diff; * Unlike a List, the members of the sequence are not directly obtainable. *

* Implementations of Sequence are primarily intended for use in content - * difference detection algorithms, to produce an {@link EditList} of - * {@link Edit} instances describing how two Sequence instances differ. + * difference detection algorithms, to produce an + * {@link org.eclipse.jgit.diff.EditList} of {@link org.eclipse.jgit.diff.Edit} + * instances describing how two Sequence instances differ. *

* To be compared against another Sequence of the same type, a supporting - * {@link SequenceComparator} must also be supplied. + * {@link org.eclipse.jgit.diff.SequenceComparator} must also be supplied. */ public abstract class Sequence { /** @return total number of items in the sequence. */ + /** + * Get size + * + * @return size + */ public abstract int size(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java index cc38d4b5c..ccd005558 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SequenceComparator.java @@ -44,7 +44,8 @@ package org.eclipse.jgit.diff; /** - * Equivalence function for a {@link Sequence} compared by difference algorithm. + * Equivalence function for a {@link org.eclipse.jgit.diff.Sequence} compared by + * difference algorithm. *

* Difference algorithms can use a comparator to compare portions of two * sequences and discover the minimal edits required to transform from one diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java index 1c40d7fcb..8b4d2ec8f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java @@ -56,8 +56,9 @@ import org.eclipse.jgit.lib.ObjectStream; * Index structure of lines/blocks in one file. *

* This structure can be used to compute an approximation of the similarity - * between two files. The index is used by {@link SimilarityRenameDetector} to - * compute scores between files. + * between two files. The index is used by + * {@link org.eclipse.jgit.diff.SimilarityRenameDetector} to compute scores + * between files. *

* To save space in memory, this index uses a space efficient encoding which * will not exceed 1 MiB per instance. The index starts out at a smaller size @@ -114,9 +115,9 @@ public class SimilarityIndex { * @param obj * the object to hash * @return similarity index for this object - * @throws IOException + * @throws java.io.IOException * file contents cannot be read from the repository. - * @throws TableFullException + * @throws org.eclipse.jgit.diff.SimilarityIndex.TableFullException * object hashing overflowed the storage capacity of the * SimilarityIndex. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java index 50ca613cc..aa10f6c9b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java @@ -44,11 +44,12 @@ package org.eclipse.jgit.diff; /** - * Wraps a {@link Sequence} to have a narrower range of elements. + * Wraps a {@link org.eclipse.jgit.diff.Sequence} to have a narrower range of + * elements. *

* This sequence acts as a proxy for the real sequence, translating element * indexes on the fly by adding {@code begin} to them. Sequences of this type - * must be used with a {@link SubsequenceComparator}. + * must be used with a {@link org.eclipse.jgit.diff.SubsequenceComparator}. * * @param * the base sequence type. @@ -57,8 +58,6 @@ public final class Subsequence extends Sequence { /** * Construct a subsequence around the A region/base sequence. * - * @param - * the base sequence type. * @param a * the A sequence. * @param region @@ -72,8 +71,6 @@ public final class Subsequence extends Sequence { /** * Construct a subsequence around the B region/base sequence. * - * @param - * the base sequence type. * @param b * the B sequence. * @param region @@ -87,8 +84,6 @@ public final class Subsequence extends Sequence { /** * Adjust the Edit to reflect positions in the base sequence. * - * @param - * the base sequence type. * @param e * edit to adjust in-place. Prior to invocation the indexes are * in terms of the two subsequences; after invocation the indexes @@ -110,8 +105,6 @@ public final class Subsequence extends Sequence { /** * Adjust the Edits to reflect positions in the base sequence. * - * @param - * the base sequence type. * @param edits * edits to adjust in-place. Prior to invocation the indexes are * in terms of the two subsequences; after invocation the indexes @@ -156,6 +149,7 @@ public final class Subsequence extends Sequence { this.size = end - begin; } + /** {@inheritDoc} */ @Override public int size() { return size; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java index dff2a429e..9b3889b30 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java @@ -44,11 +44,13 @@ package org.eclipse.jgit.diff; /** - * Wrap another comparator for use with {@link Subsequence}. + * Wrap another comparator for use with + * {@link org.eclipse.jgit.diff.Subsequence}. *

* This comparator acts as a proxy for the real comparator, translating element * indexes on the fly by adding the subsequence's begin offset to them. - * Comparators of this type must be used with a {@link Subsequence}. + * Comparators of this type must be used with a + * {@link org.eclipse.jgit.diff.Subsequence}. * * @param * the base sequence type. @@ -67,11 +69,13 @@ public final class SubsequenceComparator extends this.cmp = cmp; } + /** {@inheritDoc} */ @Override public boolean equals(Subsequence a, int ai, Subsequence b, int bi) { return cmp.equals(a.base, ai + a.begin, b.base, bi + b.begin); } + /** {@inheritDoc} */ @Override public int hash(Subsequence seq, int ptr) { return cmp.hash(seq.base, ptr + seq.begin);