com.wewebu.expression.language
Class OwExprFunctionSymbol
java.lang.Object
com.wewebu.expression.language.OwExprSymbol
com.wewebu.expression.language.OwExprFunctionSymbol
public class OwExprFunctionSymbol
- extends OwExprSymbol
Function symbols represent symbol table recordings of function pointing symbols in the
expressions.
fun(1,2,3) |
Creates function symbol for the fun identifier |
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
OwExprFunctionSymbol
public OwExprFunctionSymbol(OwExprSymbol parent_p,
String name_p,
OwExprType[] types_p)
setArgumentTypes
public final void setArgumentTypes(OwExprExpressionType[] argumentTypes_p)
- Parameters:
argumentTypes_p
- the argument expressions types that this function should use
to discover the function binding in the scope at evaluation time
getValue
public final OwExprValue getValue(OwExprScope scope_p,
OwExprValue[] arguments_p)
throws OwExprEvaluationException
- Returns a value produced by the invocation of the function represented by this symbol.
- Parameters:
scope_p
- the top level scope on which this function is evaluated.arguments_p
- the value of the arguments used to invoke the function
- Returns:
- the value resulted from the functions invocation
- Throws:
OwExprEvaluationException
toPrettyPrintString
protected void toPrettyPrintString(StringBuffer sb_p,
StringBuffer tabs_p)
- Pretty-print utility
- Overrides:
toPrettyPrintString
in class OwExprSymbol
- Parameters:
sb_p
- tabs_p
-
setSymbolScope
public final void setSymbolScope(OwExprSymbolScope symbolScope_p)
- Parameters:
symbolScope_p
- the functions parent scope setter
matches
public boolean matches(OwExprScope scope_p)
- Description copied from class:
OwExprSymbol
- 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.
- Specified by:
matches
in class OwExprSymbol
- Parameters:
scope_p
- a scope to search the symbol on
- Returns:
true
if this symbol is valid for the given scope
Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.