我有
SearchResponse response = gson.fromJson(reader,SearchResponse.class); List<Result> results = response.results;
但是,我需要提供一个使用 classLoader 创建的类
File path = new File (classFilesPath + File.separator + getFileNameName() );
ClassLoader LOADER = ClassLoader.getSystemClassLoader();
URLClassLoader loader = new URLClassLoader(new URL[] { path.toURI().toURL() }, LOADER);
Class loadedClass = loader.loadClass(fullyQualifiedClassName);
如何在 gson.fromJson 中使用 loadedClass ?