moduledescriptor.java

来自「模块化您的应用系统」· Java 代码 · 共 58 行

JAVA
58
字号
package com.opensymphony.tonic;

import org.dom4j.Element;

public interface ModuleDescriptor
{
    /**
     * The complete key for this module, including the tonic key.
     * <p>
     * Format is tonic.key:module.key
     * </p>
     */
    String getCompleteKey();

    /**
     * The key for this module, unique within the tonic.
     */
    String getKey();

    /**
     * A simple string name for this descriptor.
     */
    String getName();

    /**
     * A simple description of this descriptor.
     */ 
    String getDescription();

    /**
     * The class of the module this descriptor creates.
     */
    Class getModuleClass();

    /**
     * The particular module object created by this tonic.
     */
    Object getModule();


    /**
     * Initialise a module given it's parent tonic and the XML element representing the module.
     */ 
    void init(Plugin plugin, Element element) throws PluginParseException;

    /**
     * Whether or not this tonic module is enabled by default.
     * @return
     */
    boolean isEnabledByDefault();

    /**
     * Override this if your tonic needs to clean up when it's been removed.
     * @param plugin
     */
    void destroy(Plugin plugin);
}

⌨️ 快捷键说明

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