@Override
    protected void getNext() throws Exception {
      IFATransition transition;
      while (transitionIterator.hasNext()) {
        transition = transitionIterator.next();
        N child = getChild(parent, transition.getAcceptEvent());
        if (child == null) {
          continue;
        }
        IFAState nextScopeState =
            allScope ? null : getNextMatchedScopeState(currentScopeState, child);
        if (!allScope && nextScopeState == null) {
          releaseNode(child);
          continue;
        }
        saveResult(
            child,
            new StateSingleMatchInfo(
                patternFA, patternFA.getNextState(sourceState, transition), nextScopeState));
        return;
      }
    }
The method used for generating the result based on the matched node.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/schema/tree/AbstractTreeVisitor.java