public Serializer registerDefault(Class<?> baseType, Class<? extends TypeSerializer> serializer) {
    registry.registerDefault(baseType, serializer);
    return this;
  }
public Serializer registerDefault ( Class < ? > baseType , Class < ? extends TypeSerializer > serializer ) { registry . registerDefault ( baseType , serializer ) ; return this ; }
Registers a default type serializer for the given base type.
<p>
Default serializers are used to serialize types for which no specific {@link TypeSerializer} is provided.
When a serializable type is {@link #register(Class) registered} without a {@link TypeSerializer}, the
first default serializer found for the given type is assigned as the serializer for that type. Default
serializers are evaluated against registered types in reverse insertion order, so default serializers
registered more recently take precedence over default serializers registered earlier.
<pre>
{@code
serializer.registerDefault(Serializable.class, SerializableSerializer.class);
serializer.register(SomeSerializable.class, 1);
}
</pre>
If an object of a type that has not been {@link #register(Class) registered} is
{@link #writeObject(Object) serialized} and {@link #isWhitelistRequired() whitelisting} is disabled,
the object will be serialized with the class name and a default serializer if one is found.

@param baseType The base type for which to register the default serializer. Types that extend the base
type and are registered without a specific {@link TypeSerializer} will be serialized
using the registered default {@link TypeSerializer}.
@param serializer The default type serializer with which to serialize instances of the base type.
@return The serializer.
@throws NullPointerException if either argument is {@code null}