| Modifier and Type | Method and Description |
|---|---|
Type |
CustomFunctionProvider.getFunctionType(String functionName,
Type[] parameterTypes) |
ValueObject |
CustomFunctionProvider.getFunctionValue(String functionName,
ValueObject[] parameters)
Gets the return value of function.
|
boolean |
CustomFunctionProvider.supportsFunction(String functionName,
Type[] parameterTypes) |
| Constructor and Description |
|---|
CustomExpressionContext(EList<AbstractFixedFactorValue<?>> eList,
Iterable<ConsumptionFactor> consumptionFactors)
Initializes a new instance of the
CustomExpressionContext class. |
| Modifier and Type | Method and Description |
|---|---|
void |
ExpressionContext.addFunctionProvider(FunctionProvider functionProvider)
Adds function provider to the expression context.
|
Expression |
Compiler.compile(String expression,
ExpressionContext expressionContext,
boolean validate)
Builds a tree of Expression objects representing the expression.
|
static Expression |
ExpressionEngine.compileExpression(String expression,
ExpressionContext expressionContext,
boolean validate)
Compiles the expression string and prepares the expression tree with
relevant Expression's objects.
|
static Object |
ExpressionEngine.evaluate(String expression,
ExpressionContext expressionContext)
Evaluates the expression and returns the result
|
static Set<String> |
ExpressionEngine.getVariableNames(String expression)
Retrieves a set of variable names contained within the specified expression string
|
static void |
ExpressionEngine.main(String[] args) |
static void |
Parser.main(String[] args) |
List<ExpressionToken> |
Parser.parse(String expression)
It parses the given expression string into ExpressionToken objects and
returns the list of ExpressionTokens.
|
| Constructor and Description |
|---|
ExpressionContext()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Expression |
ExpressionFactory.createExpression(String expressionToken,
String type)
Creates the expression object for given expression token and expression
type
|
Type |
BinaryOperatorExpression.getReturnType() |
Type |
BooleanExpression.getReturnType()
Returns the boolean type.
|
Type |
DecimalExpression.getReturnType()
Returns the double type.
|
Type |
Expression.getReturnType()
Gets the return type of the expression.
|
Type |
IdentifierExpression.getReturnType() |
Type |
NullExpression.getReturnType()
Returns the long type.
|
Type |
NumericExpression.getReturnType()
Returns the long type.
|
Type |
StringExpression.getReturnType()
Returns the string type.
|
Type |
UnaryOperatorExpression.getReturnType() |
ValueObject |
BinaryOperatorExpression.getValue() |
ValueObject |
BooleanExpression.getValue()
Gets the value object for boolean value.
|
ValueObject |
DecimalExpression.getValue()
Gets the value object for decimal value.
|
ValueObject |
Expression.getValue()
Executes and returns the value of this expression.
|
ValueObject |
IdentifierExpression.getValue() |
ValueObject |
NullExpression.getValue()
Gets the value object for numeric value.
|
ValueObject |
NumericExpression.getValue()
Gets the value object for numeric value.
|
ValueObject |
StringExpression.getValue()
Gets the value object for string value.
|
void |
BinaryOperatorExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the child expressions.
|
void |
BooleanExpression.initialize(ExpressionContext expressionContext,
Object objectInfo,
boolean validate)
Initializes the boolean value object.
|
void |
DecimalExpression.initialize(ExpressionContext expressionContext,
Object objectInfo,
boolean validate)
Initializes the double value object.
|
void |
Expression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
This is used to initialize the expression.
|
void |
IdentifierExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the identifier name
|
void |
NullExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the numeric value object.
|
void |
NumericExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the numeric value object.
|
void |
StringExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the string value object.
|
void |
UnaryOperatorExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate)
Initializes the operand expression.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
ArrayIndexExpression.getReturnType() |
Type |
DivideExpression.getReturnType() |
Type |
ParanthesisExpression.getReturnType()
Retrusn the type of child expression
|
ValueObject |
AddExpression.getValue()
Gets the addition of child operands
|
ValueObject |
ArrayIndexExpression.getValue()
Gets the value from the array.
|
ValueObject |
DivideExpression.getValue()
Performs the divide operation.
|
ValueObject |
MinusExpression.getValue()
Returns the negative value.
|
ValueObject |
MultiplyExpression.getValue()
Performs the multiplications.
|
ValueObject |
ParanthesisExpression.getValue()
Returns value of child expression.
|
ValueObject |
PlusExpression.getValue()
Returns the positive value as it is.
|
ValueObject |
RemainderExpression.getValue()
Performs the modulus.
|
ValueObject |
SubtractExpression.getValue()
Performs the substraction.
|
| Modifier and Type | Method and Description |
|---|---|
ValueObject |
BWAndExpression.getValue() |
ValueObject |
BWComplementExpression.getValue() |
ValueObject |
BWOrExpression.getValue() |
ValueObject |
BWSignedLeftShiftExpression.getValue() |
ValueObject |
BWSignedRightShiftExpression.getValue() |
ValueObject |
BWUnsignedRightShiftExpression.getValue() |
ValueObject |
BWXorExpression.getValue() |
| Modifier and Type | Method and Description |
|---|---|
Type |
ConditionTernaryExpression.getReturnType() |
Type |
ResultTernaryExpression.getReturnType() |
ValueObject |
AndExpression.getValue()
Gets the value of this operator.
|
ValueObject |
ConditionTernaryExpression.getValue() |
ValueObject |
NotExpression.getValue()
Returns the negative value.
|
ValueObject |
OrExpression.getValue()
Performs the or operation.
|
ValueObject |
ResultTernaryExpression.getValue() |
| Modifier and Type | Method and Description |
|---|---|
Type |
FunctionExpression.getReturnType() |
Type |
PropertyExpression.getReturnType() |
Type |
UnaryPropertyExpression.getReturnType() |
ValueObject |
ArgumentExpression.getValue()
This is not supported for this expression.
|
ValueObject |
FunctionExpression.getValue() |
ValueObject |
PropertyExpression.getValue() |
ValueObject |
UnaryPropertyExpression.getValue() |
void |
FunctionExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate) |
void |
UnaryPropertyExpression.initialize(ExpressionContext expressionContext,
Object parameters,
boolean validate) |
void |
PropertyExpression.setValue(Object value)
Sets the value
|
void |
UnaryPropertyExpression.setValue(Object value)
Sets the value
|
| Modifier and Type | Method and Description |
|---|---|
ValueObject |
EQExpression.getValue()
Performs the equlity operation.
|
ValueObject |
GTEExpression.getValue()
Performs the greater than equal operations.
|
ValueObject |
GTExpression.getValue()
Returns the value of result of grater than operation
|
ValueObject |
LTEExpression.getValue()
Returns the value of less than equal to operation.
|
ValueObject |
LTExpression.getValue()
Returns the value of less than operation.
|
ValueObject |
NEExpression.getValue()
Performs the not equal operation
|
| Modifier and Type | Method and Description |
|---|---|
ValueObject |
ContainsExpression.getValue() |
ValueObject |
EndsWithExpression.getValue() |
ValueObject |
StartsWithExpression.getValue() |
| Modifier and Type | Method and Description |
|---|---|
Type |
DefaultFunctionProvider.getFunctionType(String functionName,
Type[] parameterTypes) |
Type |
FunctionProvider.getFunctionType(String functionName,
Type[] parameterTypes)
Gets the return type of the function.
|
Type |
XMLFunctionProvider.getFunctionType(String functionName,
Type[] parameterTypes) |
ValueObject |
DefaultFunctionProvider.getFunctionValue(String functionName,
ValueObject[] parameters) |
ValueObject |
FunctionProvider.getFunctionValue(String functionName,
ValueObject[] parameters)
Gets the return value of function.
|
ValueObject |
XMLFunctionProvider.getFunctionValue(String functionName,
ValueObject[] parameters) |
Type |
DefaultVariableProvider.getVariableType(String variableName) |
Type |
VariableProvider.getVariableType(String variableName)
Gets the type of variable.
|
ValueObject |
DefaultVariableProvider.getVariableValue(String variableName) |
ValueObject |
VariableProvider.getVariableValue(String variableName)
Gets the value of variable.
|
void |
DefaultFunctionProvider.initialize(ExpressionContext expressionContext)
Initializes the method map.
|
void |
DefaultVariableProvider.initialize(ExpressionContext expressionContext)
It initialize the Function provider with expression context and also
gives a chance to pre-initialize any internal states for operations
|
void |
FunctionProvider.initialize(ExpressionContext expressionContext)
It initialize the Function provider with expression context and also
gives a chance to pre-initialize any internal states for operations
|
void |
VariableProvider.initialize(ExpressionContext expressionContext)
It initialize the Function provider with expression context and also
gives a chance to pre-initialize any internal states for operations
|
void |
XMLFunctionProvider.initialize(ExpressionContext expressionContext) |
boolean |
DefaultFunctionProvider.supportsFunction(String functionName,
Type[] parameterTypes) |
boolean |
FunctionProvider.supportsFunction(String functionName,
Type[] parameterTypes)
Checks whether the this function provider supports any function or not.
|
boolean |
XMLFunctionProvider.supportsFunction(String functionName,
Type[] parameterTypes) |
boolean |
DefaultVariableProvider.supportsVariable(String variableName) |
boolean |
VariableProvider.supportsVariable(String variableName)
Checks whether the specified variable is supported by this variable
provider or not.
|
| Constructor and Description |
|---|
DefaultFunctionProvider(Class functionProviderClass)
Constructor.
|
| Constructor and Description |
|---|
CustomFunctionProvider(Class<? extends CustomFunctionSourceProvider> sourceProvider)
Dynamically generates a class at run time based on the source code of methods
provided by the sourceProvider, and makes the methods available to the
expression engine as functions.
|
| Modifier and Type | Method and Description |
|---|---|
static org.apache.xpath.objects.XObject |
XPathUtils.evaluateExpression(Document document,
String xPathExpression) |
static ValueObject |
XPathUtils.evaluateExpressionToValueObject(Document document,
String xPathExpression) |
static Document |
XMLUtils.parseXML(File xmlFile,
String xsdPath) |
static Document |
XMLUtils.parseXML(InputStream is,
String xsdPath) |
static Document |
XMLUtils.parseXML(URL xmlDocumentURL,
String xsdPath) |