From 659cadf06d165f1a31a0466689d77dff7330f99d Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Wed, 29 May 2013 10:42:35 -0700 Subject: Add missing javadoc for archive code Document archive formats, the archive format interface, and the parameters of the GitAPIException constructors. Noticed by eclipse. Reported-by: Dani Megert Change-Id: I22b5f9d4c0358bbe867c1906feec7c279e214273 --- .../src/org/eclipse/jgit/api/ArchiveCommand.java | 30 ++++++++++++++++++++++ .../eclipse/jgit/api/errors/GitAPIException.java | 8 ++++++ 2 files changed, 38 insertions(+) (limited to 'org.eclipse.jgit/src') 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 6104cb432d..7726e15eeb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -116,9 +116,39 @@ public class ArchiveCommand extends GitCommand { * } finally { * out.close(); * } + * + * @param + * type representing an archive being created. */ public static interface Format { + /** + * Start a new archive. Entries can be included in the archive using the + * putEntry method, and then the archive should be closed using its + * close method. + * + * @param s + * underlying output stream to which to write the archive. + * @return new archive object for use in putEntry + * @throws IOException + * thrown by the underlying output stream for I/O errors + */ T createArchiveOutputStream(OutputStream s) throws IOException; + + /** + * Write an entry to an archive. + * + * @param out + * archive object from createArchiveOutputStream + * @param path + * full filename relative to the root of the archive + * @param mode + * mode (for example FileMode.REGULAR_FILE or + * FileMode.SYMLINK) + * @param loader + * blob object with data for this entry + * @throws IOException + * thrown by the underlying output stream for I/O errors + */ void putEntry(T out, String path, FileMode mode, ObjectLoader loader) throws IOException; } 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 92599ca7d6..9760c49e96 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 @@ -48,6 +48,11 @@ public abstract class GitAPIException extends Exception { /** * Constructs a new exception with the specified detail * message and cause. + * + * @param message + * detail message + * @param cause + * cause */ protected GitAPIException(String message, Throwable cause) { super(message, cause); @@ -56,6 +61,9 @@ public abstract class GitAPIException extends Exception { /** * Constructs a new exception with the specified detail * message and no cause. + * + * @param message + * detail message */ protected GitAPIException(String message) { super(message); -- cgit v1.2.3