Block (@NotNull ASTNode node, Wrap blockWrap, Alignment alignment, Indent indent) { final ArrayList<ASTNode> nodes = new ArrayList<>(); collectNodes(nodes, node); if (Registry.is(LegacyChainedMethodCallsBlockBuilder.COMPATIBILITY_KEY)) { return new LegacyChainedMethodCallsBlockBuilder(alignment, blockWrap, indent, mySettings, myJavaSettings, myFormattingMode).build(nodes); } return new ChainMethodCallsBlockBuilder(alignment, blockWrap, indent, mySettings, myJavaSettings, myFormattingMode).build(nodes); }