From: <ga...@us...> - 2009-02-28 19:45:49
|
Revision: 5075 http://jnode.svn.sourceforge.net/jnode/?rev=5075&view=rev Author: galatnm Date: 2009-02-28 19:45:46 +0000 (Sat, 28 Feb 2009) Log Message: ----------- Correct and improve javadocs. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/FSEntry.java trunk/fs/src/fs/org/jnode/fs/Formatter.java trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java Modified: trunk/fs/src/fs/org/jnode/fs/FSEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FSEntry.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/FSEntry.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -34,11 +34,15 @@ /** * Gets the name of this entry. + * + * @return name of the entry. */ public String getName(); /** * Gets the directory this entry is a part of. + * + * @return {@link FSDirectory} that is the parent of the entry. */ public FSDirectory getParent(); @@ -46,61 +50,77 @@ * Gets the last modification time of this entry. * * @return the last modification time of the entry as milliseconds since 1970, or {@code 0} - * if this filesystem does not support getting the last modified time. + * if this files ystem does not support getting the last modified time. + * * @throws IOException if an error occurs retrieving the timestamp. */ public long getLastModified() throws IOException; /** - * Is this entry refering to a file? + * Returns <tt>true</tt> if this entry refering to a file. + * + * @return <tt>true</tt> if this entry refering to a file. */ public boolean isFile(); /** - * Is this entry refering to a (sub-)directory? + * Returns <tt>true</tt> if this entry refering to a (sub-)directory. + * + * @return <tt>true</tt> if this entry refering to a (sub-)directory. */ public boolean isDirectory(); /** * Sets the name of this entry. + * + * @param newName new name that identify the entry. + * + * @throws IOException if name already used. */ public void setName(String newName) throws IOException; /** * Gets the last modification time of this entry. * - * @throws IOException + * @param lastModified the last modified time of the entry in millisecond. + * + * @throws IOException if error occurs during set of the timestamp. */ public void setLastModified(long lastModified) throws IOException; /** - * Gets the file this entry refers to. This method can only be called if - * <code>isFile</code> returns true. + * Gets the file this entry refers to. * - * @return The file described by this entry + * @return The file described by this entry. + * + * @throws IOException if entry is not a file. */ public FSFile getFile() throws IOException; /** - * Gets the directory this entry refers to. This method can only be called - * if <code>isDirectory</code> returns true. + * Gets the directory this entry refers to. * - * @return The directory described by this entry + * @return The directory described by this entry. + * + * @throws IOException of entry is not a directory. */ public FSDirectory getDirectory() throws IOException; /** - * Gets the accessrights for this entry. + * Gets the access rights for this entry. * - * @throws IOException + * @return {@link FSAccessRights} represent rights for this entry. + * + * @throws IOException if access rights are unavailable. */ public FSAccessRights getAccessRights() throws IOException; /** - * Indicate if the entry has been modified in memory (ie need to be saved) + * Returns <tt>true</tt> if the entry has been modified in memory and need to be saved. * - * @return true if the entry need to be saved - * @throws IOException + * @return <tt>true</tt> if the entry need to be saved + * + * @throws IOException if error occurs during retrieving of the state of the entry. */ public boolean isDirty() throws IOException; } Modified: trunk/fs/src/fs/org/jnode/fs/Formatter.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/Formatter.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/Formatter.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -26,7 +26,7 @@ * * @author Fabien DUMINY (fduminy at jnode.org) * - * @param <T> + * @param <T> a file system implementation. */ public abstract class Formatter<T extends FileSystem<?>> implements Cloneable { private final FileSystemType<T> type; @@ -39,11 +39,18 @@ * Format the given device * * @param device The device we want to format + * * @return the newly created FileSystem - * @throws FileSystemException + * + * @throws FileSystemException if error occurs during formating of the device */ public abstract T format(Device device) throws FileSystemException; + /** + * Gets type of the formated file system. + * + * @return type of the file system. + */ public final FileSystemType<T> getFileSystemType() { return type; } Modified: trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2009-02-28 19:22:01 UTC (rev 5074) +++ trunk/fs/src/fs/org/jnode/fs/ReadOnlyFileSystemException.java 2009-02-28 19:45:46 UTC (rev 5075) @@ -23,18 +23,28 @@ import java.io.IOException; /** + * New exception allowing to handle cases where a FileSystem is mounted readOnly + * * @author Fabien DUMINY * - * New exception allowing to handle cases where a FileSystem is mounted readOnly + * */ +@SuppressWarnings("serial") public class ReadOnlyFileSystemException extends IOException { - + /** + * Constructs a {@code ReadOnlyFileSystemException} with + * a default error message. + */ public ReadOnlyFileSystemException() { - super("read-only file system"); + super("The file system is flagged as read-only. No modifications allowed."); } + /** - * @param message - * @param cause + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified cause and message. + * + * @param message the detail message of the exception. + * @param cause the cause of the exception. */ public ReadOnlyFileSystemException(String message, Throwable cause) { super(message); @@ -42,7 +52,10 @@ } /** - * @param cause + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified cause. + * + * @param cause the cause of the exception. */ public ReadOnlyFileSystemException(Throwable cause) { super(); @@ -50,7 +63,10 @@ } /** - * @param message + * Constructs a {@code ReadOnlyFileSystemException} with + * the specified message. + * + * @param message the detail message of the exception. */ public ReadOnlyFileSystemException(String message) { super(message); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |