From d70a620089250ac62426b3696d460eb23de06eba Mon Sep 17 00:00:00 2001 From: Adam Murdoch Date: Sun, 7 Oct 2012 07:00:27 +1000 Subject: [PATCH] Javadocs. --- src/main/java/net/rubygrapefruit/platform/FileSystems.java | 1 + src/main/java/net/rubygrapefruit/platform/Native.java | 2 +- src/main/java/net/rubygrapefruit/platform/Terminal.java | 1 + src/main/java/net/rubygrapefruit/platform/Terminals.java | 1 + src/main/java/net/rubygrapefruit/platform/ThreadSafe.java | 4 ++++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/rubygrapefruit/platform/FileSystems.java b/src/main/java/net/rubygrapefruit/platform/FileSystems.java index d3ad74c..1eeb7dd 100644 --- a/src/main/java/net/rubygrapefruit/platform/FileSystems.java +++ b/src/main/java/net/rubygrapefruit/platform/FileSystems.java @@ -10,6 +10,7 @@ public interface FileSystems extends NativeIntegration { /** * Returns the set of all file systems for the current machine. * + * @return The set of file systems. Never returns null. * @throws NativeException On failure. */ @ThreadSafe diff --git a/src/main/java/net/rubygrapefruit/platform/Native.java b/src/main/java/net/rubygrapefruit/platform/Native.java index 85efa23..a8f673d 100755 --- a/src/main/java/net/rubygrapefruit/platform/Native.java +++ b/src/main/java/net/rubygrapefruit/platform/Native.java @@ -56,7 +56,7 @@ public class Native { /** * Locates a native integration of the given type. * - * @return The native integration. + * @return The native integration. Never returns null. * @throws NativeIntegrationUnavailableException When the given native integration is not available on the current * machine. * @throws NativeException On failure to load the native integration. diff --git a/src/main/java/net/rubygrapefruit/platform/Terminal.java b/src/main/java/net/rubygrapefruit/platform/Terminal.java index 08e4b71..8f510c2 100644 --- a/src/main/java/net/rubygrapefruit/platform/Terminal.java +++ b/src/main/java/net/rubygrapefruit/platform/Terminal.java @@ -37,6 +37,7 @@ public interface Terminal { /** * Returns the size of the terminal. Supported by all terminals. * + * @return The current terminal size. Never returns null. * @throws NativeException On failure. */ @ThreadSafe diff --git a/src/main/java/net/rubygrapefruit/platform/Terminals.java b/src/main/java/net/rubygrapefruit/platform/Terminals.java index a0c5378..4af4b61 100644 --- a/src/main/java/net/rubygrapefruit/platform/Terminals.java +++ b/src/main/java/net/rubygrapefruit/platform/Terminals.java @@ -25,6 +25,7 @@ public interface Terminals extends NativeIntegration { /** * Returns the terminal attached to the given output. * + * @return The terminal. Never returns null. * @throws NativeException When the output is not attached to a terminal. */ @ThreadSafe diff --git a/src/main/java/net/rubygrapefruit/platform/ThreadSafe.java b/src/main/java/net/rubygrapefruit/platform/ThreadSafe.java index 4391182..286fe7b 100644 --- a/src/main/java/net/rubygrapefruit/platform/ThreadSafe.java +++ b/src/main/java/net/rubygrapefruit/platform/ThreadSafe.java @@ -1,7 +1,11 @@ package net.rubygrapefruit.platform; +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + /** * Indicates that the given class or method is thread safe. */ +@Target({ElementType.TYPE, ElementType.METHOD}) public @interface ThreadSafe { }