MCPcopy Create free account
hub / github.com/apache/freemarker / recurse

Method recurse

src/main/java/freemarker/core/Environment.java:640–658  ·  view source on GitHub ↗
(TemplateNodeModel node, TemplateSequenceModel namespaces)

Source from the content-addressed store, hash-verified

638 }
639
640 void recurse(TemplateNodeModel node, TemplateSequenceModel namespaces)
641 throws TemplateException, IOException
642 {
643 if (node == null) {
644 node = this.getCurrentVisitorNode();
645 if (node == null) {
646 throw new TemplateModelException(
647 "The target node of recursion is missing or null.");
648 }
649 }
650 TemplateSequenceModel children = node.getChildNodes();
651 if (children == null) return;
652 for (int i=0; i<children.size(); i++) {
653 TemplateNodeModel child = (TemplateNodeModel) children.get(i);
654 if (child != null) {
655 visit(child, namespaces);
656 }
657 }
658 }
659
660 Macro.Context getCurrentMacroContext() {
661 return currentMacroContext;

Callers 2

visitMethod · 0.95
acceptMethod · 0.80

Calls 5

getCurrentVisitorNodeMethod · 0.95
sizeMethod · 0.95
getMethod · 0.95
visitMethod · 0.95
getChildNodesMethod · 0.65

Tested by

no test coverage detected