Class SCMHead.HeadByItem

  • All Implemented Interfaces:
    ExtensionPoint
    Enclosing class:
    SCMHead

    public abstract static class SCMHead.HeadByItem
    extends Object
    implements ExtensionPoint
    Means of locating a head given an item.
    Since:
    0.3-beta-2
    • Constructor Detail

      • HeadByItem

        public HeadByItem()
    • Method Detail

      • getHead

        @CheckForNull
        public abstract SCMHead getHead​(Item item)
        Checks whether a given item corresponds to a particular SCM head.
        Parameters:
        item - such as a child of an SCMSourceOwner
        Returns:
        a corresponding SCM head, or null if this information is unavailable
      • findHead

        @CheckForNull
        public static SCMHead findHead​(Item item)
        Runs all registered implementations.
        Parameters:
        item - an item, such as a branch project
        Returns:
        the corresponding head, if known