@Nullable @Override public final <T> Class<T> usePluginClass(String pluginType, String pluginName, String pluginId, PluginProperties properties, PluginSelector selector) { try { Plugin plugin = addPlugin(pluginType, pluginName, pluginId, properties, selector); return pluginInstantiator.loadClass(plugin); } catch (PluginNotExistsException | IOException e) { return null; } catch (ClassNotFoundException e) { // Shouldn't happen throw Throwables.propagate(e); } }
@Nullable @Override public final <T> T usePlugin(String pluginType, String pluginName, String pluginId, PluginProperties properties, PluginSelector selector) { try { Plugin plugin = addPlugin(pluginType, pluginName, pluginId, properties, selector); return pluginInstantiator.newInstance(plugin); } catch (PluginNotExistsException | IOException e) { return null; } catch (ClassNotFoundException e) { // Shouldn't happen throw Throwables.propagate(e); } }
@Nullable @Override public final <T> Class<T> usePluginClass(String pluginType, String pluginName, String pluginId, PluginProperties properties, PluginSelector selector) { try { Plugin plugin = addPlugin(pluginType, pluginName, pluginId, properties, selector); return pluginInstantiator.loadClass(plugin); } catch (PluginNotExistsException | IOException e) { return null; } catch (ClassNotFoundException e) { // Shouldn't happen throw Throwables.propagate(e); } }
@Nullable @Override public final <T> T usePlugin(String pluginType, String pluginName, String pluginId, PluginProperties properties, PluginSelector selector) { try { Plugin plugin = addPlugin(pluginType, pluginName, pluginId, properties, selector); return pluginInstantiator.newInstance(plugin); } catch (PluginNotExistsException | IOException e) { return null; } catch (ClassNotFoundException e) { // Shouldn't happen throw Throwables.propagate(e); } }