Interface MutableVersionConstraint
- All Superinterfaces:
Describable, VersionConstraint
- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptionReturns the branch to select versions from.voidSets the preferred version of this module.voidDeclares a list of rejected versions.voidRejects all versions of this component.voidSets the required version of this module.voidSpecifies the branch to select versions from.voidSets the version as strict.Methods inherited from interface Describable
getDisplayNameMethods inherited from interface VersionConstraint
getPreferredVersion, getRejectedVersions, getRequiredVersion, getStrictVersion
-
Method Details
-
getBranch
Returns the branch to select versions from. When notnull, select only versions that were built from the given branch.- Specified by:
getBranchin interfaceVersionConstraint- Since:
- 4.6
-
setBranch
Specifies the branch to select versions from.- Parameters:
branch- The branch, possibly null.- Since:
- 4.6
-
require
Sets the required version of this module.Implies that the selected version cannot be lower than what
requireaccepts but could be higher through conflict resolution, even if higher has an exclusive higher bound. This is what a direct version on a dependency translates to. This term supports dynamic versions.This will override a previous
strictlydeclaration.- Parameters:
version- the required version of this module- Since:
- 5.0
-
prefer
Sets the preferred version of this module.This is a very soft version declaration. It applies only if there is no stronger non dynamic opinion on a version for the module. This term does not support dynamic versions.
- Parameters:
version- the preferred version of this module
-
strictly
Sets the version as strict.Any version not matched by this version notation will be excluded. This is the strongest version declaration. It will cause dependency resolution to fail if no version acceptable by this clause can be selected. This term supports dynamic versions.
This will override a previous
requiredeclaration.- Parameters:
version- the strict version to be used for this module
-
reject
Declares a list of rejected versions. If such a version is found during dependency resolution, it will not be selected.- Parameters:
versions- the rejected versions- Since:
- 4.5
-
rejectAll
void rejectAll()Rejects all versions of this component. Can be used to declare that a component is incompatible with another (typically, cannot have both a 2 different implementations of the same API).- Since:
- 4.5
-