public class ConditionalTernaryExpression extends Expression implements IConditionalTernaryExpression
Modifier and Type | Field and Description |
---|---|
protected Expression |
_condition |
protected Expression |
_first |
protected Expression |
_second |
_type
_tokens, UNDEF_FILE, UNDEF_FUNCTION, UNDEF_MODULE
EMPTY_ARRAY
Constructor and Description |
---|
ConditionalTernaryExpression() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate()
Evaluates this Expression and returns the result.
|
Expression |
getCondition() |
Expression |
getFirst() |
Expression |
getSecond() |
boolean |
isCompileTimeConstant() |
void |
setCondition(Expression e) |
void |
setFirst(Expression e) |
void |
setSecond(Expression e) |
String |
toString()
Subclasses should return a String representing the parsed expression.
|
evaluate, getContextType, getReturnType, getType, getTypeImpl, isNullSafe, isUnchecked, setType
addExceptionsFrom, addParseException, addParseException, addParseException, addParseExceptions, addParseIssues, addParseWarning, addParseWarning, addParseWarnings, addToken, adjustColumn, adjustLineNum, assignTokens, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, compactParseTree, findAncestorParsedElementByType, findDeclaringStatement, findLineNumberOfDeclaration, findRootParsedElement, getAnnotations, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getEnclosingFeatureInfo, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getQualifyingEnclosingTypeInfo, getTokens, hasImmediateParseIssue, hasImmediateParseWarning, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, initEmptyParseTree, initLocation, isSuppressed, isSuppressed, isSynthetic, makeDoubleValue, makeFloatValue, makeInteger, makeLong, removeParseException, removeParseWarning, removeParseWarningRecursively, setGosuProgram, setLineNum, setLocation, setParent, setSynthetic, shouldClearParseInfo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
evaluate, getContextType, isNullSafe, isUnchecked
addExceptionsFrom, addParseException, addParseException, addParseWarning, addParseWarning, clearParseExceptions, clearParseTreeInformation, clearParseWarnings, findAncestorParsedElementByType, findDeclaringStatement, findRootParsedElement, getColumn, getContainedParsedElementsByType, getContainedParsedElementsByTypes, getContainedParsedElementsByTypesWithIgnoreSet, getFunctionName, getGosuClass, getGosuProgram, getImmediateParseIssue, getImmediateParseIssues, getLineNum, getLocation, getModule, getParent, getParseExceptions, getParseIssues, getParseWarnings, getReturnType, getTokens, hasImmediateParseIssue, hasImmediateParseWarnings, hasParseException, hasParseExceptions, hasParseIssue, hasParseIssues, hasParseWarning, hasParseWarnings, isSuppressed, isSynthetic, setLocation, setParent
protected Expression _condition
protected Expression _first
protected Expression _second
public Expression getCondition()
getCondition
in interface IConditionalTernaryExpression
public void setCondition(Expression e)
e
- The condition expression for the ternary expression.public Expression getFirst()
getFirst
in interface IConditionalTernaryExpression
public void setFirst(Expression e)
e
- The first choice expression for the ternary expression.public Expression getSecond()
getSecond
in interface IConditionalTernaryExpression
public void setSecond(Expression e)
e
- The second choice expression for the ternary expression.public boolean isCompileTimeConstant()
isCompileTimeConstant
in interface IParsedElement
isCompileTimeConstant
in class ParsedElement
public Object evaluate()
evaluate
in interface IExpression
evaluate
in class Expression
public String toString()
Expression
toString
in class Expression
Copyright © 2016. All rights reserved.