⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 extensionmaploader.java.svn-base

📁 一个JAVA程序员的游戏
💻 SVN-BASE
字号:
/*
 * ExtensionMapLoader.java
 *
 * Created on 1. Februar 2007, 21:21
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package kanjitori.map;

import java.util.HashMap;
import kanjitori.ExtensionLoader;
import kanjitori.Loader;

/**
 * ExtensionMapLoader invokes other MapLoaders based on the extension of the given
 * file name. 
 * The class implements the singleton pattern. Other Maploaders can be registered
 * with the register method. A Maploader can be registered multiple times with different
 * extensions. Please note that all extensions are converted and treated as lowercase.
 * Registering a MapLoader with an already registered extension will unregister the
 * former MapLoader attached to that extension.
 * @author Pirx
 */
public class ExtensionMapLoader extends ExtensionLoader<Map> implements MapLoader {
    
    private static final ExtensionMapLoader INSTANCE = new ExtensionMapLoader();
    
    private ExtensionMapLoader() {
        register("bsh", new BshMapLoader());
        register("map", new XmlMapLoader());
    }
    
    /**
     * Accessor to the singleton instance.
     * @return The singleton instance of ExtensionMapLoader
     */
    public static ExtensionMapLoader getMapLoader() {
        return INSTANCE;
    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -