Class ForkScanner

    • Method Detail

      • getCurrentType

        @CheckForNull
        public org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.NodeType getCurrentType()
      • getNextType

        @CheckForNull
        public org.jenkinsci.plugins.workflow.graphanalysis.ForkScanner.NodeType getNextType()
      • reset

        protected void reset()
        Description copied from class: AbstractFlowScanner
        Reset internal state so that we can begin walking a new flow graph Public APIs need to invoke this before searches
        Specified by:
        reset in class AbstractFlowScanner
      • setParallelStartPredicate

        @Deprecated
        public static void setParallelStartPredicate​(@NonNull
                                                     com.google.common.base.Predicate<FlowNode> pred)
        Deprecated.
        Now a complete no-op -- originally this was a workaround for dependency issues with workflow-cps. Specifically, requiring classes from workflow-cps to detect if something is a parallel step.
      • isParallelStart

        public static boolean isParallelStart​(@CheckForNull
                                              FlowNode f)
      • isParallelEnd

        public static boolean isParallelEnd​(@CheckForNull
                                            FlowNode f)
      • isWalkingFromFinish

        public boolean isWalkingFromFinish()
        If true, we are walking from the flow end node and have a complete view of the flow Needed because there are implications when not walking from a finished flow (blocks without a BlockEndNode)
      • getCurrentParallelStartNode

        @CheckForNull
        public FlowNode getCurrentParallelStartNode()
        Return the node that begins the current parallel head, if we are known to be in a parallel block
        Returns:
        The FlowNode that marks current parallel start
      • getParallelDepth

        public int getParallelDepth()
        Return number of levels deep we are in parallel blocks
      • next

        protected FlowNode next​(@NonNull
                                FlowNode current,
                                @NonNull
                                Collection<FlowNode> blackList)
        Description copied from class: AbstractFlowScanner
        Actual meat of the iteration, get the next node to visit, using and updating state as needed
        Specified by:
        next in class AbstractFlowScanner
        Parameters:
        current - Current node to use in generating next value
        blackList - Nodes that are not eligible for visiting
        Returns:
        Next node to visit, or null if we've exhausted the node list