Enum Class DependencyResolutionMode

java.lang.Object
java.lang.Enum<DependencyResolutionMode>
org.mule.runtime.ast.api.DependencyResolutionMode
All Implemented Interfaces:
Serializable, Comparable<DependencyResolutionMode>, Constable

public enum DependencyResolutionMode extends Enum<DependencyResolutionMode>
Provides different ways that the dependencies of an ArtifactAst may be calculated when calling ArtifactAst.dependencies().

The setting of this mode is done through a system property that is read whenever it is needed.

  • Enum Constant Details

    • MINIMAL

      public static final DependencyResolutionMode MINIMAL
      Only the extensions that are being actually used by the artifact are returned.
    • COMPILED

      public static final DependencyResolutionMode COMPILED
      All the dependencies that the artifact is compiled with are returned.
    • WITH_PARENT

      public static final DependencyResolutionMode WITH_PARENT
      Same as COMPILED, but also includes the dependencies of the parent artifact
  • Method Details

    • values

      public static DependencyResolutionMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DependencyResolutionMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getDependencyResolutionMode

      public static DependencyResolutionMode getDependencyResolutionMode()
      Reads a system property and obtains the proper value from that.
      Returns:
      the resolved DependencyResolutionMode
      Throws:
      IllegalArgumentException - if the system property contains an invalid value.
    • resolveDependencies

      public abstract Set<org.mule.runtime.api.meta.model.ExtensionModel> resolveDependencies(Supplier<Set<org.mule.runtime.api.meta.model.ExtensionModel>> extensionModelsSupplier, ArtifactAst artifactAst)
      Generates a set of ExtensionModels according to the resolution mode type. For more details, see each implementation.
      Parameters:
      extensionModelsSupplier - A supplier from the declaration of the components added by the ArtifactAstBuilder.
      artifactAst - The artifact AST.
      Returns:
      The set of dependencies to be returned by ArtifactAst.dependencies().