Fix javadoc errors and warnings

This commit is contained in:
Phillip Webb
2015-06-19 14:04:55 -07:00
parent 890554e8d6
commit f65dfe4bcb
26 changed files with 315 additions and 75 deletions

View File

@@ -119,7 +119,7 @@ public abstract class ExecutableArchiveLauncher extends Launcher {
* Called to post-process archive entries before they are used. Implementations can
* add and remove entries.
* @param archives the archives
* @throws Exception
* @throws Exception if the post processing fails
*/
protected void postProcessClassPathArchives(List<Archive> archives) throws Exception {
}

View File

@@ -70,7 +70,7 @@ public abstract class Launcher {
* Create a classloader for the specified archives.
* @param archives the archives
* @return the classloader
* @throws Exception
* @throws Exception if the classloader cannot be created
*/
protected ClassLoader createClassLoader(List<Archive> archives) throws Exception {
List<URL> urls = new ArrayList<URL>(archives.size());
@@ -86,7 +86,7 @@ public abstract class Launcher {
* Create a classloader for the specified URLs
* @param urls the URLs
* @return the classloader
* @throws Exception
* @throws Exception if the classloader cannot be created
*/
protected ClassLoader createClassLoader(URL[] urls) throws Exception {
return new LaunchedURLClassLoader(urls, getClass().getClassLoader());
@@ -97,7 +97,7 @@ public abstract class Launcher {
* @param args the incoming arguments
* @param mainClass the main class to run
* @param classLoader the classloader
* @throws Exception
* @throws Exception if the launch fails
*/
protected void launch(String[] args, String mainClass, ClassLoader classLoader)
throws Exception {
@@ -114,7 +114,7 @@ public abstract class Launcher {
* @param args the incoming arguments
* @param classLoader the classloader
* @return a runnable used to start the application
* @throws Exception
* @throws Exception if the main method runner cannot be created
*/
protected Runnable createMainMethodRunner(String mainClass, String[] args,
ClassLoader classLoader) throws Exception {
@@ -127,14 +127,14 @@ public abstract class Launcher {
/**
* Returns the main class that should be launched.
* @return the name of the main class
* @throws Exception
* @throws Exception if the main class cannot be obtained
*/
protected abstract String getMainClass() throws Exception;
/**
* Returns the archives that will be used to construct the class path.
* @return the class path archives
* @throws Exception
* @throws Exception if the class path archives cannot be obtained
*/
protected abstract List<Archive> getClassPathArchives() throws Exception;

View File

@@ -37,7 +37,7 @@ public abstract class Archive {
/**
* Returns a URL that can be used to load the archive.
* @return the archive URL
* @throws MalformedURLException
* @throws MalformedURLException if the URL is malformed
*/
public abstract URL getUrl() throws MalformedURLException;
@@ -45,7 +45,7 @@ public abstract class Archive {
* Obtain the main class that should be used to launch the application. By default
* this method uses a {@code Start-Class} manifest entry.
* @return the main class
* @throws Exception
* @throws Exception if the main class cannot be obtained
*/
public String getMainClass() throws Exception {
Manifest manifest = getManifest();
@@ -73,7 +73,7 @@ public abstract class Archive {
/**
* Returns the manifest of the archive.
* @return the manifest
* @throws IOException
* @throws IOException if the manifest cannot be read
*/
public abstract Manifest getManifest() throws IOException;
@@ -87,7 +87,7 @@ public abstract class Archive {
* Returns nested {@link Archive}s for entries that match the specified filter.
* @param filter the filter used to limit entries
* @return nested archives
* @throws IOException
* @throws IOException if nested archives cannot be read
*/
public abstract List<Archive> getNestedArchives(EntryFilter filter)
throws IOException;
@@ -96,7 +96,7 @@ public abstract class Archive {
* Returns a filtered version of the archive.
* @param filter the filter to apply
* @return a filter archive
* @throws IOException
* @throws IOException if the archive cannot be read
*/
public abstract Archive getFilteredArchive(EntryRenameFilter filter)
throws IOException;

View File

@@ -32,7 +32,7 @@ public interface RandomAccessData {
* caller is responsible close the underlying stream.
* @param access hint indicating how the underlying data should be accessed
* @return a new input stream that can be used to read the underlying data.
* @throws IOException
* @throws IOException if the stream cannot be opened
*/
InputStream getInputStream(ResourceAccess access) throws IOException;

View File

@@ -100,7 +100,7 @@ public final class JarEntryData {
* @return the underlying {@link RandomAccessData} for this entry. Generally this
* method should not be called directly and instead data should be accessed via
* {@link JarFile#getInputStream(ZipEntry)}.
* @throws IOException
* @throws IOException if the data cannot be read
*/
public RandomAccessData getData() throws IOException {
if (this.data == null) {

View File

@@ -89,7 +89,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException
* @throws IOException if the file cannot be read
*/
public JarFile(File file) throws IOException {
this(new RandomAccessDataFile(file));
@@ -98,7 +98,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/**
* Create a new {@link JarFile} backed by the specified file.
* @param file the root jar file
* @throws IOException
* @throws IOException if the file cannot be read
*/
JarFile(RandomAccessDataFile file) throws IOException {
this(file, "", file);
@@ -110,7 +110,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* @param rootFile the root jar file
* @param pathFromRoot the name of this file
* @param data the underlying data
* @throws IOException
* @throws IOException if the file cannot be read
*/
private JarFile(RandomAccessDataFile rootFile, String pathFromRoot,
RandomAccessData data) throws IOException {
@@ -320,19 +320,19 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
/**
* Return a nested {@link JarFile} loaded from the specified entry.
* @param ze the zip entry
* @param entry the zip entry
* @return a {@link JarFile} for the entry
* @throws IOException
* @throws IOException if the nested jar file cannot be read
*/
public synchronized JarFile getNestedJarFile(final ZipEntry ze) throws IOException {
return getNestedJarFile(getContainedEntry(ze).getSource());
public synchronized JarFile getNestedJarFile(final ZipEntry entry) throws IOException {
return getNestedJarFile(getContainedEntry(entry).getSource());
}
/**
* Return a nested {@link JarFile} loaded from the specified entry.
* @param sourceEntry the zip entry
* @return a {@link JarFile} for the entry
* @throws IOException
* @throws IOException if the nested jar file cannot be read
*/
public synchronized JarFile getNestedJarFile(JarEntryData sourceEntry)
throws IOException {
@@ -388,7 +388,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* Return a new jar based on the filtered contents of this file.
* @param filters the set of jar entry filters to be applied
* @return a filtered {@link JarFile}
* @throws IOException
* @throws IOException if the jar file cannot be read
*/
public synchronized JarFile getFilteredJarFile(JarEntryFilter... filters)
throws IOException {
@@ -418,7 +418,7 @@ public class JarFile extends java.util.jar.JarFile implements Iterable<JarEntryD
* Return a URL that can be used to access this JAR file. NOTE: the specified URL
* cannot be serialized and or cloned.
* @return the URL
* @throws MalformedURLException
* @throws MalformedURLException if the URL is malformed
*/
public URL getUrl() throws MalformedURLException {
if (this.url == null) {

View File

@@ -42,7 +42,7 @@ public final class AsciiBytes {
/**
* Create a new {@link AsciiBytes} from the specified String.
* @param string
* @param string the source string
*/
public AsciiBytes(String string) {
this(string.getBytes(UTF_8));
@@ -52,7 +52,7 @@ public final class AsciiBytes {
/**
* Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes
* are not expected to change.
* @param bytes the bytes
* @param bytes the source bytes
*/
public AsciiBytes(byte[] bytes) {
this(bytes, 0, bytes.length);
@@ -61,7 +61,7 @@ public final class AsciiBytes {
/**
* Create a new {@link AsciiBytes} from the specified bytes. NOTE: underlying bytes
* are not expected to change.
* @param bytes the bytes
* @param bytes the source bytes
* @param offset the offset
* @param length the length
*/