Class PluginDependency


  • public final class PluginDependency
    extends Object
    Represents a dependency on another plugin.
    • Constructor Detail

      • PluginDependency

        public PluginDependency​(String id,
                                String version,
                                boolean optional)
        Creates a new instance.
        Parameters:
        id - the plugin ID
        version - an optional version
        optional - whether or not this dependency is optional
    • Method Detail

      • version

        public String version()
        Returns the version this PluginDependency should match in NPM SemVer range format.
        Returns:
        a String with the plugin version, may be empty if no version requirement is present
      • optional

        public boolean optional()
        Returns whether the dependency is optional for the plugin to work correctly.
        Returns:
        true if dependency is optional
      • equals

        public boolean equals​(@Nullable Object o)
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object