@OpenApiAll
public class TemplateParser
extends java.lang.Object
Constructor and Description |
---|
TemplateParser() |
Modifier and Type | Method and Description |
---|---|
Directive |
extractDirective(java.lang.StringBuffer buffer,
int offset,
java.lang.String directiveName,
java.lang.Class<?>[] parameterTypes,
Template template)
Extract a directive from buffer string.
|
int |
lineCount(java.lang.CharSequence input)
Count number of line from given input.
|
void |
setCommentString(java.lang.String commentString)
Set string for in-line comment.
|
public void setCommentString(java.lang.String commentString)
commentString
- string for in-line commentpublic int lineCount(java.lang.CharSequence input)
input
- the input stringpublic Directive extractDirective(java.lang.StringBuffer buffer, int offset, java.lang.String directiveName, java.lang.Class<?>[] parameterTypes, Template template) throws ParseErrorException
buffer
- a buffer string contains templateoffset
- starting offsetdirectiveName
- name of directive. Begin with # e.g. #importparameterTypes
- directive parameter typetemplate
- a templateParseErrorException
- if directive structure is not recognize by parser.Copyright © 2010 - No Magic Asia