Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. Licensed to the Apache Software Foundation (ASF) under one
  3. or more contributor license agreements. See the NOTICE file
  4. distributed with this work for additional information
  5. regarding copyright ownership. The ASF licenses this file
  6. to you under the Apache License, Version 2.0 (the
  7. "License"); you may not use this file except in compliance
  8. with the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing,
  11. software distributed under the License is distributed on an
  12. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  13. KIND, either express or implied. See the License for the
  14. specific language governing permissions and limitations
  15. under the License.
  16. */
  17. package org.apache.cordova;
  18. import org.apache.cordova.CordovaPlugin;
  19. /**
  20. * This class represents a service entry object.
  21. */
  22. public final class PluginEntry {
  23. /**
  24. * The name of the service that this plugin implements
  25. */
  26. public final String service;
  27. /**
  28. * The plugin class name that implements the service.
  29. */
  30. public final String pluginClass;
  31. /**
  32. * The pre-instantiated plugin to use for this entry.
  33. */
  34. public final CordovaPlugin plugin;
  35. /**
  36. * Flag that indicates the plugin object should be created when PluginManager is initialized.
  37. */
  38. public final boolean onload;
  39. /**
  40. * Constructs with a CordovaPlugin already instantiated.
  41. */
  42. public PluginEntry(String service, CordovaPlugin plugin) {
  43. this(service, plugin.getClass().getName(), true, plugin);
  44. }
  45. /**
  46. * @param service The name of the service
  47. * @param pluginClass The plugin class name
  48. * @param onload Create plugin object when HTML page is loaded
  49. */
  50. public PluginEntry(String service, String pluginClass, boolean onload) {
  51. this(service, pluginClass, onload, null);
  52. }
  53. private PluginEntry(String service, String pluginClass, boolean onload, CordovaPlugin plugin) {
  54. this.service = service;
  55. this.pluginClass = pluginClass;
  56. this.onload = onload;
  57. this.plugin = plugin;
  58. }
  59. }