final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
/** * 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; }
/** * 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; } } }
final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
final void setLocation(Template template, Token tagBegin, Token tagEnd, TemplateElements children) { TemplateElement lastChild = children.getLast(); if (lastChild != null) { // [<#if exp>children]<#else> setLocation(template, tagBegin, lastChild); } else { // [<#if exp>]<#else> setLocation(template, tagBegin, tagEnd); } }
/** * 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; }
/** * 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; }
/** * 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; } } }
/** * 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; } } }