public final class PropertyLiteralExpression extends Expression
| Constructor and Description |
|---|
PropertyLiteralExpression(ASTInfo info,
RecordType recordType,
java.util.List<java.lang.String> properties) |
PropertyLiteralExpression(ASTInfo info,
RecordType recordType,
java.lang.String property) |
| Modifier and Type | Method and Description |
|---|---|
<T,E extends java.lang.Throwable> |
accept(ExpressionVisitor<T,E> visitor)
Accepts visitor.
|
protected java.lang.Object |
basicInterpret(Interpreter interpreter,
InterpreterStackTrace stackTrace)
Interpret expression.
|
java.lang.Object |
getParseTimeConstant()
Returns the value of the expression determined in parse time.
|
java.util.List<java.lang.String> |
getProperties() |
ASTRange |
getPropertyRange(int index)
Returns the range of the property identifier at the given index.
|
RecordProperty |
getRecordProperty(int index)
Returns the record property corresponding to the path segment at the given index.
|
RecordType |
getRecordType() |
int |
getSegmentCount() |
ASTNode |
getTypeRange()
Returns the range of the record type.
|
PropertyPath |
getValue()
Returns the property path value, or
null
if the expression is not valid. |
boolean |
isParseTimeConstant()
Returns
true if the value of the expression is known
in parse time. |
createANTLRParser, doInterpret, evalCondition, evaluateToExpressions, executeCompiled, getCompiled, getDebugLine, getIdentifierAst, getPrimaryRange, getPropertySelectorRange, getRange, getResultExpression, getResultExpressions, getType, interpret, interpretInCurrentNamespace, isCreatingNonModuleContextObjects, requiresNewNamespace, setCompiled, showInFullText, showInSurroundingText, showInText, toExpressionsgetFullText, getLine, getNodeText, getText, toStringcontains, getBeginIndex, getEndIndex, getLengthclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFullText, getLine, getNodeText, getTextcontains, getBeginIndex, getEndIndex, getLengthpublic PropertyLiteralExpression(ASTInfo info, RecordType recordType, java.lang.String property)
info - recordType - property - public PropertyLiteralExpression(ASTInfo info, RecordType recordType, java.util.List<java.lang.String> properties)
info - recordType - properties - public PropertyPath getValue()
null
if the expression is not valid.public boolean isParseTimeConstant()
Expressiontrue if the value of the expression is known
in parse time. E.g. constant literals, enumerations, types (without free types).isParseTimeConstant in class Expressiontrue if the expression value is known during parsingExpression.getParseTimeConstant()public java.lang.Object getParseTimeConstant()
ExpressionUnsupportedOperationException.
Subclasses, which return true when Expression.isParseTimeConstant()
is called, should override this method.getParseTimeConstant in class ExpressionExpression.isParseTimeConstant()public RecordType getRecordType()
public java.util.List<java.lang.String> getProperties()
public int getSegmentCount()
public <T,E extends java.lang.Throwable> T accept(ExpressionVisitor<T,E> visitor) throws E extends java.lang.Throwable
Expressionaccept in class ExpressionEE extends java.lang.Throwableprotected java.lang.Object basicInterpret(Interpreter interpreter, InterpreterStackTrace stackTrace)
ExpressionbasicInterpret in class Expressionpublic RecordProperty getRecordProperty(int index)
null if the expression is not valid.index - public ASTNode getTypeRange()
public ASTRange getPropertyRange(int index)
index - Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.