Class ReturnTypeChecker
java.lang.Object
org.bonitasoft.engine.expression.impl.ReturnTypeChecker
- Author:
- Emmanuel Duchastenier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckReturnType(SExpression expression, Object result, Map<String, Object> context) Check if the declared return type is compatible with the real Expression evaluation return type.static booleanisConvertible(String targetType, String sourceType)
-
Constructor Details
-
ReturnTypeChecker
public ReturnTypeChecker()
-
-
Method Details
-
checkReturnType
public void checkReturnType(SExpression expression, Object result, Map<String, Object> context) throws SExpressionEvaluationExceptionCheck if the declared return type is compatible with the real Expression evaluation return type. If the result of the Expression evaluation is null, then this method returnstrue.- Parameters:
expression- the evaluated expressionresult- the expression result to check- Throws:
SExpressionEvaluationException- if the condition is not fulfilled, does nothing otherwise
-
isConvertible
-