|
||||||||||
| 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
org.ujac.util.template.ElseifToken
public class ElseifToken
Name: ElseifToken
Description: Represents an _elseif_ statement.
| Field Summary | |
|---|---|
static TokenAncestor[] |
ancestorRules
The ancestor rules. |
| 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 | |
|---|---|
ElseifToken()
Constructs a ElseifToken instance with no specific attributes. |
|
| Method Summary | |
|---|---|
protected TemplateToken |
cloneToken(BaseTemplateInterpreter interpreter,
TemplateTokenContainer parent)
Clones the token for caching reasons. |
TokenAncestor[] |
getAncestorRules()
Gets the ancestor rules for this template. |
protected String |
getArgumentsAsString()
Gets the argument list as string. |
BaseConditionToken |
getRootCondition()
Gets the root condition. |
String |
getTokenName()
Gets the token name. |
void |
initialize(BaseTemplateInterpreter interpreter,
char[] source,
int position,
int length)
Initializes the token. |
boolean |
isTrue(TemplateContext ctx)
Tells whether or not the condition is true. |
void |
setArgument(Operand argument,
int idx)
Sets an argument. |
String |
toString()
|
| Methods inherited from class org.ujac.util.template.BaseConditionToken |
|---|
execute, getPreviousCondition, isResolved, parseArguments, setResolved |
| Methods inherited from class org.ujac.util.template.TemplateTokenContainer |
|---|
addToken, clearTokens, cloneChildTokens, close, getBodyEnd, getBodyStart, getProcedureRegistry, getToken, getTokenCount, isBodyToken, isClosed, setBodyStart, setProcedureRegistry |
| Methods inherited from class org.ujac.util.template.TemplateToken |
|---|
checkContainer, getEndPosition, getIndention, getLength, getLevel, getParent, getPosition, getSource, isLegalAncestor, isLegalAncestor, parseArguments, setLength, setLevel, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TokenAncestor[] ancestorRules
| Constructor Detail |
|---|
public ElseifToken()
| Method Detail |
|---|
public String getTokenName()
getTokenName in class TemplateTokenpublic TokenAncestor[] getAncestorRules()
getAncestorRules in class TemplateToken
public void initialize(BaseTemplateInterpreter interpreter,
char[] source,
int position,
int length)
throws TemplateException
initialize in class TemplateTokeninterpreter - The template interpreter.source - The source code.position - The start position.length - The length of the interresting area.
TemplateException - In case the initialization failed.
public void setArgument(Operand argument,
int idx)
setArgument in class TemplateTokenargument - The argument to set.idx - The argument index.
public boolean isTrue(TemplateContext ctx)
throws ExpressionException
isTrue in class BaseConditionTokenctx - The template context.
ExpressionException - If the token could not be successfuly executed.public BaseConditionToken getRootCondition()
getRootCondition in class BaseConditionTokenpublic String toString()
toString in class TemplateTokenContainerObject.toString()protected String getArgumentsAsString()
TemplateToken
getArgumentsAsString in class TemplateTokenTemplateToken.getArgumentsAsString()
protected TemplateToken cloneToken(BaseTemplateInterpreter interpreter,
TemplateTokenContainer parent)
cloneToken in class TemplateTokeninterpreter - The interpreter to use.parent - The actual parent in the cloned object tree.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||