Package net.rubygrapefruit.platform

# Class Native

java.lang.Object
net.rubygrapefruit.platform.Native

public class Native extends Object
Provides access to the native integrations. Use `get(Class)` to load a particular integration.

## Method Summary

Modifier and Type
Method
Description
`static <T extends NativeIntegration>
T`
`get(Class<T> type)`
Locates a native integration of the given type.
`static void`
`init(File extractDir)`
Initialises the native integration, if not already initialized.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### init

public static void init(File extractDir) throws NativeIntegrationUnavailableException, NativeException
Initialises the native integration, if not already initialized.

Parameters:
  `extractDir` - The directory to extract native resources into. May be null, in which case a default is selected.
Throws:
  `NativeIntegrationUnavailableException` - When native integration is not available on the current machine.
  `NativeException` - On failure to load the native integration.

### get

public static <T extends NativeIntegration> T get(Class<T> type) throws NativeIntegrationUnavailableException, NativeException
Locates a native integration of the given type.

Returns:
  The native integration. Never returns null.
Throws:
  `NativeIntegrationUnavailableException` - When the given native integration is not available on the current machine.
  `NativeException` - On failure to load the native integration.