Annotation Interface Depends


Declares a dependency for an Addon.

The Depends annotation is used to specify that an addon depends on another addon for its functionality. It indicates the required addon by referencing its class type. This annotation can be applied multiple times to declare multiple dependencies.

Since:
3.1.0-SNAPSHOT
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends Addon>
    Specifies the class of the required addon.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Specifies whether this dependency should be treated as optional or not.
  • Element Details

    • value

      Class<? extends Addon> value
      Specifies the class of the required addon.

      This class must extend Addon and represents the addon that the annotated addon depends on. The dependency will be resolved during the addon initialization process.

      Returns:
      The class of the required addon.
    • soft

      boolean soft
      Specifies whether this dependency should be treated as optional or not. true means that this dependency is optional, false means the opposite. The default value is false.
      Returns:
      true if this dependency is optional, false otherwise.
      Since:
      3.3.4-SNAPSHOT
      Default:
      false