@Override boolean isIgnorable(boolean stripWhitespace) { return getChildCount() == 0; }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { super.postParseCleanup(stripWhitespace); return getChildCount() == 1 ? getChild(0) : this; }
@Override protected boolean isOutputCacheable() { int ln = getChildCount(); for (int i = 0; i < ln; i++) { if (!getChild(i).isOutputCacheable()) { return false; } } return true; }
/** * @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 }
&& nodes.getChildCount() == 1 && nodes.getChild(0) instanceof TextBlock) { {if ("" != null) return null;}
@Override boolean isIgnorable(boolean stripWhitespace) { return getChildCount() == 0; }
@Override boolean isIgnorable(boolean stripWhitespace) { return getChildCount() == 0; }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { super.postParseCleanup(stripWhitespace); return getChildCount() == 1 ? getChild(0) : this; }
@Override protected boolean isOutputCacheable() { int ln = getChildCount(); for (int i = 0; i < ln; i++) { if (!getChild(i).isOutputCacheable()) { return false; } } return true; }
@Override protected boolean isOutputCacheable() { int ln = getChildCount(); for (int i = 0; i < ln; i++) { if (!getChild(i).isOutputCacheable()) { return false; } } return true; }
@Override TemplateElement postParseCleanup(boolean stripWhitespace) throws ParseException { super.postParseCleanup(stripWhitespace); return getChildCount() == 1 ? getChild(0) : this; }
/** * @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 }
/** * @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 }
&& nodes.getChildCount() == 1 && nodes.getChild(0) instanceof TextBlock) { {if ("" != null) return null;}
&& nodes.getChildCount() == 1 && nodes.getChild(0) instanceof TextBlock) { {if ("" != null) return null;}