Class Deps


  • public class Deps
    extends Object
    • Constructor Detail

      • Deps

        public Deps()
    • Method Detail

      • getDefaultApplicabilitySpec

        public static ApplicabilitySpec getDefaultApplicabilitySpec()
        Returns:
        a new specification object with minimum own applicability
      • setApplicabilitySpec

        public static void setApplicabilitySpec​(Content c,
                                                ApplicabilitySpec spec)
        Parameters:
        new - applicability spec
      • createDirectDependency

        public static ApplicabilityDependencyCommentLeaf createDirectDependency​(Content dependedOn)
        Creates a ApplicabilityDependencyLeaf object that defines a non-transitive dependency on dependedOn. This can be used to create another comment whose applicability depends on dependedOn.
        Parameters:
        dependedOn - comment
        Returns:
        the new ApplicabilityDependencyLeaf object
      • createDirectDependencySpec

        public static ApplicabilitySpec createDirectDependencySpec​(Content dependedOn)
        Creates a spec object that defines a non-transitive dependency on dependedOn. This can be used to create another comment whose applicability depends on this comment.
        Returns:
        the new spec object
      • createTransitiveDependency

        public static ApplicabilityDependencyCommentLeaf createTransitiveDependency​(Content dependedOn)
        Creates a ApplicabilityDependencyLeaf object that defines a transitive dependency on dependedOn. This can be used to create another comment whose applicability depends on dependedOn.
        Parameters:
        dependedOn - comment
        Returns:
        the new ApplicabilityDependencyLeaf object
      • createTransitiveDependencySpec

        public static ApplicabilitySpec createTransitiveDependencySpec​(Content dependedOn)
        Creates a spec object that defines a transitive dependency on dependedOn. This can be used to create another comment whose applicability depends on dependedOn.
        Returns:
        the new spec object
      • calcApplicability

        public static Applicability calcApplicability​(Content c,
                                                      ApplicabilityFilter filter,
                                                      boolean followDependencies)

        For collections of comments this method returns the most severe level and the broadest audience of it's own applicability and of the applicabilities of all nested comments. This method also includes applicabilities of comment dependencies, if followDependencies is true.

        Returns:
        returns the applicability of the union of all comments represented by the instance of the subclass.