public class TimeZoneConverter extends AbstractConverter implements MatcherConverter
Modifier and Type | Field and Description |
---|---|
static TimeZoneConverter |
INSTANCE
单例
|
Constructor and Description |
---|
TimeZoneConverter() |
Modifier and Type | Method and Description |
---|---|
protected TimeZone |
convertInternal(Class<?> targetClass,
Object value)
内部转换器,被
AbstractConverter.convert(Type, Object) 调用,实现基本转换逻辑内部转换器转换后如果转换失败可以做如下操作,处理结果都为返回默认值: 1、返回 null
2、抛出一个RuntimeException 异常
|
boolean |
match(Type targetType,
Class<?> rawType,
Object value)
判断需要转换的对象是否匹配当前转换器,满足则转换,否则跳过
|
convert, convertToStr
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
match
public static final TimeZoneConverter INSTANCE
public boolean match(Type targetType, Class<?> rawType, Object value)
MatcherConverter
match
in interface MatcherConverter
targetType
- 转换的目标类型,不能为null
rawType
- 目标原始类型,当targetType为Class时,和此参数一致,不能为null
value
- 需要转换的值protected TimeZone convertInternal(Class<?> targetClass, Object value)
AbstractConverter
AbstractConverter.convert(Type, Object)
调用,实现基本转换逻辑1、返回null
2、抛出一个RuntimeException
异常
convertInternal
in class AbstractConverter
targetClass
- 目标类型value
- 值Copyright © 2025. All rights reserved.