Class AbstractPlugin

java.lang.Object
com.atlassian.plugin.impl.AbstractPlugin
All Implemented Interfaces:
Plugin, PluginInternal, Resourced, ScopeAware, Comparable<Plugin>
Direct Known Subclasses:
DefaultDynamicPlugin, StaticPlugin, XmlDynamicPlugin

public abstract class AbstractPlugin extends Object implements PluginInternal, Comparable<Plugin>
Represents the base class for all plugins. Note: This class has a natural ordering that is inconsistent with equals.

p1.equals(p2) == true will give p1.compareTo(p2) == 0 but the opposite is not guaranteed because we keep a map of plugins versus loaders in the DefaultPluginManager .

A plugin with the same key and version may well be loaded from multiple loaders (in fact with UPM it's almost guaranteed) so we CANNOT override equals.