Example #1
0
 protected boolean needsConversion(Operation conOp) {
   boolean result = true;
   Type fromType = conOp.getParameters().get(0).getType();
   Type toType = conOp.getReturnType();
   // don't convert matching types
   if (CommonUtilities.getEglNameForTypeCamelCase(toType)
       .equals(CommonUtilities.getEglNameForTypeCamelCase(fromType))) result = false;
   if (toType.getTypeSignature().equalsIgnoreCase("eglx.lang.ENumber")) result = true;
   else if (TypeUtils.isNumericType(fromType)
       && (TypeUtils.Type_DECIMAL.equals(fromType) || TypeUtils.Type_MONEY.equals(fromType)))
     result = conOp.isNarrowConversion();
   return result;
 }