public abstract class AbstractBodyParser<Node extends AbstractBodyNode> extends AbstractParser
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractBodyParser.JavaSnippetTagEndDetector |
AbstractParser.NotAnIdentifierException| Modifier and Type | Field and Description |
|---|---|
static String |
ANNOTATE_TAG_IN_SUBCOMPONENT |
protected org.jamon.api.Location |
bodyStart |
static String |
CLASS_TAG_IN_SUBCOMPONENT |
static String |
EMIT_ESCAPE_CODE_ERROR |
static String |
EMIT_MISSING_TAG_END_ERROR |
static String |
ENCOUNTERED_ELSE_TAG_WITHOUT_PRIOR_IF_TAG |
static String |
ENCOUNTERED_ELSEIF_TAG_WITHOUT_PRIOR_IF_TAG |
static String |
ESCAPE_TAG_IN_SUBCOMPONENT |
static String |
EXTENDS_TAG_IN_SUBCOMPONENT |
static String |
GENERIC_TAG_IN_SUBCOMPONENT |
static String |
IMPLEMENTS_TAG_IN_SUBCOMPONENT |
static String |
PARENT_ARGS_TAG_IN_SUBCOMPONENT |
static String |
PARENT_MARKER_TAG_IN_SUBCOMPONENT |
static String |
PERCENT_GREATER_THAN_EOF_ERROR |
static String |
REPLACEABLE_TAG_IN_SUBCOMPONENT |
static String |
REPLACES_TAG_IN_SUBCOMPONENT |
protected Node |
root |
protected StringBuilder |
text |
static String |
UNEXPECTED_FRAGMENTS_CLOSE_ERROR |
static String |
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| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBodyParser(Node rootNode,
PositionalPushbackReader reader,
ParserErrorsImpl errors) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doneParsing() |
Node |
getRootNode() |
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 |
handleElseIfTag(org.jamon.api.Location tagLocation) |
protected void |
handleElseTag(org.jamon.api.Location tagLocation) |
protected abstract 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 |
handleForTag(org.jamon.api.Location tagLocation) |
protected boolean |
handleFragmentsClose(org.jamon.api.Location tagLocation)
Handle the occurence of a '</&>' tag
|
protected void |
handleGenericTag(org.jamon.api.Location tagLocation) |
protected void |
handleIfTag(org.jamon.api.Location tagLocation) |
protected void |
handleImplementsTag(org.jamon.api.Location tagLocation) |
protected void |
handleImportTag(org.jamon.api.Location tagLocation) |
protected void |
handleLiteralTag(org.jamon.api.Location tagLocation) |
protected void |
handleMethodTag(org.jamon.api.Location tagLocation) |
protected boolean |
handleNamedFragmentClose(org.jamon.api.Location tagLocation)
Handle the occurence of a '</|;>' tag
|
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 void |
handleTag(String tagName,
org.jamon.api.Location tagLocation) |
protected void |
handleTagClose(String tagName,
org.jamon.api.Location tagLocation)
Handle a tag closure
|
protected void |
handleText() |
protected void |
handleWhileTag(org.jamon.api.Location tagLocation) |
protected boolean |
isTopLevel() |
AbstractBodyParser<Node> |
parse() |
protected String |
readCondition(org.jamon.api.Location tagLocation,
String tagName) |
protected String |
readLine() |
protected String |
readTagName() |
addError, addError, checkForTagClosure, checkToken, eofErrorMessage, parsePath, readAndAppendChar, readChar, readClassName, readIdentifier, readIdentifierOrThrow, readJava, readType, readUntil, soakWhitespacepublic static final String ENCOUNTERED_ELSE_TAG_WITHOUT_PRIOR_IF_TAG
public static final String ENCOUNTERED_ELSEIF_TAG_WITHOUT_PRIOR_IF_TAG
public static final String ESCAPE_TAG_IN_SUBCOMPONENT
public static final String GENERIC_TAG_IN_SUBCOMPONENT
public static final String ANNOTATE_TAG_IN_SUBCOMPONENT
public static final String CLASS_TAG_IN_SUBCOMPONENT
public static final String UNEXPECTED_NAMED_FRAGMENT_CLOSE_ERROR
public static final String UNEXPECTED_FRAGMENTS_CLOSE_ERROR
public static final String EMIT_ESCAPE_CODE_ERROR
public static final String EMIT_MISSING_TAG_END_ERROR
public static final String PERCENT_GREATER_THAN_EOF_ERROR
public static final String EXTENDS_TAG_IN_SUBCOMPONENT
public static final String IMPLEMENTS_TAG_IN_SUBCOMPONENT
public static final String REPLACES_TAG_IN_SUBCOMPONENT
public static final String REPLACEABLE_TAG_IN_SUBCOMPONENT
public static final String PARENT_ARGS_TAG_IN_SUBCOMPONENT
public static final String PARENT_MARKER_TAG_IN_SUBCOMPONENT
protected StringBuilder text
protected final Node extends AbstractBodyNode root
protected final org.jamon.api.Location bodyStart
protected AbstractBodyParser(Node rootNode, PositionalPushbackReader reader, ParserErrorsImpl errors)
protected void handleText()
public AbstractBodyParser<Node> parse() throws IOException
IOExceptionprotected void doneParsing()
protected boolean isTopLevel()
true if this is a top level parserprotected void handleTag(String tagName, org.jamon.api.Location tagLocation) throws IOException
IOExceptionprotected void handleTagClose(String tagName, org.jamon.api.Location tagLocation) throws IOException
tagName - The tag nametagLocation - The tag locationIOExceptionprotected abstract void handleEof()
protected boolean handleNamedFragmentClose(org.jamon.api.Location tagLocation)
throws IOException
true if this parser is doneIOExceptionprotected boolean handleFragmentsClose(org.jamon.api.Location tagLocation)
throws IOException
true if this parser is doneIOExceptionprotected void handleMethodTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the def tagIOExceptionprotected void handleOverrideTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the def tagIOExceptionprotected void handleDefTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the def tagIOExceptionprotected void handleAbsMethodTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the absmeth tagIOExceptionprotected void handleWhileTag(org.jamon.api.Location tagLocation)
throws IOException
IOExceptionprotected void handleForTag(org.jamon.api.Location tagLocation)
throws IOException
IOExceptionprotected void handleIfTag(org.jamon.api.Location tagLocation)
throws IOException
IOExceptionprotected String readCondition(org.jamon.api.Location tagLocation, String tagName) throws IOException, ParserErrorImpl
IOExceptionParserErrorImplprotected void handleElseTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the else tagIOExceptionprotected void handleElseIfTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the elseif tagIOExceptionprotected void handleParentArgsNode(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the xargs nodeIOExceptionprotected void handleParentMarkerTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the abstract tagIOExceptionprotected void handleEscapeTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the escape tagIOExceptionprotected void handleGenericTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the generic tagIOExceptionprotected void handleAnnotationTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the annotate tagIOExceptionprotected void handleLiteralTag(org.jamon.api.Location tagLocation)
throws IOException
IOExceptionprotected void handleClassTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the class tag.IOExceptionprotected void handleExtendsTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the extends tagIOExceptionprotected void handleImplementsTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the implements tagIOExceptionprotected void handleReplacesTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the replaces tagIOExceptionprotected void handleReplaceableTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the replaceable tagIOExceptionprotected void handleImportTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the import tagIOExceptionprotected void handleAliasesTag(org.jamon.api.Location tagLocation)
throws IOException
tagLocation - location of the alias tagIOExceptionprotected String readTagName() throws IOException
IOExceptionprotected String readLine() throws IOException
IOExceptionpublic Node getRootNode()
Copyright © 2003–2015 Jamon developers. All rights reserved.