OMS (v3.0.25)

oms3.util
Class Libraries

java.lang.Object
  extended by oms3.util.Libraries

public class Libraries
extends java.lang.Object

Simplifies runtime binding of dynamic shared libraries to Java Interfaces.

Author:
od

Method Summary
static
<T extends com.sun.jna.Library>
T
bind(java.lang.Class<T> intf)
          Maps a DLL to an interface using the @DLL annotation.
static
<T extends com.sun.jna.Library>
T
bind(java.lang.String name, java.lang.Class<T> intf)
          Bind the Library 'name' to the interface 'intf', No annotation needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

bind

public static <T extends com.sun.jna.Library> T bind(java.lang.Class<T> intf)
Maps a DLL to an interface using the @DLL annotation.

Type Parameters:
T - The interface type
Parameters:
intf - The interface class
Returns:
the Library instance of type T
See Also:
DLL

bind

public static <T extends com.sun.jna.Library> T bind(java.lang.String name,
                                                     java.lang.Class<T> intf)
Bind the Library 'name' to the interface 'intf', No annotation needed.

Type Parameters:
T -
Parameters:
name - the library name, if not provided the Interface must be annotated with '@DLL'
intf - the interface
Returns:
The library interface bound to a DLL.

OMS (v3.0.25)

Generated 2010-08-11 08:44:20 MDT, USDA-ARS-ASRU/CSU, 2150 Center Ave, Fort Collins, CO 80526, U.S.A.