/** * Find conversion function and set return type to proper type. * @param sourceType The source type class * @param targetType The target type class * @return A CONVERT function descriptor or null if not possible */ public FunctionDescriptor findTypedConversionFunction(Class<?> sourceType, Class<?> targetType) { //TODO: should array to string be prohibited? FunctionDescriptor fd = findFunction(CONVERT, new Class[] {sourceType, DataTypeManager.DefaultDataClasses.STRING}); if (fd != null) { return copyFunctionChangeReturnType(fd, targetType); } return null; }
/** * Find conversion function and set return type to proper type. * @param sourceType The source type class * @param targetType The target type class * @return A CONVERT function descriptor or null if not possible */ public FunctionDescriptor findTypedConversionFunction(Class<?> sourceType, Class<?> targetType) { //TODO: should array to string be prohibited? FunctionDescriptor fd = findFunction(CONVERT, new Class[] {sourceType, DataTypeManager.DefaultDataClasses.STRING}); if (fd != null) { return copyFunctionChangeReturnType(fd, targetType); } return null; }
/** * Find conversion function and set return type to proper type. * @param sourceType The source type class * @param targetType The target type class * @return A CONVERT function descriptor or null if not possible */ public FunctionDescriptor findTypedConversionFunction(Class<?> sourceType, Class<?> targetType) { //TODO: should array to string be prohibited? FunctionDescriptor fd = findFunction(CONVERT, new Class[] {sourceType, DataTypeManager.DefaultDataClasses.STRING}); if (fd != null) { return copyFunctionChangeReturnType(fd, targetType); } return null; }
fd = library.copyFunctionChangeReturnType(fd, lookup.getReturnElement().getType()); } else if (fd.isSystemFunction(FunctionLibrary.ARRAY_GET)) { if (args[0].getType() != null && args[0].getType().isArray()) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType().getComponentType()); } else { if (function.getType() != null) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType());
fd = library.copyFunctionChangeReturnType(fd, lookup.getReturnElement().getType()); } else if (fd.isSystemFunction(FunctionLibrary.ARRAY_GET)) { if (args[0].getType() != null && args[0].getType().isArray()) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType().getComponentType()); } else { if (function.getType() != null) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType());
fd = library.copyFunctionChangeReturnType(fd, lookup.getReturnElement().getType()); } else if (fd.isSystemFunction(FunctionLibrary.ARRAY_GET)) { if (args[0].getType() != null && args[0].getType().isArray()) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType().getComponentType()); } else { if (function.getType() != null) { fd = library.copyFunctionChangeReturnType(fd, args[0].getType());