Class TypeConversionHelper

java.lang.Object
org.drools.mvel.asm.TypeConversionHelper

public class TypeConversionHelper extends Object
Utility class for handling type conversions in ASM bytecode generation. Consolidates logic for converting between primitive types used by getDecimalValue() and getWholeNumberValue() methods.
  • Field Details

  • Constructor Details

    • TypeConversionHelper

      public TypeConversionHelper()
  • Method Details

    • determineConversionType

      public static TypeConversionHelper.ConversionType determineConversionType(String readMethod, String declarationType)
      Determines the type of conversion needed based on read method and declaration type
    • getActualReturnType

      public static String getActualReturnType(String readMethod, boolean isObject, String typeDescr)
      Returns the actual return type descriptor for the given read method
    • emitTypeConversion

      public static void emitTypeConversion(org.mvel2.asm.MethodVisitor mv, TypeConversionHelper.ConversionType conversionType)
      Emits the appropriate type conversion bytecode instructions