Package com.jsoniter.spi
Class EmptyExtension
- java.lang.Object
-
- com.jsoniter.spi.EmptyExtension
-
-
Constructor Summary
Constructors Constructor Description EmptyExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canCreate(java.lang.Class clazz)
Can this extension create object instance for given interface typejava.lang.reflect.Type
chooseImplementation(java.lang.reflect.Type type)
Choose the implementation class for interface typesjava.lang.Object
create(java.lang.Class clazz)
Create object instance for given interface typeDecoder
createDecoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Customize type decodingEncoder
createEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Customize type encodingvoid
updateClassDescriptor(ClassDescriptor desc)
Update how binding is done for the class
-
-
-
Method Detail
-
chooseImplementation
public java.lang.reflect.Type chooseImplementation(java.lang.reflect.Type type)
Description copied from interface:Extension
Choose the implementation class for interface types- Specified by:
chooseImplementation
in interfaceExtension
- Parameters:
type
- the type to decode to, could be class or parameterized type- Returns:
- the implementation type to use
-
canCreate
public boolean canCreate(java.lang.Class clazz)
Description copied from interface:Extension
Can this extension create object instance for given interface type
-
create
public java.lang.Object create(java.lang.Class clazz)
Description copied from interface:Extension
Create object instance for given interface type
-
createDecoder
public Decoder createDecoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Description copied from interface:Extension
Customize type decoding- Specified by:
createDecoder
in interfaceExtension
- Parameters:
cacheKey
- name of the decodertype
- change how to decode the type- Returns:
- null, if no special customization needed
-
createEncoder
public Encoder createEncoder(java.lang.String cacheKey, java.lang.reflect.Type type)
Description copied from interface:Extension
Customize type encoding- Specified by:
createEncoder
in interfaceExtension
- Parameters:
cacheKey
- name of the encodertype
- change how to encode the type- Returns:
- null, if not special customization needed
-
updateClassDescriptor
public void updateClassDescriptor(ClassDescriptor desc)
Description copied from interface:Extension
Update how binding is done for the class- Specified by:
updateClassDescriptor
in interfaceExtension
- Parameters:
desc
- binding information
-
-