Interface IScalaPluginClassLoader

All Known Implementing Classes:
ScalaPluginClassLoader, ScalaPluginClassLoader

public interface IScalaPluginClassLoader
ClassLoader that loads IScalaPlugin instances. Implementations of this interface must guarantee that they inherit from ClassLoader.
  • Method Details

    • getPluginJarFile

      File getPluginJarFile()
      Get the jar file of the ScalaPlugin.
      Returns:
      the jar file
    • getMainClassName

      String getMainClassName()
      Get the name of the main class of the plugin.
      Returns:
      the main class name
    • getApiVersion

      ApiVersion getApiVersion()
      Get the bukkit api version.
      Returns:
      the bukkit api version
    • getOrDefineClass

      ClassDefineResult getOrDefineClass(String className, ClassGenerator classGenerator, boolean persist)
      Gets or defines a class using this ClassLoader.
      Parameters:
      className - the name of the class
      classGenerator - the generator of the class' bytecode
      persist - whether this class should be loaded again by the plugin after a server restart
      Returns:
      the ClassDefineResult.
    • getServer

      Server getServer()
      Get the Server the associated plugin runs on.
      Returns:
      the server
    • getPlugin

      IScalaPlugin getPlugin()
      Get the ScalaPlugin instance loaded by this ClassLoader.
      Returns:
      the ScalaPlugin
      API Note:
      can return null if this classloader is not yet initialised.
    • getPluginLoader

      IScalaPluginLoader getPluginLoader()
      Get the PluginLoader that constructed this ClassLoader.
      Returns:
      the PluginLoader.