code: private Multimap<Class, SagaType> initializeMessageMappings(final Map<Class<? extends Saga>, SagaHandlersMap> handlersMap) {
          Multimap<Class, SagaType> scannedTypes = LinkedListMultimap.create();
  
          for (Map.Entry<Class<? extends Saga>, SagaHandlersMap> entry : handlersMap.entrySet()) {
              Class<? extends Saga> sagaClass = entry.getKey();
  
              Collection<MessageHandler> sagaHandlers = entry.getValue().messageHandlers();
              for (MessageHandler handler : sagaHandlers) {
  
                  // remember all message types where a completely new saga needs to be started.
                  if (handler.getStartsSaga()) {
                      scannedTypes.put(handler.getMessageType(), SagaType.startsNewSaga(sagaClass));
                  } else {
                      scannedTypes.put(handler.getMessageType(), SagaType.continueSaga(sagaClass));
                  }
              }
          }
  
          return scannedTypes;
      }
docs: Populate internal map to translate between incoming message event type and saga type.