# HG changeset patch # User Doug Simon # Date 1407315582 -7200 # Node ID 13f8c249edb8320aa9893a0d28eb70d4a1e0af6d # Parent 3cd605c9806096b083cc123ce929a940efcb822d NFI: more cleanup diff -r 3cd605c98060 -r 13f8c249edb8 graal/com.oracle.nfi/src/com/oracle/nfi/NativeFunctionInterfaceRuntime.java --- 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 null. + * @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; } }