Note about delegating calls to {@link BasicSerializerFactory}: although it would be nicer to use linear delegation for construction (to essentially dispatch all calls first to the underlying {@link BasicSerializerFactory}; or alternatively after failing to provide bean-based serializer}, there is a problem: priority levels for detecting standard types are mixed. That is, we want to check if a type is a bean after some of "standard" JDK types, but before the rest. As a result, "mixed" delegation used, and calls are NOT done using regular {@link SerializerFactory} interface but rather viadirect calls to {@link BasicSerializerFactory}.
Finally, since all caching is handled by the serializer provider (not factory) and there is no configurability, this factory is stateless. This means that a global singleton instance can be used.
|
|