public final class PluginUtil extends Object
Plugin utilities.
See Also:
  • Method Details

    • collectPluginsByCategory

      public static Map<String,PluginType<?>> collectPluginsByCategory(String category)
      Shortcut for collecting plugins matching with the given category.
    • collectPluginsByCategoryAndPackage

      public static Map<String,PluginType<?>> collectPluginsByCategoryAndPackage(String category, List<String> packages)
      Short for collecting plugins matching with the given category in provided packages.
    • instantiatePlugin

      public static <V> V instantiatePlugin(Class<V> pluginClass)
      Instantiates the given plugin using its no-arg PluginFactory-annotated static method.
      IllegalStateException - if instantiation fails
    • findPluginFactoryMethod

      public static Method findPluginFactoryMethod(Class<?> pluginClass)
      Finds the PluginFactory-annotated static method of the given class.
      IllegalStateException - if no such method could be found