public abstract class OwExprLiteral extends OwExprExpression implements OwExprPrimaryPrefix
An expression representing a fixed value (egg. strings , numeric values so.)
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
OwExprParser
,
OwExprValue
Modifier and Type | Field and Description |
---|---|
protected OwExprConstantSymbol |
m_symbol |
m_errorTable, m_symbolTable, m_typeError
Constructor and Description |
---|
OwExprLiteral(String symbolName_p,
OwExprValue value_p,
OwExprType symbolType_p,
OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
OwExprValue |
evaluate(OwExprScope scope_p)
Evaluates this expression on the
OwExprScope (scope) provided as argument. |
OwExprExpression |
expression() |
OwExprValue |
getValue() |
OwExprFunctionSymbol |
regressToFunction()
Forces this primary prefix symbol to a function.
|
OwExprPropertySymbol |
regressToPorperty()
Forces this primary prefix symbol to a property.
|
OwExprSymbolScope |
regressToScope()
Forces this primary prefix to a scope symbol.
|
protected static OwExprConstantSymbol |
symbolInstance(String image_p,
OwExprSymbolTable symbolTable_p,
OwExprErrorTable errorTable_p)
Constant symbol single flyweight instance accessor.
|
String |
toString() |
OwExprExpressionType |
type()
Type check method.
|
errCount, evaluate, evaluate, getErrorTable, getSymbol, getSymbolTable, hasErrors, initType, symbolsVisibleInScopes
protected OwExprConstantSymbol m_symbol
public OwExprLiteral(String symbolName_p, OwExprValue value_p, OwExprType symbolType_p, OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
symbolName_p
- the name of the symbol this literal relays onvalue_p
- the value of this literalsymbolType_p
- the type of the symbolsymbolTable_p
- the global symbol tableerrorTable_p
- the global error tableprotected static final OwExprConstantSymbol symbolInstance(String image_p, OwExprSymbolTable symbolTable_p, OwExprErrorTable errorTable_p)
image_p
- the constant symbol imagesymbolTable_p
- the global symbol tableerrorTable_p
- the global error tablenull
if no such instance existspublic final OwExprExpressionType type() throws OwExprTypeMissmatchException
OwExprExpression
OwExprExpression.m_typeError
should
be set to true
type
in class OwExprExpression
OwExprTypeMissmatchException
public final OwExprValue getValue()
public final OwExprValue evaluate(OwExprScope scope_p) throws OwExprEvaluationException
OwExprExpression
OwExprScope
(scope) provided as argument.evaluate
in class OwExprExpression
scope_p
- OwExprEvaluationException
public final OwExprPropertySymbol regressToPorperty() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToPorperty
in interface OwExprPrimaryPrefix
OwExprTypeMissmatchException
- alwayspublic final OwExprFunctionSymbol regressToFunction() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToFunction
in interface OwExprPrimaryPrefix
OwExprTypeMissmatchException
- alwayspublic OwExprSymbolScope regressToScope() throws OwExprTypeMissmatchException
OwExprPrimaryPrefix
regressToScope
in interface OwExprPrimaryPrefix
OwExprSymbolScope
based on this literals symbolOwExprTypeMissmatchException
- if a type mismatch is detected during scope symbol creationpublic final OwExprExpression expression()
expression
in interface OwExprPrimaryPrefix
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.