synchronized TypeSerializerFactory factory(Class<?> type) {
    TypeSerializerFactory factory = factories.get(type);
    if (factory != null) {
      return factory;
    }

    Class<?> baseType;

    // If no factory was found, determine if an abstract serializer can be used.
    baseType = findBaseType(type, abstractFactories);
    if (baseType != null) {
      return abstractFactories.get(baseType);
    }

    // If no factory was found, determine if a default serializer can be used.
    baseType = findBaseType(type, defaultFactories);
    if (baseType != null) {
      return defaultFactories.get(baseType);
    }
    return null;
  }
synchronized TypeSerializerFactory factory ( Class < ? > type ) { TypeSerializerFactory factory = factories . get ( type ) ; if ( factory != null ) { return factory ; } Class < ? > baseType ; baseType = findBaseType ( type , abstractFactories ) ; if ( baseType != null ) { return abstractFactories . get ( baseType ) ; } baseType = findBaseType ( type , defaultFactories ) ; if ( baseType != null ) { return defaultFactories . get ( baseType ) ; } return null ; }
Looks up the serializer for the given class else {@code null} if no serializer is registered for the {@code type}.

@param type The serializable class.
@return The serializer for the given class.