限定符 | 构造器和说明 |
---|---|
protected |
Converter() |
限定符和类型 | 方法和说明 |
---|---|
protected static String |
getFieldName(Field field,
boolean useAnnotation)
获取字段要解析|转换的名称
|
protected static boolean |
isBaseClass(Class<?> clz)
判断是否是基类
|
protected static boolean |
isTransient(Class clz) |
protected static boolean |
isWrapClass(Class clz)
判断是否是包装类
|
static boolean |
parseBoolean(String str,
boolean defaultValue)
解析Boolean
|
static double |
parseDouble(String str,
double defaultValue)
解析Double
|
static float |
parseFloat(String str,
float defaultValue)
解析Float
|
static int |
parseInt(String str,
int defaultValue)
解析Int
|
static long |
parseLong(String str,
long defaultValue)
解析Long
|
static <T> T |
parserJson(Class<T> c,
String str,
boolean useAnnotation) |
static <T> List<T> |
parserJsonList(Class<T> c,
String str,
boolean useAnnotation) |
static <T> T |
parserXml(Class<T> c,
String str,
boolean useAnnotation) |
static <T> List<T> |
parserXmlList(Class<T> c,
String str,
boolean useAnnotation) |
public static <T> T parserXml(Class<T> c, String str, boolean useAnnotation) throws XMLParserException
public static <T> List<T> parserXmlList(Class<T> c, String str, boolean useAnnotation) throws XMLParserException
public static <T> T parserJson(Class<T> c, String str, boolean useAnnotation) throws JSONParserException
public static <T> List<T> parserJsonList(Class<T> c, String str, boolean useAnnotation) throws JSONParserException
public static int parseInt(String str, int defaultValue)
str
- defaultValue
- public static double parseDouble(String str, double defaultValue)
str
- defaultValue
- public static boolean parseBoolean(String str, boolean defaultValue)
str
- defaultValue
- public static long parseLong(String str, long defaultValue)
str
- defaultValue
- public static float parseFloat(String str, float defaultValue)
str
- defaultValue
- protected static boolean isTransient(Class clz)
protected static boolean isBaseClass(Class<?> clz)
clz
- protected static boolean isWrapClass(Class clz)
clz
-