Package org.mule.runtime.ast.api
Enum Class DependencyResolutionMode
- All Implemented Interfaces:
Serializable,Comparable<DependencyResolutionMode>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll the dependencies that the artifact is compiled with are returned.Only the extensions that are being actually used by the artifact are returned.Same asCOMPILED, but also includes the dependencies of the parent artifact -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyResolutionModeReads a system property and obtains the proper value from that.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 ofExtensionModels according to the resolution mode type.static DependencyResolutionModeReturns the enum constant of this class with the specified name.static DependencyResolutionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MINIMAL
Only the extensions that are being actually used by the artifact are returned. -
COMPILED
All the dependencies that the artifact is compiled with are returned. -
WITH_PARENT
Same asCOMPILED, but also includes the dependencies of the parent artifact
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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 ofExtensionModels according to the resolution mode type. For more details, see each implementation.- Parameters:
extensionModelsSupplier- A supplier from the declaration of the components added by theArtifactAstBuilder.artifactAst- The artifact AST.- Returns:
- The set of dependencies to be returned by
ArtifactAst.dependencies().
-