001/**
002 * 
003 */
004package org.jdrupes.taglets.plantUml;
005
006import java.util.Map;
007
008/**
009 * This class provides the static method for registering the tags. 
010 */
011public class Taglet {
012
013    /**
014     * Register the taglet(s).
015     * 
016     * @param tagletMap  the map to register this tag to.
017     */
018    public static void register(Map<String,
019                com.sun.tools.doclets.internal.toolkit.taglets.Taglet> tagletMap) {
020        // This is a bit special, because we want two tags to share their options
021        register(tagletMap, new PlantUml());
022        register(tagletMap, new StartUml());
023        register(tagletMap, new EndUml());
024    }
025
026    private static void register(Map<String,
027                com.sun.tools.doclets.internal.toolkit.taglets.Taglet>
028        tagletMap, com.sun.tools.doclets.internal.toolkit.taglets.Taglet taglet) {
029        com.sun.tools.doclets.internal.toolkit.taglets.Taglet t 
030                = tagletMap.get(taglet.getName());
031        if (t != null) {
032            tagletMap.remove(taglet.getName());
033        }
034        tagletMap.put(taglet.getName(), taglet);
035    }
036
037}