/** Create plugins objects that have onload set. */ public void startupPlugins() { for (PluginEntry entry : this.entries.values()) { if (entry.onload) { entry.createPlugin(this.app, this.ctx); } } }
/** * Get the plugin object that implements the service. If the plugin object does not already exist, * then create it. If the service doesn't exist, then return null. * * @param service The name of the service. * @return CordovaPlugin or null */ public CordovaPlugin getPlugin(String service) { PluginEntry entry = this.entries.get(service); if (entry == null) { return null; } CordovaPlugin plugin = entry.plugin; if (plugin == null) { plugin = entry.createPlugin(this.app, this.ctx); } return plugin; }
/** Delete all plugin objects. */ public void clearPluginObjects() { for (PluginEntry entry : this.entries.values()) { entry.plugin = null; } }