/** * Return a copy of the given FunctionDescriptor with the sepcified return type. * @param fd FunctionDescriptor to be copied. * @param returnType The return type to apply to the copied FunctionDescriptor. * @return The copy of FunctionDescriptor. */ public FunctionDescriptor copyFunctionChangeReturnType(FunctionDescriptor fd, Class<?> returnType) { if(fd != null) { FunctionDescriptor fdImpl = fd; FunctionDescriptor copy = fdImpl.clone(); copy.setReturnType(returnType); return copy; } return fd; }
/** * Return a copy of the given FunctionDescriptor with the sepcified return type. * @param fd FunctionDescriptor to be copied. * @param returnType The return type to apply to the copied FunctionDescriptor. * @return The copy of FunctionDescriptor. */ public FunctionDescriptor copyFunctionChangeReturnType(FunctionDescriptor fd, Class<?> returnType) { if(fd != null) { FunctionDescriptor fdImpl = fd; FunctionDescriptor copy = fdImpl.clone(); copy.setReturnType(returnType); return copy; } return fd; }
/** * Return a copy of the given FunctionDescriptor with the sepcified return type. * @param fd FunctionDescriptor to be copied. * @param returnType The return type to apply to the copied FunctionDescriptor. * @return The copy of FunctionDescriptor. */ public FunctionDescriptor copyFunctionChangeReturnType(FunctionDescriptor fd, Class<?> returnType) { if(fd != null) { FunctionDescriptor fdImpl = fd; FunctionDescriptor copy = fdImpl.clone(); copy.setReturnType(returnType); return copy; } return fd; }