public class TopLevelParser extends AbstractBodyParser<TopNode>
AbstractBodyParser.JavaSnippetTagEndDetector
AbstractParser.NotAnIdentifierException
Modifier and Type | Field and Description |
---|---|
static String |
BAD_ABSMETH_CONTENT |
static String |
EXPECTING_ARROW |
static String |
EXPECTING_IMPLEMENTS_CLOSE |
static String |
EXPECTING_IMPORTS_CLOSE |
static String |
EXPECTING_SEMI |
static String |
MALFORMED_ANNOTATE_TAG_ERROR |
static String |
MALFORMED_EXTENDS_TAG_ERROR |
static String |
MALFORMED_REPLACES_TAG_ERROR |
static String |
UNRECOGNIZED_ANNOTATION_TYPE_ERROR |
ANNOTATE_TAG_IN_SUBCOMPONENT, bodyStart, CLASS_TAG_IN_SUBCOMPONENT, EMIT_ESCAPE_CODE_ERROR, EMIT_MISSING_TAG_END_ERROR, ENCOUNTERED_ELSE_TAG_WITHOUT_PRIOR_IF_TAG, ENCOUNTERED_ELSEIF_TAG_WITHOUT_PRIOR_IF_TAG, ESCAPE_TAG_IN_SUBCOMPONENT, EXTENDS_TAG_IN_SUBCOMPONENT, GENERIC_TAG_IN_SUBCOMPONENT, IMPLEMENTS_TAG_IN_SUBCOMPONENT, PARENT_ARGS_TAG_IN_SUBCOMPONENT, PARENT_MARKER_TAG_IN_SUBCOMPONENT, PERCENT_GREATER_THAN_EOF_ERROR, REPLACEABLE_TAG_IN_SUBCOMPONENT, REPLACES_TAG_IN_SUBCOMPONENT, root, text, UNEXPECTED_FRAGMENTS_CLOSE_ERROR, UNEXPECTED_NAMED_FRAGMENT_CLOSE_ERROR
BAD_ARGS_CLOSE_TAG, BAD_JAVA_TYPE_SPECIFIER, EOF_IN_JAVA_QUOTE_ERROR, errors, INCOMPLETE_ARRAY_SPECIFIER_ERROR, MALFORMED_TAG_ERROR, NOT_AN_IDENTIFIER_ERROR, reader
Constructor and Description |
---|
TopLevelParser(org.jamon.api.TemplateLocation location,
Reader reader,
String encoding) |
Modifier and Type | Method and Description |
---|---|
protected void |
handleAbsMethodTag(org.jamon.api.Location tagLocation) |
protected void |
handleAliasesTag(org.jamon.api.Location tagLocation) |
protected void |
handleAnnotationTag(org.jamon.api.Location tagLocation) |
protected void |
handleClassTag(org.jamon.api.Location tagLocation) |
protected void |
handleDefTag(org.jamon.api.Location tagLocation) |
protected void |
handleEof()
This method is called when an end of file is reached, and should add an error if this is not
acceptable
|
protected void |
handleEscapeTag(org.jamon.api.Location tagLocation) |
protected void |
handleExtendsTag(org.jamon.api.Location tagLocation) |
protected void |
handleGenericTag(org.jamon.api.Location tagLocation) |
protected void |
handleImplementsTag(org.jamon.api.Location tagLocation) |
protected void |
handleImportTag(org.jamon.api.Location tagLocation) |
protected void |
handleMethodTag(org.jamon.api.Location tagLocation) |
protected void |
handleOverrideTag(org.jamon.api.Location tagLocation) |
protected void |
handleParentArgsNode(org.jamon.api.Location tagLocation) |
protected void |
handleParentMarkerTag(org.jamon.api.Location tagLocation) |
protected void |
handleReplaceableTag(org.jamon.api.Location tagLocation) |
protected void |
handleReplacesTag(org.jamon.api.Location tagLocation) |
protected boolean |
isTopLevel() |
AbstractBodyParser<TopNode> |
parse() |
doneParsing, getRootNode, handleElseIfTag, handleElseTag, handleForTag, handleFragmentsClose, handleIfTag, handleLiteralTag, handleNamedFragmentClose, handleTag, handleTagClose, handleText, handleWhileTag, readCondition, readLine, readTagName
addError, addError, checkForTagClosure, checkToken, eofErrorMessage, parsePath, readAndAppendChar, readChar, readClassName, readIdentifier, readIdentifierOrThrow, readJava, readType, readUntil, soakWhitespace
public static final String BAD_ABSMETH_CONTENT
public static final String EXPECTING_SEMI
public static final String EXPECTING_ARROW
public static final String MALFORMED_EXTENDS_TAG_ERROR
public static final String MALFORMED_REPLACES_TAG_ERROR
public static final String MALFORMED_ANNOTATE_TAG_ERROR
public static final String UNRECOGNIZED_ANNOTATION_TYPE_ERROR
public static final String EXPECTING_IMPLEMENTS_CLOSE
public static final String EXPECTING_IMPORTS_CLOSE
public AbstractBodyParser<TopNode> parse() throws IOException
parse
in class AbstractBodyParser<TopNode>
IOException
protected void handleMethodTag(org.jamon.api.Location tagLocation) throws IOException
handleMethodTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the def
tagIOException
protected void handleOverrideTag(org.jamon.api.Location tagLocation) throws IOException
handleOverrideTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the def tagIOException
protected void handleDefTag(org.jamon.api.Location tagLocation) throws IOException
handleDefTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the def tagIOException
protected void handleClassTag(org.jamon.api.Location tagLocation) throws IOException
handleClassTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the class
tag.IOException
protected void handleExtendsTag(org.jamon.api.Location tagLocation) throws IOException
handleExtendsTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the extends
tagIOException
protected void handleReplacesTag(org.jamon.api.Location tagLocation) throws IOException
handleReplacesTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the replaces
tagIOException
protected void handleReplaceableTag(org.jamon.api.Location tagLocation) throws IOException
handleReplaceableTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the replaceable
tagIOException
protected void handleImplementsTag(org.jamon.api.Location tagLocation) throws IOException
handleImplementsTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the implements
tagIOException
protected void handleImportTag(org.jamon.api.Location tagLocation) throws IOException
handleImportTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the import
tagIOException
protected void handleAliasesTag(org.jamon.api.Location tagLocation) throws IOException
handleAliasesTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the alias
tagIOException
protected void handleAbsMethodTag(org.jamon.api.Location tagLocation) throws IOException
handleAbsMethodTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the absmeth tagIOException
protected void handleParentArgsNode(org.jamon.api.Location tagLocation) throws IOException
handleParentArgsNode
in class AbstractBodyParser<TopNode>
tagLocation
- location of the xargs
nodeIOException
protected void handleParentMarkerTag(org.jamon.api.Location tagLocation) throws IOException
handleParentMarkerTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the abstract
tagIOException
protected void handleEof()
AbstractBodyParser
handleEof
in class AbstractBodyParser<TopNode>
protected void handleEscapeTag(org.jamon.api.Location tagLocation) throws IOException
handleEscapeTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the escape
tagIOException
protected void handleGenericTag(org.jamon.api.Location tagLocation) throws IOException
handleGenericTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the generic
tagIOException
protected void handleAnnotationTag(org.jamon.api.Location tagLocation) throws IOException
handleAnnotationTag
in class AbstractBodyParser<TopNode>
tagLocation
- location of the annotate
tagIOException
protected boolean isTopLevel()
isTopLevel
in class AbstractBodyParser<TopNode>
true
if this is a top level parserCopyright © 2003–2014 Jamon developers. All rights reserved.