mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
feat: overload PluginEntry constructor to set onload property (#1166)
Co-authored-by: Erisu <ellis.bryan@gmail.com>
This commit is contained in:
parent
8d407708d4
commit
b2d9d639b4
@ -47,11 +47,23 @@ public final class PluginEntry {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs with a CordovaPlugin already instantiated.
|
* Constructs with a CordovaPlugin already instantiated.
|
||||||
|
*
|
||||||
|
* @param service The name of the service
|
||||||
|
* @param pluginClass The plugin class name
|
||||||
*/
|
*/
|
||||||
public PluginEntry(String service, CordovaPlugin plugin) {
|
public PluginEntry(String service, CordovaPlugin plugin) {
|
||||||
this(service, plugin.getClass().getName(), true, plugin);
|
this(service, plugin.getClass().getName(), true, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param service The name of the service
|
||||||
|
* @param plugin The CordovaPlugin already instantiated
|
||||||
|
* @param onload Create plugin object when HTML page is loaded
|
||||||
|
*/
|
||||||
|
public PluginEntry(String service, CordovaPlugin plugin, boolean onload) {
|
||||||
|
this(service, plugin.getClass().getName(), onload, plugin);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param service The name of the service
|
* @param service The name of the service
|
||||||
* @param pluginClass The plugin class name
|
* @param pluginClass The plugin class name
|
||||||
@ -61,6 +73,12 @@ public final class PluginEntry {
|
|||||||
this(service, pluginClass, onload, null);
|
this(service, pluginClass, onload, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param service The name of the service
|
||||||
|
* @param pluginClass The plugin class name
|
||||||
|
* @param onload Create plugin object when HTML page is loaded
|
||||||
|
* @param plugin The CordovaPlugin already instantiated
|
||||||
|
*/
|
||||||
private PluginEntry(String service, String pluginClass, boolean onload, CordovaPlugin plugin) {
|
private PluginEntry(String service, String pluginClass, boolean onload, CordovaPlugin plugin) {
|
||||||
this.service = service;
|
this.service = service;
|
||||||
this.pluginClass = pluginClass;
|
this.pluginClass = pluginClass;
|
||||||
|
Loading…
Reference in New Issue
Block a user