Interface FunctionProvider
-
- All Known Implementing Classes:
CustomFunctionProvider
,CustomFunctionProvider
,DefaultFunctionProvider
,XMLFunctionProvider
public interface FunctionProvider
This class represents the interface for function providers for Expression Engine. Object of this type will be resolving the functions for any expression. It can support more than one functions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Type
getFunctionType(String functionName, Type[] parameterTypes)
Gets the return type of the function.ValueObject
getFunctionValue(String functionName, ValueObject[] parameters)
Gets the return value of function.void
initialize(ExpressionContext expressionContext)
It initialize the Function provider with expression context and also gives a chance to pre-initialize any internal states for operationsboolean
supportsFunction(String functionName, Type[] parameterTypes)
Checks whether the this function provider supports any function or not.
-
-
-
Method Detail
-
initialize
void initialize(ExpressionContext expressionContext) throws ExpressionEngineException
It initialize the Function provider with expression context and also gives a chance to pre-initialize any internal states for operations- Parameters:
expressionContext
- Context of current expression evaluation process- Throws:
ExpressionEngineException
-
getFunctionType
Type getFunctionType(String functionName, Type[] parameterTypes) throws ExpressionEngineException
Gets the return type of the function.- Parameters:
functionName
- the name of the function.parameterTypes
- the types of the parameters- Returns:
- the return type of the function
- Throws:
ExpressionEngineException
- if anything goes wrong
-
getFunctionValue
ValueObject getFunctionValue(String functionName, ValueObject[] parameters) throws ExpressionEngineException
Gets the return value of function.- Parameters:
functionName
- the name of the functionparameters
- the parameters values of the function- Returns:
- the return value of the function
- Throws:
ExpressionEngineException
- if anything goes wrong
-
supportsFunction
boolean supportsFunction(String functionName, Type[] parameterTypes) throws ExpressionEngineException
Checks whether the this function provider supports any function or not.- Parameters:
functionName
- the name of the functionparameterTypes
- the type of parameters for the function- Returns:
true
if function provider supports the functionfalse
otherwise- Throws:
ExpressionEngineException
- if anything goes wrong
-
-