//# 0 errors, 84 messages
//#
/*
    //#plugin.java:1:1: class: net.sourceforge.pebble.plugins.Plugin
    //#plugin.java:1:1: method: net.sourceforge.pebble.plugins.Plugin.net.sourceforge.pebble.plugins.Plugin__static_init
 * Copyright (c) 2003-2005, Simon Brown
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in
 *     the documentation and/or other materials provided with the
 *     distribution.
 *
 *   - Neither the name of Pebble nor the names of its contributors may
 *     be used to endorse or promote products derived from this software
 *     without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package net.sourceforge.pebble.plugins;

import java.util.Collection;

/**
 * A plugin
 *
 * @author James Roper
 */
public class Plugin {
  private final String name;
  private final String description;
  private final String pluginClass;
  private final int weight;
  private final Collection<PluginConfig> pluginConfig;

  public Plugin(String name, String description, String pluginClass, int weight, Collection<PluginConfig> pluginConfig) {
    //#plugin.java:48: method: void net.sourceforge.pebble.plugins.Plugin.net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): description
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): name
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): pluginClass
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): pluginConfig
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this
    //#input(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): weight
    //#output(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.description
    //#output(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.name
    //#output(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.pluginClass
    //#output(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.pluginConfig
    //#output(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.weight
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.description == description
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): init'ed(this.description)
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.name == name
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): init'ed(this.name)
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.pluginClass == pluginClass
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): init'ed(this.pluginClass)
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.pluginConfig == pluginConfig
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): init'ed(this.pluginConfig)
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): this.weight == weight
    //#post(void net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)): init'ed(this.weight)
    this.name = name;
    this.description = description;
    this.pluginClass = pluginClass;
    this.weight = weight;
    this.pluginConfig = pluginConfig;
  }
    //#plugin.java:54: end of method: void net.sourceforge.pebble.plugins.Plugin.net.sourceforge.pebble.plugins.Plugin(String, String, String, int, Collection)

  public String getName() {
    return name;
    //#plugin.java:57: method: String net.sourceforge.pebble.plugins.Plugin.getName()
    //#input(String getName()): this
    //#input(String getName()): this.name
    //#output(String getName()): return_value
    //#post(String getName()): return_value == this.name
    //#post(String getName()): init'ed(return_value)
    //#plugin.java:57: end of method: String net.sourceforge.pebble.plugins.Plugin.getName()
  }

  public String getDescription() {
    return description;
    //#plugin.java:61: method: String net.sourceforge.pebble.plugins.Plugin.getDescription()
    //#input(String getDescription()): this
    //#input(String getDescription()): this.description
    //#output(String getDescription()): return_value
    //#post(String getDescription()): return_value == this.description
    //#post(String getDescription()): init'ed(return_value)
    //#plugin.java:61: end of method: String net.sourceforge.pebble.plugins.Plugin.getDescription()
  }

  public String getPluginClass() {
    return pluginClass;
    //#plugin.java:65: method: String net.sourceforge.pebble.plugins.Plugin.getPluginClass()
    //#input(String getPluginClass()): this
    //#input(String getPluginClass()): this.pluginClass
    //#output(String getPluginClass()): return_value
    //#post(String getPluginClass()): return_value == this.pluginClass
    //#post(String getPluginClass()): init'ed(return_value)
    //#plugin.java:65: end of method: String net.sourceforge.pebble.plugins.Plugin.getPluginClass()
  }

  public int getWeight() {
    return weight;
    //#plugin.java:69: method: int net.sourceforge.pebble.plugins.Plugin.getWeight()
    //#input(int getWeight()): this
    //#input(int getWeight()): this.weight
    //#output(int getWeight()): return_value
    //#post(int getWeight()): return_value == this.weight
    //#post(int getWeight()): init'ed(return_value)
    //#plugin.java:69: end of method: int net.sourceforge.pebble.plugins.Plugin.getWeight()
  }

  public Collection<PluginConfig> getPluginConfig() {
    return pluginConfig;
    //#plugin.java:73: method: Collection net.sourceforge.pebble.plugins.Plugin.getPluginConfig()
    //#input(Collection getPluginConfig()): this
    //#input(Collection getPluginConfig()): this.pluginConfig
    //#output(Collection getPluginConfig()): return_value
    //#post(Collection getPluginConfig()): return_value == this.pluginConfig
    //#post(Collection getPluginConfig()): init'ed(return_value)
    //#plugin.java:73: end of method: Collection net.sourceforge.pebble.plugins.Plugin.getPluginConfig()
  }

  public boolean isConfigurable()
  {
    return pluginConfig != null && !pluginConfig.isEmpty();
    //#plugin.java:78: method: bool net.sourceforge.pebble.plugins.Plugin.isConfigurable()
    //#input(bool isConfigurable()): this
    //#input(bool isConfigurable()): this.pluginConfig
    //#output(bool isConfigurable()): return_value
    //#post(bool isConfigurable()): init'ed(return_value)
    //#test_vector(bool isConfigurable()): this.pluginConfig: Addr_Set{null}, Inverse{null}
    //#test_vector(bool isConfigurable()): java.util.Collection:isEmpty(...)@78: {1}, {0}
    //#plugin.java:78: end of method: bool net.sourceforge.pebble.plugins.Plugin.isConfigurable()
  }
}
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Descendant_Table[net/sourceforge/pebble/plugins/Plugin]
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getDescription()Ljava/lang/String;
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getName()Ljava/lang/String;
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getPluginClass()Ljava/lang/String;
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getPluginConfig()Ljava/util/Collection;
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getWeight()I
    //#output(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.isConfigurable()Z
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Descendant_Table[net/sourceforge/pebble/plugins/Plugin] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getDescription()Ljava/lang/String; == &getDescription
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getName()Ljava/lang/String; == &getName
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getPluginClass()Ljava/lang/String; == &getPluginClass
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getPluginConfig()Ljava/util/Collection; == &getPluginConfig
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.getWeight()I == &getWeight
    //#post(net.sourceforge.pebble.plugins.Plugin__static_init): __Dispatch_Table.isConfigurable()Z == &isConfigurable
    //#plugin.java:: end of method: net.sourceforge.pebble.plugins.Plugin.net.sourceforge.pebble.plugins.Plugin__static_init
    //#plugin.java:: end of class: net.sourceforge.pebble.plugins.Plugin
