|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjp.develop.common.util.amf.Converter
public class Converter
Object Converter to avoid ClassCastException. You can add conversion rule by adding the implementation of IConverter.
AmfDecoderOption| Constructor Summary | |
|---|---|
Converter()
Default Constructor. |
|
| Method Summary | ||
|---|---|---|
|
convert(Class<T> clazz,
Object instance)
Convert type. |
|
|
getConverter(Class<T> clazz)
Get custom converter for the class. |
|
static Converter |
getDefault()
Get default converter instance. |
|
|
putConverter(Class<T> clazz,
IConverter<? extends T> conveter)
Resister custom converter for the class. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Converter()
| Method Detail |
|---|
public static Converter getDefault()
public <T> T convert(Class<T> clazz,
Object instance)
T - Conversion target type.clazz - The class of converting to.instance - Target instance to be converted.
public <T> IConverter<? extends T> getConverter(Class<T> clazz)
T - The type to be converted.clazz - Target class.
public <T> void putConverter(Class<T> clazz,
IConverter<? extends T> conveter)
T - The type to be converted.clazz - The class to be converted.conveter - The converter for the class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||