public class DefaultFunctionProvider extends Object implements FunctionProvider
| Constructor and Description |
|---|
DefaultFunctionProvider(Class functionProviderClass)
Constructor.
|
| Modifier and Type | Method and 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)
Initializes the method map.
|
boolean |
supportsFunction(String functionName,
Type[] parameterTypes)
Checks whether the this function provider supports any function or not.
|
public DefaultFunctionProvider(Class functionProviderClass) throws ExpressionEngineException
functionProviderClass - ExpressionEngineExceptionpublic Type getFunctionType(String functionName, Type[] parameterTypes) throws ExpressionEngineException
FunctionProvidergetFunctionType in interface FunctionProviderfunctionName - the name of the function.parameterTypes - the types of the parametersExpressionEngineException - if anything goes wrongorg.vedantatree.expressionoasis.extensions.FunctionProvider#getFunctionType(java.lang.String,
org.vedantatree.types.Type[])public ValueObject getFunctionValue(String functionName, ValueObject[] parameters) throws ExpressionEngineException
FunctionProvidergetFunctionValue in interface FunctionProviderfunctionName - the name of the functionparameters - the parameters values of the functionExpressionEngineException - if anything goes wrongorg.vedantatree.expressionoasis.extensions.FunctionProvider#getFunctionValue(java.lang.String,
org.vedantatree.types.ValueObject[])public boolean supportsFunction(String functionName, Type[] parameterTypes) throws ExpressionEngineException
FunctionProvidersupportsFunction in interface FunctionProviderfunctionName - the name of the functionparameterTypes - the type of parameters for the functiontrue if function provider supports the function false otherwiseExpressionEngineException - if anything goes wrongorg.vedantatree.expressionoasis.extensions.FunctionProvider#supportsFunction(java.lang.String,
org.vedantatree.types.Type[])public void initialize(ExpressionContext expressionContext) throws ExpressionEngineException
initialize in interface FunctionProviderexpressionContext - Context of current expression evaluation processExpressionEngineException