Class ReturnTypeChecker

java.lang.Object
org.bonitasoft.engine.expression.impl.ReturnTypeChecker

public class ReturnTypeChecker extends Object
Author:
Emmanuel Duchastenier
  • Constructor Details

    • ReturnTypeChecker

      public ReturnTypeChecker()
  • Method Details

    • checkReturnType

      public void checkReturnType(SExpression expression, Object result, Map<String,Object> context) throws SExpressionEvaluationException
      Check 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 returns true.
      Parameters:
      expression - the evaluated expression
      result - the expression result to check
      Throws:
      SExpressionEvaluationException - if the condition is not fulfilled, does nothing otherwise
    • isConvertible

      public static boolean isConvertible(String targetType, String sourceType)