public class ExpressionFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BINARY
This is the binary expression type.
|
static String |
FUNCTION
This is the function expression type.
|
static String |
OPERAND
This is the operand expression type.
|
static String |
TRUE
This is the true constant for absolute.
|
static String |
UNARY
This is the unary expression type
|
| Modifier and Type | Method and Description |
|---|---|
void |
addFunction(String functionName)
Deprecated.
No need to add function in ExpressionFactory, as it will always return FunctionExpression for all
functions
|
Expression |
createExpression(String expressionToken,
String type)
Creates the expression object for given expression token and expression
type
|
static ExpressionFactory |
getInstance()
Gets the shared instance of Expression Factory
|
public static final String UNARY
public static final String BINARY
public static final String FUNCTION
public static final String OPERAND
public static final String TRUE
public static ExpressionFactory getInstance()
public void addFunction(String functionName)
name - name of the function to addpublic Expression createExpression(String expressionToken, String type) throws ExpressionEngineException
expressionToken - the token of expressiontype - the type of expression i.e. operand, operator etcExpressionEngineException - if anything goes wrong