package gw.rating.flow.domain uses com.guidewire.pl.system.expression.GosuExpression uses gw.lang.reflect.IType class NumericConstantOperand extends CalcStepValueOperand { static var iSymbolTable = GosuShop.createSymbolTable() var _constantValue : String as Value construct(constValue : String, opType : CalcStepOperatorType, numLeft : int, numRight : int, aHighlightElement : RateRoutineHighlightElement) { super(opType, numLeft, numRight) _constantValue = constValue _highlightElement = aHighlightElement } override protected function generateValue(context: GenerationContext) { var dataType = getDataType(context) if (dataType == java.lang.Integer or dataType == int or Value.endsWith("bd")) { context.append(Value) } else { // explicitly generate "bd" so that double won't be inferred. context.append(Value.trim() + "bd") } } override function getDataType(context: GenerationContext) : IType { // this is already known, and should be passed in return new GosuExpression(Value).getType(iSymbolTable) } override property get OperandType() : CalcStepOperandType { return CalcStepOperandType.TC_CONSTANT } }