Class PluginUtil

    • Method Detail

      • 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.
        Throws:
        IllegalStateException - if instantiation fails
      • findPluginFactoryMethod

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