public class TypeConverter
extends java.lang.Object
A TypeConverter converts a Python type into a Java Type. For example, a Python String might be converted to a Java character (e.g., when calling a method that only accepts characters).
Modifier and Type | Field and Description |
---|---|
static TypeConverter |
BYTE_CONVERTER |
static TypeConverter |
CHAR_CONVERTER |
static int |
DOUBLE_TO_FLOAT |
static TypeConverter |
FLOAT_CONVERTER |
static int |
INT_TO_BYTE |
static int |
INT_TO_SHORT |
static TypeConverter |
LONG_CONVERTER |
static int |
NO_CONVERSION |
static TypeConverter |
NO_CONVERTER |
static int |
NUM_TO_LONG |
static TypeConverter |
SHORT_CONVERTER |
static int |
STRING_TO_CHAR |
Constructor and Description |
---|
TypeConverter() |
TypeConverter(int conversion) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convert(java.lang.Object obj) |
int |
getConversion() |
public static final int NO_CONVERSION
public static final int DOUBLE_TO_FLOAT
public static final int INT_TO_SHORT
public static final int INT_TO_BYTE
public static final int STRING_TO_CHAR
public static final int NUM_TO_LONG
public static final TypeConverter NO_CONVERTER
public static final TypeConverter FLOAT_CONVERTER
public static final TypeConverter SHORT_CONVERTER
public static final TypeConverter BYTE_CONVERTER
public static final TypeConverter CHAR_CONVERTER
public static final TypeConverter LONG_CONVERTER