Class BlockChunkFinder
- java.lang.Object
-
- org.jenkinsci.plugins.workflow.graphanalysis.BlockChunkFinder
-
- All Implemented Interfaces:
ChunkFinder
public class BlockChunkFinder extends Object implements ChunkFinder
Matches start and end of a block. Any block!- Author:
- Sam Van Oort
-
-
Constructor Summary
Constructors Constructor Description BlockChunkFinder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isChunkEnd(FlowNode current, FlowNode previous)
Test if the current node is the end of a chunk (inclusive)boolean
isChunkStart(FlowNode current, FlowNode previous)
Test if the current node is the start of a new chunk (inclusive)boolean
isStartInsideChunk()
NOTE: you will need to handle cases where you have aBlockStartNode
where theBlockEndNode
has not been generated yet! This means you need to keep nodes around even after hitting the EndNode
-
-
-
Method Detail
-
isStartInsideChunk
public boolean isStartInsideChunk()
NOTE: you will need to handle cases where you have aBlockStartNode
where theBlockEndNode
has not been generated yet! This means you need to keep nodes around even after hitting the EndNode- Specified by:
isStartInsideChunk
in interfaceChunkFinder
-
isChunkStart
public boolean isChunkStart(@NonNull FlowNode current, @CheckForNull FlowNode previous)
Description copied from interface:ChunkFinder
Test if the current node is the start of a new chunk (inclusive)- Specified by:
isChunkStart
in interfaceChunkFinder
- Parameters:
current
- Node to test for being a start, it will begin the chunk and be includedprevious
- Previous node, to use in testing chunk- Returns:
- True if current node is the beginning of chunk
-
isChunkEnd
public boolean isChunkEnd(@NonNull FlowNode current, @CheckForNull FlowNode previous)
Description copied from interface:ChunkFinder
Test if the current node is the end of a chunk (inclusive)- Specified by:
isChunkEnd
in interfaceChunkFinder
- Parameters:
current
- Node to test for being endFor a block, the
BlockEndNode
For a legacy stage or marker, this will be first node of new stage (previous is the marker)
previous
- Previous node, to use in testing chunk- Returns:
- True if current is the end of a chunk (inclusive)
-
-