public abstract class OwExprSymbol extends Object
Expression symbols are identifiers and constants alike (no separate constant
table is used).
Expression symbols should implement custom behavior according to their semantics:
functions , properties ,constants or runtime-anonymous symbol
Symbols are organized in a tree structure with multiple roots (the top level symbols).
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
Modifier and Type | Field and Description |
---|---|
protected OwExprSymbol |
m_parent
Parent symbol-
null if this is a top level symbol |
Constructor and Description |
---|
OwExprSymbol(OwExprSymbol parent_p,
String name_p,
OwExprExpressionType type_p) |
OwExprSymbol(OwExprSymbol parent_p,
String name_p,
OwExprType type_p)
Constructor
|
OwExprSymbol(OwExprSymbol parent_p,
String name_p,
OwExprType[] types_p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
OwExprSymbol |
addAnonymousSymbol(String name_p,
OwExprExpressionType type_p)
Adds a property sub-symbol to this symbol.
|
OwExprFunctionSymbol |
addFunctionSymbol(String name_p,
OwExprType[] types_p)
Adds a function sub-symbol to this symbol.
|
OwExprPropertySymbol |
addPropertySymbol(String name_p,
OwExprType[] types_p)
Adds a property sub-symbol to this symbol.
|
String |
getName() |
OwExprSymbol |
getSymbol(String name_p) |
String |
getSymbolFQN() |
OwExprSymbolTable |
getSymbolTable() |
OwExprExpressionType |
getType() |
String |
issueRuntimeSymbolName() |
abstract boolean |
matches(OwExprScope scope_p)
A match method used to check the validity of symbols for certain scopes.
Can be used to discover symbol and related expressions validity before evaluation. |
protected void |
toPrettyPrintString(StringBuffer sb_p,
StringBuffer tabs_p) |
String |
toString() |
protected OwExprSymbol m_parent
null
if this is a top level symbolpublic OwExprSymbol(OwExprSymbol parent_p, String name_p, OwExprType type_p)
parent_p
- parent symbolname_p
- symbol literal nametype_p
- symbol typepublic OwExprSymbol(OwExprSymbol parent_p, String name_p, OwExprType[] types_p)
parent_p
- parent symbolname_p
- symbol literal nametypes_p
- symbol typespublic OwExprSymbol(OwExprSymbol parent_p, String name_p, OwExprExpressionType type_p)
parent_p
- parent symbolname_p
- symbol literal nametype_p
- symbol expression typespublic final OwExprPropertySymbol addPropertySymbol(String name_p, OwExprType[] types_p) throws OwExprTypeMissmatchException
name_p
- the property symbol nametypes_p
- the property typesOwExprTypeMissmatchException
- if symbol is already added and the type of the new symbol doesn't match the existing symbolpublic final OwExprSymbol addAnonymousSymbol(String name_p, OwExprExpressionType type_p) throws OwExprTypeMissmatchException
name_p
- the property symbol nametype_p
- the property expression typeOwExprTypeMissmatchException
- if symbol is already added and the type of the new symbol doesn't match the existing symbolpublic final OwExprFunctionSymbol addFunctionSymbol(String name_p, OwExprType[] types_p) throws OwExprTypeMissmatchException
name_p
- the property symbol nametypes_p
- the property typesOwExprTypeMissmatchException
- if symbol is already added and the type of the new symbol doesn't match the existing symbolpublic final String issueRuntimeSymbolName()
public final String getName()
public final OwExprExpressionType getType()
public final OwExprSymbol getSymbol(String name_p)
name_p
- public final OwExprSymbolTable getSymbolTable()
protected void toPrettyPrintString(StringBuffer sb_p, StringBuffer tabs_p)
public String getSymbolFQN()
public abstract boolean matches(OwExprScope scope_p) throws OwExprEvaluationException
scope_p
- a scope to search the symbol ontrue
if this symbol is valid for the given scopeOwExprEvaluationException
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.