|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujac.util.template.TemplateToken
org.ujac.util.template.TemplateTokenContainer
org.ujac.util.template.BaseConditionToken
public abstract class BaseConditionToken
Name: BaseConditionToken
Description: A base class for condition tokens.
| Field Summary |
|---|
| Fields inherited from class org.ujac.util.template.TemplateTokenContainer |
|---|
procedureRegistry |
| Fields inherited from class org.ujac.util.template.TemplateToken |
|---|
interpreter, nextLegalAncestor, parent, position, source |
| Constructor Summary | |
|---|---|
BaseConditionToken()
Constructs a BaseConditionToken instance with no specific attributes. |
|
| Method Summary | |
|---|---|
void |
execute(Writer writer,
TemplateContext ctx)
Excecutes the statement token. |
protected BaseConditionToken |
getPreviousCondition()
Gets the previous condition token in the parent's child list. |
abstract BaseConditionToken |
getRootCondition()
Gets the root condition. |
boolean |
isResolved()
Tells whether or not the condition bas been resolved so far. |
abstract boolean |
isTrue(TemplateContext ctx)
Tells whether or not the condition is true. |
int |
parseArguments()
Parses the arguments of the token. |
void |
setResolved(boolean resolved)
Tells whether or not the condition bas been resolved so far. |
| Methods inherited from class org.ujac.util.template.TemplateTokenContainer |
|---|
addToken, clearTokens, cloneChildTokens, close, getBodyEnd, getBodyStart, getProcedureRegistry, getToken, getTokenCount, isBodyToken, isClosed, setBodyStart, setProcedureRegistry, toString |
| Methods inherited from class org.ujac.util.template.TemplateToken |
|---|
checkContainer, cloneToken, getAncestorRules, getArgumentsAsString, getEndPosition, getIndention, getLength, getLevel, getParent, getPosition, getSource, getTokenName, initialize, isLegalAncestor, isLegalAncestor, parseArguments, setArgument, setLength, setLevel, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BaseConditionToken()
| Method Detail |
|---|
public int parseArguments()
throws StatementException
parseArguments in class TemplateTokenStatementException - In case the argument parsing failed.
public void execute(Writer writer,
TemplateContext ctx)
throws TemplateException,
IOException
execute in class TemplateTokenwriter - The writer to write to.ctx - The template context.
TemplateException - If the token could not be successfuly executed.
IOException - In case an output failure occurred.
public abstract boolean isTrue(TemplateContext ctx)
throws ExpressionException
ctx - The template context.
ExpressionException - If the token could not be successfuly executed.public boolean isResolved()
public void setResolved(boolean resolved)
resolved - The value to seet.
protected BaseConditionToken getPreviousCondition()
throws StatementException
StatementException - In case the latest token was no condition token.public abstract BaseConditionToken getRootCondition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||