Class PluginModelLoader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>


  • public class PluginModelLoader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>
    extends java.lang.Object
    Utility class for loading plugins.
    • Method Detail

      • loadPlugins

        @NotNull
        public static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> @NotNull PluginModel<G,​A,​R> loadPlugins​(@NotNull
                                                                                                                                                                                                  @NotNull PluginParameterFactory<G,​A,​R> pluginParameterFactory,
                                                                                                                                                                                                  @NotNull
                                                                                                                                                                                                  @NotNull PluginModelParser<G,​A,​R> pluginModelParser,
                                                                                                                                                                                                  @NotNull
                                                                                                                                                                                                  @NotNull ErrorView errorView,
                                                                                                                                                                                                  @NotNull
                                                                                                                                                                                                  @NotNull java.io.File pluginsDir)
        Load all files as plugins from the given directory.
        Parameters:
        pluginModelParser - the plugin model parser to use
        errorView - the error view for reporting errors
        pluginsDir - the directory to load
        Returns:
        the loaded plugin model
      • loadXML

        public static <G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>> Plugin<G,​A,​R> loadXML​(@NotNull
                                                                                                                                                                                @NotNull PluginModelParser<G,​A,​R> pluginModelParser,
                                                                                                                                                                                @NotNull
                                                                                                                                                                                @NotNull java.io.File file)
                                                                                                                                                                         throws java.io.IOException,
                                                                                                                                                                                nu.xom.ParsingException,
                                                                                                                                                                                org.xml.sax.SAXException
        Throws:
        java.io.IOException
        nu.xom.ParsingException
        org.xml.sax.SAXException