public class OverrideDependencyDescriptorMediator extends java.lang.Object implements DependencyDescriptorMediator
| Constructor and Description |
|---|
OverrideDependencyDescriptorMediator(java.lang.String branch,
java.lang.String version)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBranch()
Returns the branch this mediator will give to mediated descriptors, or
null if
this mediator does not override branch. |
java.lang.String |
getVersion()
Returns the version this mediator will give to mediated descriptors, or
null if
this mediator does not override version. |
DependencyDescriptor |
mediate(DependencyDescriptor dd)
Mediates the given
DependencyDescriptor according to this ModuleDescriptor. |
public OverrideDependencyDescriptorMediator(java.lang.String branch,
java.lang.String version)
branch - the branch to give to mediated dependency descriptors, null to keep
the original branch.version - the version to give to mediated dependency descriptors, null to keep
the original one.public java.lang.String getVersion()
null if
this mediator does not override version.public java.lang.String getBranch()
null if
this mediator does not override branch.public DependencyDescriptor mediate(DependencyDescriptor dd)
DependencyDescriptorMediatorDependencyDescriptor according to this ModuleDescriptor.
This method gives the opportunity to a ModuleDescriptor to override dependency version information of any of its transitive dependencies, since it is called by dependency resolvers before actually resolving a dependency.
mediate in interface DependencyDescriptorMediatordd - the dependency descriptor which should be mediated.DependencyDescriptor, or the original
DependencyDescriptor if no mediation is required by this ModuleDescriptor.