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