public final class NativeLookup
- Object
- NativeLookup
Creates an instance of the native interface which will call the underlying platform using the convention documented in the package docs. To understand more about native interfaces you can check out this quick “How Do I?” tutorial.
Alternatively you can dig deeper into this tutorial for integrating 3rd party native libraries.
Methods
public static boolean isVerbose() | Indicates whether stack traces should be printed when lookup fails |
public static void setVerbose(boolean aVerbose) | Indicates whether stack traces should be printed when lookup fails |
public static <T extends NativeInterface> T create(Class<T> c) | Creates an instance of the given native interface and returns it for user callbacks. |
public static void register(Class ni, Class cls) | Do NOT invoke this method. |
Inherited methods
Method details
isVerbose
public static boolean isVerbose()Indicates whether stack traces should be printed when lookup fails
Returns
the verbose
setVerbose
public static void setVerbose(boolean aVerbose)Indicates whether stack traces should be printed when lookup fails
Parameters
aVerboseboolean- the verbose to set
create
public static <T extends NativeInterface> T create(Class<T> c)Creates an instance of the given native interface and returns it for
user callbacks.
Parameters
cClass<T>- the class of the NativeInterface sub interface
Returns
an instance of that interface that can be invoked or null if the native interface isn’t
present on the underlying platform (e.g. simulator platform).
register
public static void register(Class ni, Class cls)Do NOT invoke this method. This method is invoked internally by the stub to register the implementation class
that matches a specific interface type.
Parameters
niClass- the native interface
clsClass- the stub class matching said interface