001package jmri.configurexml;
002
003import java.util.Map;
004import javax.annotation.Nonnull;
005
006/**
007 * Interface for service provider instances that provide a class migration path
008 * that the {@link ConfigXmlManager} must be made aware of.
009 *
010 * @author Randall Wood Copyright 2017
011 */
012/*
013 * Note this is deliberately not advertised in help/html/doc/Technical/plugins.shtml
014 * since it enables the overriding of JMRI behaviors with a plugin instead of the
015 * extension of JMRI with a plugin
016 */
017public interface ClassMigration {
018
019    /**
020     * Get the map of migrated classes, where to the class to be migrated from
021     * is the key, and its replacement is the value.
022     *
023     * @return the map of migrations, or an empty map if none are provided.
024     */
025    @Nonnull
026    Map<String, String> getMigrations();
027
028}