Class Plugin


  • public final class Plugin
    extends Object
    A Processor plugin is basically some w2x command-line arguments identified by a name.
    • Field Detail

      • name

        public final String name
        The unique name (a single word) of the plugin. Example: "rss".
      • outputDescription

        public final String outputDescription
        A short description (just a few words) of the output files created by this plugin. Example: "RSS 2.0". May be null.
      • outputExtension

        public final String outputExtension
        The suggested file extension, without a leading dot, for the output files created by this plugin. Example: "xml".
      • multiFileOutput

        public final boolean multiFileOutput
        true if this plugin creates multiple output files (like Web Help); false if this plugin creates a single output file (like EPUB).
      • w2xArguments

        public final String[] w2xArguments
        Some w2x command-line arguments specifying what does this plugin. May not be an empty array.
      • EMPTY_LIST

        public static final Plugin[] EMPTY_LIST
        A ready-to-use empty array of plugins.
    • Constructor Detail

      • Plugin

        public Plugin​(String name,
                      String outputDescription,
                      String outputExtension,
                      boolean multiFileOutput,
                      String[] w2xArguments)
        Constructor.
    • Method Detail

      • toString

        public String toString()
        Returns a parsable representation of this plugin, that is, the content of a .w2x_plugin file.
        Overrides:
        toString in class Object
      • loadAll

        public static Plugin[] loadAll​(URL[] urls,
                                       List<String> errorList)
        Load all the plugins found in specified locations.
        Parameters:
        urls - locations of .w2x_plugin files.
        errorList - error messages reported while loading the plugins are added to this list.
        Returns:
        loaded plugins.
        See Also:
        load(java.net.URL)