|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jniwrapper.util.FunctionCache | +--com.jniwrapper.win32.WinFunctionCache
This class provides functionality for seleting appropriate function instance between ANSI and Unicode analogues available in Win32 API depending on the configuration of the cache.
In addition this class is a factory for string parameters, which are created also accordingly to whether Unicode or ANSI functions should be used.
Constructor Summary | |
WinFunctionCache(Library library)
|
|
WinFunctionCache(java.lang.String libraryName)
|
Method Summary | |
Function |
getFunction(java.lang.String[] functionNames)
Deprecated. Use FunctionName class instead. |
boolean |
isUnicode()
|
void |
setUnicode(boolean unicode)
Instructs the cache use Unicode or ANSI functions and parameter types. |
ZeroTerminatedString |
stringParam()
Factory method for creating encoding-dependent blank string parameter instance. |
ZeroTerminatedString |
stringParam(java.lang.String s)
Factory method for creating encoding-dependent string parameter instance. |
ZeroTerminatedString |
stringParam(java.lang.String s,
int maxLen)
Factory method for creating encoding-dependent string parameter instance with restricted length. |
ZeroTerminatedString |
stringParam(ZeroTerminatedString s)
Factory method for creating encoding-dependent string parameter instance. |
Methods inherited from class com.jniwrapper.util.FunctionCache |
getFunction |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WinFunctionCache(java.lang.String libraryName)
public WinFunctionCache(Library library)
Method Detail |
public Function getFunction(java.lang.String[] functionNames)
FunctionName
class instead.
functionNames
- a pair of non-Unicode and Unicode function names.
ANSI function name should be the 1st entry in the passed array.
java.lang.IllegalArgumentException
- if the passed array's lenght is not equal 2.public boolean isUnicode()
public void setUnicode(boolean unicode)
unicode
- if true Unicode names and types will be used, otherwise ANSI.public ZeroTerminatedString stringParam()
WideString
for Unicode,
and AnsiString
for ANSI mode.public ZeroTerminatedString stringParam(java.lang.String s)
s
- initial string value.
WideString
for Unicode,
and AnsiString
for ANSI mode.public ZeroTerminatedString stringParam(java.lang.String s, int maxLen)
s
- initial string value.maxLen
- maximum length allowed for the string.
WideString
for Unicode,
and AnsiString
for ANSI mode.public ZeroTerminatedString stringParam(ZeroTerminatedString s)
s
- initial string value.
WideString
for Unicode,
and AnsiString
for ANSI mode.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |