Package org.drools.mvel.asm
Class TypeConversionHelper
java.lang.Object
org.drools.mvel.asm.TypeConversionHelper
Utility class for handling type conversions in ASM bytecode generation.
Consolidates logic for converting between primitive types used by
getDecimalValue() and getWholeNumberValue() methods.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the type of conversion needed for primitive types -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondetermineConversionType(String readMethod, String declarationType) Determines the type of conversion needed based on read method and declaration typestatic voidemitTypeConversion(org.mvel2.asm.MethodVisitor mv, TypeConversionHelper.ConversionType conversionType) Emits the appropriate type conversion bytecode instructionsstatic StringgetActualReturnType(String readMethod, boolean isObject, String typeDescr) Returns the actual return type descriptor for the given read method
-
Field Details
-
GET_DECIMAL_VALUE
- See Also:
-
GET_WHOLE_NUMBER_VALUE
- See Also:
-
GET_VALUE
- See Also:
-
-
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
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
-