public class TagReader
extends java.lang.Object
TextTag
and all other template parts are
either VariableTag
s or SubTemplateStructureTag
s.
Copyright (C) 2012-2016 JIOWA Business Solutions GmbH, Bettinastr. 30 , 60325 Frankfurt am Main, Germany
Homepage: www.jiowa.de
All rights reserved.
Download: www.jiowa.de/download.html
License: www.jiowa.de/license.html
Modifier and Type | Field and Description |
---|---|
protected TemplateContext |
context |
protected ErrorPosition |
errorposition |
protected java.util.Queue<Tag> |
queue |
protected TokenReader |
reader |
protected StringTemplate |
template |
Constructor and Description |
---|
TagReader(TemplateContext context,
java.util.List<Token> tokenList,
ErrorPosition errorposition) |
TagReader(TemplateNotation templateNotation,
TemplateMapLoader loader,
StringTemplate template)
Constructs a tag reader based on a specific template notation (i.e. special characters for
tags and subtemplate structures etc.) and a template string.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Tag> |
buildInlineTags(InlineSubTemplateContentToken token) |
protected com.jiowa.util.tuple.Tuple<Tag,TextOperatorTag> |
buildTag(Token token)
Builds a tag starting at the current token.
|
protected com.jiowa.util.tuple.Tuple<java.util.Map<java.lang.String,AbstractSubTemplateTag>,TextOperatorToken> |
collectSubTemplates(Token prefixToken)
Collects all subtemplate tags starting from the current position.
|
Tag |
read()
Delivers the next
Tag for this template. |
java.util.List<Tag> |
readAll()
Reads all tags at once.
|
protected Tag |
readNextTag(Token token) |
protected TemplateContext context
protected StringTemplate template
protected TokenReader reader
protected ErrorPosition errorposition
protected java.util.Queue<Tag> queue
public TagReader(TemplateNotation templateNotation, TemplateMapLoader loader, StringTemplate template)
public TagReader(TemplateContext context, java.util.List<Token> tokenList, ErrorPosition errorposition)
public Tag read()
Tag
for this template.
A tag can either be a VariableTag
which denotes either a variable, a sub template or an include structure etc
or a TextTag
which contains simple text.public java.util.List<Tag> readAll()
protected com.jiowa.util.tuple.Tuple<Tag,TextOperatorTag> buildTag(Token token)
protected com.jiowa.util.tuple.Tuple<java.util.Map<java.lang.String,AbstractSubTemplateTag>,TextOperatorToken> collectSubTemplates(Token prefixToken)
prefixToken
- AbstractSubTemplateTag
and a TextOperatorToken
protected java.util.List<Tag> buildInlineTags(InlineSubTemplateContentToken token)