Package org.ka2ddo.yaac
Class YAAC.PluginContext
java.lang.Object
org.ka2ddo.yaac.YAAC.PluginContext
- All Implemented Interfaces:
Comparable<YAAC.PluginContext>
- Enclosing class:
- YAAC
Support class for loading plugins that may have circular dependencies.
- Author:
- Andrew Pavlin, KA2DDO
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(YAAC.PluginContext pluginContext) Specify in what order plugins should be loaded.Get the name of the plugin JAR file.URL[]
Get array of jar URLs for this plugin, including any 3rd-party library JARs this plugin depends on.Get the set of plugin names of the other plugins this plugin depends on.Get the fully package qualified class name of theProvider
subclass for this plugin.toString()
Return a string representing this object.
-
Method Details
-
compareTo
Specify in what order plugins should be loaded. Plugins are initially sorted in the timestamp of the plugin JAR files; however, dependencies between plugins may require that order to be changed so that the classpath has independent plugins before the other plugins that depend on them.- Specified by:
compareTo
in interfaceComparable<YAAC.PluginContext>
- Parameters:
pluginContext
- PluginContext to compare against this PluginContext- Returns:
- -1 if this PluginContext should be before the other PluginContext, +1 if this PluginContext should be after the other PluginContext, or 0 if the relative order of these two PluginContext objectd doesn't matter
-
getPluginName
Get the name of the plugin JAR file.- Returns:
- plugin name
-
getProviderClassName
Get the fully package qualified class name of theProvider
subclass for this plugin.- Returns:
- String name of Provider subclass
-
getPluginURLs
Get array of jar URLs for this plugin, including any 3rd-party library JARs this plugin depends on.- Returns:
- String array of plugin JAR URL strings
-
getPrerequisiteSet
Get the set of plugin names of the other plugins this plugin depends on. TheCoreProvider
does not have to be specified, since it will always be before all plugin JAR files on the classpath.- Returns:
- Set of other plugin names
-
toString
Return a string representing this object.
-