public final class NTypes extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
NTypes.CallbackParam |
static interface |
NTypes.TargetTransform |
| Modifier and Type | Field and Description |
|---|---|
static Map<?,?> |
API_OPTIONS
Defines JNA function binding options.
|
static NEncoding |
STRING_ENCODING
String encoding.
|
static boolean |
WCHAR_API
Defines whether Unicode API are used.
|
| Modifier and Type | Method and Description |
|---|---|
static HNCallback |
clone(HNCallback hValue)
Creates a copy of the specified callback.
|
static HNString |
clone(HNString hValue)
Creates a clone of the specified string.
|
static HNCallback |
createCallback(NCallback callback,
EventListener listener)
Creates a new callback.
|
static HNCallback |
createCallback(NCallback callback,
NObject target,
EventListener listener) |
static HNCallback |
createCallback(NCallback callback,
NObject target,
NTypes.TargetTransform targetTransform,
Object param,
EventListener listener) |
static HNCallback |
createCallback(NCallback callback,
Object param)
Creates a new callback.
|
static <E,S extends NStructure<E>> |
disposeArray(Class<S> structureClass,
com.sun.jna.Pointer arValues,
int valueCount,
Method disposeMethod) |
static <E,S extends NStructure<E>> |
disposeElements(Class<S> structureClass,
com.sun.jna.Pointer arValues,
int valueCount,
Method disposeMethod) |
static void |
free(HNCallback hValue)
Frees the specified callback.
|
static void |
free(HNString hValue)
Frees a block of memory.
|
static void |
freeObjectPointer(com.sun.jna.Pointer ptr)
For internal use.
|
static void |
freeStringArray(com.sun.jna.Pointer arhStrings,
int count)
Frees specified strings.
|
static void |
freeStringElements(com.sun.jna.Pointer arhStrings,
int count)
Frees specified string elements.
|
static char[] |
fromDefaultEncoding(byte[] value)
Converts the specified default endcoding byte array into a char array.
|
static <E extends Enum<E> & NEnum> |
getEnum(int value,
Map<Integer,E> map)
Retrieves the specified enumeration from the specified enumeration map.
|
static <E extends Enum<E> & NEnum> |
getEnumMap(Class<E> cls)
Retrieves the enumeration map for the specified type.
|
static <E extends Enum<E> & NEnum> |
getEnumSet(int value,
Map<Integer,E> map,
Class<E> cls)
Retrieves the enumeration set for the specified enumeration value and type.
|
static Object |
getObjectFromPointer(com.sun.jna.Pointer ptr)
Retrieves an object indicated by a pointer.
|
static NCallback |
getPointerEqualsProc()
Gets a PointerEquals process callback.
|
static com.sun.jna.Pointer |
getPointerForCallback(NCallback callback)
For internal use.
|
static com.sun.jna.Pointer |
getPointerForObject(Object obj)
For internal use.
|
static NCallback |
getPointerFreeProc()
Gets a free pointer.
|
static NCallback |
getPointerGetHashCodeProc()
Gets a pointer to the PointerGetHashCode process.
|
static <E extends Enum<E> & NEnum> |
getValue(EnumSet<E> enumSet)
Gets the enumeration value of the specified enumeration set.
|
static boolean |
isPointerFreeProc(HNCallback hCallback)
Checks whether the callback process is PointerFree process.
|
static NType |
nACharNativeTypeOf()
Gets the native type of the ASCII char.
|
static NType |
nativeTypeOf()
Retrieves the native type for the enclosing class.
|
static NType |
nBooleanNativeTypeOf()
Gets the native type of the Boolean value.
|
static NType |
nCallbackNativeTypeOf()
Gets the native type of the callback.
|
static NType |
nCharNativeTypeOf()
Gets the native type of the char.
|
static NType |
nDateTimeNativeTypeOf()
Gets the native type of the date value.
|
static NType |
nDoubleNativeTypeOf()
Gets the native type of the double number.
|
static NType |
nGuidNativeTypeOf()
Gets the native type of the universal unique indentifier.
|
static NType |
nInt16NativeTypeOf()
Gets the native type of the short integer.
|
static NType |
nInt32NativeTypeOf()
Gets the native type of the integer.
|
static NType |
nInt64NativeTypeOf()
Gets the native type of the long integer.
|
static NType |
nInt8NativeTypeOf()
Gets the native type of the byte.
|
static NType |
nPointerNativeTypeOf()
Gets the native type of the pointer.
|
static NType |
nResultNativeTypeOf()
Gets the native type of the result.
|
static NType |
nSingleNativeTypeOf()
Gets the native type of the floating point value.
|
static NType |
nSizeTypeNativeTypeOf()
Gets the native type of the unsigned native size.
|
static NType |
nSSizeTypeNativeTypeOf()
Gets the native type of the native size.
|
static NType |
nStringNativeTypeOf()
Gets the native type of the string.
|
static NType |
nTimeSpanNativeTypeOf()
Gets the native type of the duration value.
|
static NType |
nUInt16NativeTypeOf()
Gets the native type of the unsigned short integer.
|
static NType |
nUInt32NativeTypeOf()
Gets the native type of the unsigned integer.
|
static NType |
nUInt64LongNativeTypeOf()
Gets the native type of the unsigned long integer.
|
static NType |
nUInt8NativeTypeOf()
Gets the native type of the unsigned byte.
|
static NType |
nWCharNativeTypeOf()
Gets the native type of the Unicode char.
|
static void |
setCallbackThreadInitializer(NCallback callback)
For internal use.
|
static char[] |
toCharArray(HNString hValue)
Returns a char array representing the specified type.
|
static Date |
toDate(long value,
boolean isUTC)
Converts a long value into UTC DateTime value.
|
static byte[] |
toDefaultEncoding(char[] value)
Converts the specified char array into a byte array of default endcoding.
|
static long |
toDuration(long value)
Converts a long value into a duration value.
|
static long |
toNativeDate(Date value,
boolean isUTC)
Converts an UTC DateTime value into long value.
|
static long |
toNativeDuration(long value)
Converts a long value into a native duration value.
|
static HNString |
toNativeString(char[] value)
Converts the specified char array into a native string.
|
static HNString |
toNativeString(String value)
Converts the specified string into a native string.
|
static String |
toString(HNString hValue)
Returns a string that represents the specified type.
|
public static final boolean WCHAR_API
public static final NEncoding STRING_ENCODING
public static final Map<?,?> API_OPTIONS
public static void setCallbackThreadInitializer(NCallback callback)
public static com.sun.jna.Pointer getPointerForCallback(NCallback callback)
public static com.sun.jna.Pointer getPointerForObject(Object obj)
public static void freeObjectPointer(com.sun.jna.Pointer ptr)
public static Object getObjectFromPointer(com.sun.jna.Pointer ptr)
ptr - A pointer to an object.public static NCallback getPointerFreeProc()
public static NCallback getPointerGetHashCodeProc()
public static NCallback getPointerEqualsProc()
public static boolean isPointerFreeProc(HNCallback hCallback)
hCallback - true if the callback process is PointerFree process, else falsepublic static void free(HNCallback hValue)
hValue - The callback to be freed.public static HNCallback clone(HNCallback hValue)
hValue - The original callback.public static HNCallback createCallback(NCallback callback, Object param)
callback - Native callback delegate.param - Callback parameters.public static HNCallback createCallback(NCallback callback, EventListener listener)
callback - Native callback delegate.listener - Callback listener.public static HNCallback createCallback(NCallback callback, NObject target, EventListener listener)
public static HNCallback createCallback(NCallback callback, NObject target, NTypes.TargetTransform targetTransform, Object param, EventListener listener)
public static NType nUInt8NativeTypeOf()
public static NType nInt8NativeTypeOf()
public static NType nUInt16NativeTypeOf()
public static NType nInt16NativeTypeOf()
public static NType nUInt32NativeTypeOf()
public static NType nInt32NativeTypeOf()
public static NType nUInt64LongNativeTypeOf()
public static NType nInt64NativeTypeOf()
public static NType nSingleNativeTypeOf()
public static NType nDoubleNativeTypeOf()
public static NType nBooleanNativeTypeOf()
public static NType nSizeTypeNativeTypeOf()
public static NType nSSizeTypeNativeTypeOf()
public static NType nPointerNativeTypeOf()
public static NType nResultNativeTypeOf()
public static NType nACharNativeTypeOf()
public static NType nWCharNativeTypeOf()
public static NType nCharNativeTypeOf()
public static NType nStringNativeTypeOf()
public static NType nCallbackNativeTypeOf()
public static NType nativeTypeOf()
public static NType nTimeSpanNativeTypeOf()
public static NType nDateTimeNativeTypeOf()
public static NType nGuidNativeTypeOf()
public static String toString(HNString hValue)
hValue - A handle to the name of the specified type.public static char[] toCharArray(HNString hValue)
hValue - A handle to the name of the specified type.public static HNString toNativeString(String value)
value - The original string.public static HNString toNativeString(char[] value)
value - The char array.public static <E extends Enum<E> & NEnum> Map<Integer,E> getEnumMap(Class<E> cls)
cls - The type.public static <E extends Enum<E> & NEnum> E getEnum(int value, Map<Integer,E> map)
value - The enumeration value.map - The enumeration map.public static <E extends Enum<E> & NEnum> EnumSet<E> getEnumSet(int value, Map<Integer,E> map, Class<E> cls)
value - The enumeration value.map - The enumeration map.cls - The type.public static <E extends Enum<E> & NEnum> int getValue(EnumSet<E> enumSet)
enumSet - The enumeration set.public static void free(HNString hValue)
hValue - a handle to the name of the block of memory to be freed.public static HNString clone(HNString hValue)
hValue - Handle to the original string.public static void freeStringElements(com.sun.jna.Pointer arhStrings,
int count)
arhStrings - Pointer to an array of string elements.count - Number of string elements in the array.public static void freeStringArray(com.sun.jna.Pointer arhStrings,
int count)
arhStrings - Pointer to an array of strings.count - Number of strings in the array.public static <E,S extends NStructure<E>> void disposeElements(Class<S> structureClass, com.sun.jna.Pointer arValues, int valueCount, Method disposeMethod)
public static <E,S extends NStructure<E>> void disposeArray(Class<S> structureClass, com.sun.jna.Pointer arValues, int valueCount, Method disposeMethod)
public static byte[] toDefaultEncoding(char[] value)
value - The char array.public static char[] fromDefaultEncoding(byte[] value)
value - The default encoding byte array.public static Date toDate(long value, boolean isUTC)
value - A raw UTC date.public static long toNativeDate(Date value, boolean isUTC)
value - UTC DateTime value.public static long toDuration(long value)
value - The long integer.public static long toNativeDuration(long value)
value - The long integer.Copyright © 2016 Neurotechnology. All rights reserved.