com.eaio.nativecall
Interface Verifier

All Known Implementing Classes:
Win32Verifier

public interface Verifier

A Verifier implements method and module name checking for one given operating system. Classes implementing Verifier must be public and have a public no-argument constructor.

Author:
Johann Burkard

Method Summary
 String getDefaultModule()
          If there is a default module that system functions are stored in, the module's name may be returned here.
 Object handleString(String val, String module, String function)
          Converts the given String to one of the following data types, based on the module and the function name:
a byte array a char array
 boolean supports()
          Returns if this Verifier supports the given operating system.
 String verifyFunctionName(String function)
          Verifies that the given function name is correct.
 String verifyModuleName(String module)
          Verifies that the given module name is correct.
 

Method Detail

getDefaultModule

public String getDefaultModule()
If there is a default module that system functions are stored in, the module's name may be returned here.

Returns:
the name of a default module or null
See Also:
NativeCall.NativeCall(String)

supports

public boolean supports()
                 throws SecurityException
Returns if this Verifier supports the given operating system.

Returns:
if this operating system is supported
Throws:
SecurityException - because System properties may be queried

verifyModuleName

public String verifyModuleName(String module)
                        throws NullPointerException,
                               IllegalArgumentException
Verifies that the given module name is correct.

Parameters:
module - the module name, may be null
Returns:
a module name, possibly modified, never null
Throws:
NullPointerException - if the module name is null and there is no default module defined
IllegalArgumentException - if the module is illegal in the operating system
See Also:
getDefaultModule()

verifyFunctionName

public String verifyFunctionName(String function)
                          throws NullPointerException,
                                 IllegalArgumentException
Verifies that the given function name is correct.

Parameters:
function - the function name, may be null
Returns:
a function name, possibly modified, never null
Throws:
NullPointerException - if the function name is null
IllegalArgumentException - if the function is illegal in the operating system

handleString

public Object handleString(String val,
                           String module,
                           String function)
Converts the given String to one of the following data types, based on the module and the function name:

Parameters:
val - the String, never null
module - the module name, never null
function - the function name, never null
Returns:
the String converted, never null