T - the enum typepublic class EnumConverter<T extends Enum<T>> extends Object implements TypeConverter
TypeConverter that maps an integer enum value to
an actual Java enum.| Constructor and Description |
|---|
EnumConverter(Class<T> clazz) |
| Modifier and Type | Method and Description |
|---|---|
T |
fromNative(Object input,
FromNativeContext context)
Convert the given native object into its Java representation using
the given context.
|
Class<Integer> |
nativeType()
Indicate the native type used by this converter.
|
Integer |
toNative(Object input,
ToNativeContext context)
Convert a Java type to an appropriate native type.
|
public T fromNative(Object input, FromNativeContext context)
FromNativeConverterfromNative in interface FromNativeConverterpublic Integer toNative(Object input, ToNativeContext context)
ToNativeConverterPointer
NativeLong
Structure
WString
Buffer (unsupported in direct mode)
toNative in interface ToNativeConverterpublic Class<Integer> nativeType()
FromNativeConverternativeType in interface FromNativeConverternativeType in interface ToNativeConverter