Interface DependencyConstraint

    • Method Detail

      • version

        void version​(Action<? super MutableVersionConstraint> configureAction)
        Configures the version constraint for this dependency constraint.
        Parameters:
        configureAction - the configuration action for the module version
      • getReason

        @Nullable
        java.lang.String getReason()
        Returns a reason why this dependency constraint should be used, in particular with regards to its version. The dependency report will use it to explain why a specific dependency was selected, or why a specific dependency version was used.
        Returns:
        a reason to use this dependency constraint
        Since:
        4.6
      • because

        void because​(@Nullable
                     java.lang.String reason)
        Sets the reason why this dependency constraint should be used.
        Since:
        4.6
      • getAttributes

        AttributeContainer getAttributes()
        Returns the attributes for this constraint. Mutation of the attributes of a constraint must be done through the attributes(Action) method.
        Specified by:
        getAttributes in interface HasAttributes
        Returns:
        the attributes container for this dependency
        Since:
        4.8
      • getVersionConstraint

        VersionConstraint getVersionConstraint()
        Returns the version constraint to be used during selection.
        Returns:
        the version constraint