final public MixedContent WhitespaceAndComments() throws ParseException {MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_22: begin = elem; nodes.addChild(elem); && nodes.getChildCount() == 1 && nodes.getChild(0) instanceof TextBlock) { {if ("" != null) return null;} nodes.setLocation(template, begin, elem); {if ("" != null) return nodes;} throw new Error("Missing return statement in function");
/** * Processes the contents of the internal <tt>TemplateElement</tt> list, * and outputs the resulting text. */ @Override TemplateElement[] accept(Environment env) throws TemplateException, IOException { return getChildBuffer(); }
@Override protected String dump(boolean canonical) { if (canonical) { return getChildrenCanonicalForm(); } else { if (getParentElement() == null) { return "root"; } return getNodeTypeSymbol(); // MixedContent is uninteresting in a stack trace. } }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { super.postParseCleanup(stripWhitespace); return getChildCount() == 1 ? getChild(0) : this; }
/** * Used for some backward compatibility hacks. */ MixedContent asMixedContent() { MixedContent mixedContent = new MixedContent(); if (count != 0) { TemplateElement first = buffer[0]; mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); } return mixedContent; }
final public MixedContent MixedContent() throws ParseException {MixedContent mixedContent = new MixedContent(); TemplateElement elem, begin = null; mixedContentNesting++; begin = elem; mixedContent.addElement(elem); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case ATTEMPT: mixedContent.setLocation(template, begin, elem); {if ("" != null) return mixedContent;} throw new Error("Missing return statement in function");
final public TemplateElement FreeMarkerText() throws ParseException {MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_21: begin = elem; nodes.addChild(elem); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case STATIC_TEXT_WS: nodes.setLocation(template, begin, elem); {if ("" != null) return nodes;} throw new Error("Missing return statement in function");
/** * @deprecated Use {@link #addChild(int, TemplateElement)} instead. */ @Deprecated void addElement(int index, TemplateElement element) { addChild(index, element); }
@Override boolean isIgnorable(boolean stripWhitespace) { return getChildCount() == 0; }
/** * Used for some backward compatibility hacks. */ TemplateElement asSingleElement() { if (count == 0) { return new TextBlock(CollectionUtils.EMPTY_CHAR_ARRAY, false); } else { TemplateElement first = buffer[0]; if (count == 1) { return first; } else { MixedContent mixedContent = new MixedContent(); mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); return mixedContent; } } }
MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_20: begin = elem; nodes.addElement(elem); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case WHITESPACE: nodes.setLocation(template, begin, elem); {if (true) return nodes;} throw new Error("Missing return statement in function");
final public TemplateElement FreeMarkerText() throws ParseException {MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_21: begin = elem; nodes.addChild(elem); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case STATIC_TEXT_WS: nodes.setLocation(template, begin, elem); {if ("" != null) return nodes;} throw new Error("Missing return statement in function");
@Override protected boolean isOutputCacheable() { int ln = getChildCount(); for (int i = 0; i < ln; i++) { if (!getChild(i).isOutputCacheable()) { return false; } } return true; }
/** * @deprecated Use {@link #addChild(TemplateElement)} instead. */ @Deprecated void addElement(TemplateElement element) { addChild(element); }
@Override boolean isIgnorable(boolean stripWhitespace) { return getChildCount() == 0; }
final public MixedContent WhitespaceAndComments() throws ParseException {MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_22: begin = elem; nodes.addChild(elem); && nodes.getChildCount() == 1 && nodes.getChild(0) instanceof TextBlock) { {if ("" != null) return null;} nodes.setLocation(template, begin, elem); {if ("" != null) return nodes;} throw new Error("Missing return statement in function");
/** * Used for some backward compatibility hacks. */ MixedContent asMixedContent() { MixedContent mixedContent = new MixedContent(); if (count != 0) { TemplateElement first = buffer[0]; mixedContent.setChildren(this); mixedContent.setLocation(first.getTemplate(), first, getLast()); } return mixedContent; }
final public MixedContent MixedContent() throws ParseException {MixedContent mixedContent = new MixedContent(); TemplateElement elem, begin = null; mixedContentNesting++; begin = elem; mixedContent.addElement(elem); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case ATTEMPT: mixedContent.setLocation(template, begin, elem); {if ("" != null) return mixedContent;} throw new Error("Missing return statement in function");
final public TemplateElement FreeMarkerText() throws ParseException {MixedContent nodes = new MixedContent(); TemplateElement elem, begin = null; label_21: begin = elem; nodes.addChild(elem); switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case STATIC_TEXT_WS: nodes.setLocation(template, begin, elem); {if ("" != null) return nodes;} throw new Error("Missing return statement in function");
/** * @param searched the expression to be tested. */ SwitchBlock(Expression searched, MixedContent ignoredSectionBeforeFirstCase) { this.searched = searched; int ignoredCnt = ignoredSectionBeforeFirstCase != null ? ignoredSectionBeforeFirstCase.getChildCount() : 0; setChildBufferCapacity(ignoredCnt + 4); for (int i = 0; i < ignoredCnt; i++) { addChild(ignoredSectionBeforeFirstCase.getChild(i)); } firstCaseIndex = ignoredCnt; // Note that normally postParseCleanup will overwrite this }