changeset 16705:13f8c249edb8

NFI: more cleanup
author Doug Simon <doug.simon@oracle.com>
date Wed, 06 Aug 2014 10:59:42 +0200
parents 3cd605c98060
children ff2b25002a58
files graal/com.oracle.nfi/src/com/oracle/nfi/NativeFunctionInterfaceRuntime.java
diffstat 1 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.nfi/src/com/oracle/nfi/NativeFunctionInterfaceRuntime.java	Wed Aug 06 08:27:42 2014 +0200
+++ b/graal/com.oracle.nfi/src/com/oracle/nfi/NativeFunctionInterfaceRuntime.java	Wed Aug 06 10:59:42 2014 +0200
@@ -25,22 +25,26 @@
 import com.oracle.nfi.api.*;
 
 /**
- * Class for obtaining the Native Function Interface runtime singleton object of this virtual
- * machine.
+ * Class for obtaining the {@link NativeFunctionInterface} (if any) provided by the VM.
  */
 public final class NativeFunctionInterfaceRuntime {
-    private static final NativeFunctionInterface INTERFACE;
+    private static final NativeFunctionInterface INSTANCE;
 
     /**
-     * Creates a new {@link NativeFunctionInterface} instance if running on top of Graal.
+     * Creates a new {@link NativeFunctionInterface}.
      *
-     * @throws UnsatisfiedLinkError if not running on top of Graal and initialize the
-     *             {@link NativeFunctionInterface} instance with <code>null</code>.
+     * @throws UnsatisfiedLinkError if not running on a VM that provides a
+     *             {@link NativeFunctionInterface}
      */
     private static native NativeFunctionInterface createInterface();
 
+    /**
+     * Gets the {@link NativeFunctionInterface} (if any) provided by the VM.
+     *
+     * @return null if the VM does not provide a {@link NativeFunctionInterface}
+     */
     public static NativeFunctionInterface getNativeFunctionInterface() {
-        return INTERFACE;
+        return INSTANCE;
     }
 
     static {
@@ -50,6 +54,6 @@
         } catch (UnsatisfiedLinkError e) {
             instance = null;
         }
-        INTERFACE = instance;
+        INSTANCE = instance;
     }
 }