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 Summary
Modifier and TypeMethodDescriptionGet the bukkit api version.Get the name of the main class of the plugin.getOrDefineClass
(String className, ClassGenerator classGenerator, boolean persist) Gets or defines a class using this ClassLoader.Get the ScalaPlugin instance loaded by this ClassLoader.Get the jar file of the ScalaPlugin.Get the PluginLoader that constructed this ClassLoader.Get the Server the associated plugin runs on.
-
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 classclassGenerator
- the generator of the class' bytecodepersist
- 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.
-