@Override public PluginProperties getPluginProperties(String pluginId, MacroEvaluator evaluator) { Plugin plugin = getPlugin(pluginId); if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } return pluginInstantiator.substituteMacros(plugin, evaluator); }
@Override public PluginProperties getPluginProperties(String pluginId) { return getPlugin(pluginId).getProperties(); }
@Override public PluginProperties getPluginProperties(String pluginId) { return getPlugin(pluginId).getProperties(); }
@Override public PluginProperties getPluginProperties(String pluginId, MacroEvaluator evaluator) { Plugin plugin = getPlugin(pluginId); if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } return pluginInstantiator.substituteMacros(plugin, evaluator); }
@Override public <T> T newPluginInstance(String pluginId, @Nullable MacroEvaluator evaluator) throws InstantiationException { try { Plugin plugin = getPlugin(pluginId); if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } return pluginInstantiator.newInstance(plugin, evaluator); } catch (ClassNotFoundException e) { // Shouldn't happen, unless there is bug in file localization throw new IllegalArgumentException("Plugin class not found", e); } catch (IOException e) { // This is fatal, since jar cannot be expanded. throw Throwables.propagate(e); } }
@Override public <T> Class<T> loadPluginClass(String pluginId) { try { if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } Plugin plugin = getPlugin(pluginId); return pluginInstantiator.loadClass(plugin); } catch (ClassNotFoundException e) { // Shouldn't happen, unless there is bug in file localization throw new IllegalArgumentException("Plugin class not found", e); } catch (IOException e) { // This is fatal, since jar cannot be expanded. throw Throwables.propagate(e); } }
@Override public <T> T newPluginInstance(String pluginId, @Nullable MacroEvaluator evaluator) throws InstantiationException { try { Plugin plugin = getPlugin(pluginId); if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } return pluginInstantiator.newInstance(plugin, evaluator); } catch (ClassNotFoundException e) { // Shouldn't happen, unless there is bug in file localization throw new IllegalArgumentException("Plugin class not found", e); } catch (IOException e) { // This is fatal, since jar cannot be expanded. throw Throwables.propagate(e); } }
@Override public <T> Class<T> loadPluginClass(String pluginId) { try { if (pluginInstantiator == null) { throw new UnsupportedOperationException("Plugin is not supported"); } Plugin plugin = getPlugin(pluginId); return pluginInstantiator.loadClass(plugin); } catch (ClassNotFoundException e) { // Shouldn't happen, unless there is bug in file localization throw new IllegalArgumentException("Plugin class not found", e); } catch (IOException e) { // This is fatal, since jar cannot be expanded. throw Throwables.propagate(e); } }