Class FlowScanningUtils

  • public final class FlowScanningUtils
    extends Object
    Library of common functionality when analyzing/walking flow graphs
    Sam Van Oort
    • Field Detail


        public static final<FlowNode> MATCH_BLOCK_START

        public static final Comparator<FlowNode> TIME_ORDER_COMPARATOR
        Sorts flownodes putting the one begun last (oldest startTime) at the end, with null times last because likely they represent the newest nodes with a TimingAction not attached yet.
    • Method Detail

      • hasActionPredicate

        public static<FlowNode> hasActionPredicate​(@NonNull
                                                                                    Class<? extends Action> actionClass)
        Create a predicate that will match on all FlowNodes having a specific action present
        actionClass - Action class to look for
        Predicate that will match when FlowNode has the action given
      • fetchEnclosingBlocks

        public static Filterator<FlowNode> fetchEnclosingBlocks​(@NonNull
                                                                FlowNode f)
        Returns all BlockStartNodes enclosing the given FlowNode, starting from the inside out. This is useful if we want to obtain information about its scope, such as the workspace, parallel branch, or label. Warning: while this is efficient for one node, batch operations are far more efficient when handling many nodes.

        Deprecated, prefer FlowNode.iterateEnclosingBlocks() instead, possibly using FilteratorImpl(Iterator, Predicate) or Guava or Java 8 APIs if filtering needed.

        f - FlowNode to start from.
        Iterator that returns all enclosing BlockStartNodes from the inside out.