ElegantJCharts Java API Specification v2.0

com.elegantj.data.comp.computedfield
Class ExpressionExecutor

java.lang.Object
  |
  +--com.elegantj.data.comp.computedfield.ExpressionExecutor

public class ExpressionExecutor
extends java.lang.Object

The ExpressionExecutor is used to build and to execute the expression. It can execute the arithmetic expression, it can also execute the database related expression if the MethodsClass is provided.


Constructor Summary
ExpressionExecutor()
           
ExpressionExecutor(MethodsClass methodsClass)
          Creates an ExpressionExecutor with specified MethodsClass.
 
Method Summary
 java.lang.Object executeExp()
          Executes the expression.
 java.lang.Object executeExp(java.lang.String expression)
          Executes the given expression.
 java.lang.String getExpression()
          Returns the expression to be executed
 com.elegantj.data.parser.FunctionTable getFunctionTable()
          Returns the function table
 com.elegantj.data.parser.Parser getParser()
          Returns the expression parser
 java.lang.String[] getPredefinedTokens()
          Returns the predefined tokens, which are valid to use in the expression
 com.elegantj.data.parser.Scanner getScanner()
          Returns the expression scanner
 com.elegantj.data.parser.SymbolTable getSymbolTable()
          Returns the symbol table
 void setColumns(java.util.Vector columns, java.util.Vector values)
          Sets the column names and related values
 void setExpression(java.lang.String expression)
          Sets the expression to be executed
 boolean verifyExp()
          Checks the verification of the expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionExecutor

public ExpressionExecutor()

ExpressionExecutor

public ExpressionExecutor(MethodsClass methodsClass)
Creates an ExpressionExecutor with specified MethodsClass.

Parameters:
methodsClass - the MethodsClass which contains the methods to be invoked by executor to execute the expression, default null
Method Detail

setExpression

public void setExpression(java.lang.String expression)
Sets the expression to be executed

Parameters:
expression - the expression string

setColumns

public void setColumns(java.util.Vector columns,
                       java.util.Vector values)
Sets the column names and related values

Parameters:
columns - the vector of the column names
values - the vector of the column values

verifyExp

public boolean verifyExp()
Checks the verification of the expression.

Returns:
true if the expression is valid, false otherwise.

executeExp

public java.lang.Object executeExp()
Executes the expression.

Returns:
the result of the execution

executeExp

public java.lang.Object executeExp(java.lang.String expression)
Executes the given expression.

Parameters:
expression - the expression to be executed
Returns:
the result of the execution

getParser

public com.elegantj.data.parser.Parser getParser()
Returns the expression parser

Returns:
the parser

getScanner

public com.elegantj.data.parser.Scanner getScanner()
Returns the expression scanner

Returns:
the scanner

getSymbolTable

public com.elegantj.data.parser.SymbolTable getSymbolTable()
Returns the symbol table

Returns:
the symbol table

getFunctionTable

public com.elegantj.data.parser.FunctionTable getFunctionTable()
Returns the function table

Returns:
the function table

getExpression

public java.lang.String getExpression()
Returns the expression to be executed

Returns:
the expression string

getPredefinedTokens

public java.lang.String[] getPredefinedTokens()
Returns the predefined tokens, which are valid to use in the expression

Returns:
the array of the valid tokens string

ElegantJCharts Java API Specification v2.0

For any feedback, suggestion, or query, please revert back to support@elegantcharts.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjcharts.com
All Rights Reserved.