public interface IContext
Modifier and Type | Interface and Description |
---|---|
static class |
IContext.Break |
static class |
IContext.Continue |
Modifier and Type | Method and Description |
---|---|
String |
closeBlock()
Notify context to close current block and return
the block close carets
|
boolean |
compactMode() |
IBlockHandler |
currentBlock()
Return current block handler
|
int |
currentLine()
Return current line number
|
String |
currentSection()
Returns the current section name
|
int |
cursor() |
void |
enterDirectiveComment() |
CodeBuilder |
getCodeBuilder()
Return the root source code builder
|
IDialect |
getDialect() |
RythmEngine |
getEngine() |
String |
getRemain()
Return the remaining template string that has not parsed yet
|
org.rythmengine.internal.compiler.TemplateClass |
getTemplateClass() |
String |
getTemplateSource(int start,
int end)
Return any segment of template source
|
boolean |
hasRemain()
Do have have remain template content to be parsed
|
boolean |
insideBody() |
boolean |
insideBody2() |
boolean |
insideDirectiveComment() |
void |
leaveDirectiveComment() |
void |
openBlock(IBlockHandler bh)
Notify context to enter a block
|
char |
peek() |
IContext.Break |
peekBreak() |
ICodeType |
peekCodeType() |
Boolean |
peekCompact() |
IContext.Continue |
peekContinue() |
Boolean |
peekInsideBody() |
Boolean |
peekInsideBody2() |
Locale |
peekLocale() |
char |
pop() |
IContext.Break |
popBreak() |
ICodeType |
popCodeType() |
Boolean |
popCompact() |
IContext.Continue |
popContinue() |
Boolean |
popInsideBody() |
Boolean |
popInsideBody2() |
Locale |
popLocale() |
void |
pushBreak(IContext.Break b) |
void |
pushCodeType(ICodeType type) |
void |
pushCompact(Boolean compact) |
void |
pushContinue(IContext.Continue c) |
void |
pushInsideBody(Boolean b) |
void |
pushInsideBody2(Boolean b) |
void |
pushLocale(Locale locale) |
void |
setDialect(IDialect dialect) |
void |
step(int i)
Move the current cursor i steps ahead
|
CodeBuilder getCodeBuilder()
String getRemain()
boolean hasRemain()
char peek()
char pop()
void step(int i)
i
- String getTemplateSource(int start, int end)
start
- end
- void openBlock(IBlockHandler bh)
bh
- the block handlerIBlockHandler currentBlock()
ParseException
String closeBlock() throws ParseException
ParseException
String currentSection()
void setDialect(IDialect dialect)
IDialect getDialect()
int currentLine()
int cursor()
org.rythmengine.internal.compiler.TemplateClass getTemplateClass()
RythmEngine getEngine()
void pushBreak(IContext.Break b)
IContext.Break peekBreak()
IContext.Break popBreak()
void pushContinue(IContext.Continue c)
IContext.Continue peekContinue()
IContext.Continue popContinue()
boolean compactMode()
void pushCompact(Boolean compact)
Boolean peekCompact()
Boolean popCompact()
boolean insideBody()
Boolean peekInsideBody()
void pushInsideBody(Boolean b)
Boolean popInsideBody()
boolean insideBody2()
Boolean peekInsideBody2()
void pushInsideBody2(Boolean b)
Boolean popInsideBody2()
boolean insideDirectiveComment()
void enterDirectiveComment()
void leaveDirectiveComment()
ICodeType peekCodeType()
void pushCodeType(ICodeType type)
ICodeType popCodeType()
Locale peekLocale()
void pushLocale(Locale locale)
Locale popLocale()
Copyright © 2015. All Rights Reserved.