/** * Generate source. * * @param file the file * @param sourceOutputPath the source output path * @param cds the cds * @param compiledClass the compiled class * @throws IOException Signals that an I/O exception has occurred. */ public static void generateSource(File file, File sourceOutputPath, List<CodeDependent> cds, Set<String> compiledClass) throws IOException { doCreatePro(file, true, false, null, true, sourceOutputPath, cds, compiledClass, false); }
/** * Creates the. * * @param file the file * @param debug the debug * @param path the path * @param cds the cds * @param compiledClass the compiled class * @param isUniName the is uni name * @return the map * @throws IOException Signals that an I/O exception has occurred. */ public static Map<String, IDLProxyObject> create(File file, boolean debug, File path, List<CodeDependent> cds, Set<String> compiledClass, boolean isUniName) throws IOException { return doCreatePro(file, true, debug, path, false, null, cds, compiledClass, isUniName); }
/** * Creates the. * * @param file the file * @param debug the debug * @param path the path * @param cds the cds * @param compiledClass the compiled class * @return the map * @throws IOException Signals that an I/O exception has occurred. */ public static Map<String, IDLProxyObject> create(File file, boolean debug, File path, List<CodeDependent> cds, Set<String> compiledClass) throws IOException { return doCreatePro(file, true, debug, path, false, null, cds, compiledClass, true); }
/** * Do create. * * @param protoFile the proto file * @param multi the multi * @param debug the debug * @param path the path * @param generateSouceOnly the generate souce only * @param sourceOutputDir the source output dir * @param cds the cds * @param uniMappedName the uni mapped name * @param isUniName the is uni name * @return the map * @throws IOException Signals that an I/O exception has occurred. */ private static Map<String, IDLProxyObject> doCreate(ProtoFile protoFile, boolean multi, boolean debug, File path, boolean generateSouceOnly, File sourceOutputDir, List<CodeDependent> cds, Map<String, String> uniMappedName, boolean isUniName) throws IOException { return doCreatePro(Arrays.asList(protoFile), multi, debug, path, generateSouceOnly, sourceOutputDir, cds, new HashSet<String>(), uniMappedName, isUniName); }
/** * Do create pro. * * @param file the file * @param multi the multi * @param debug the debug * @param path the path * @param generateSouceOnly the generate souce only * @param sourceOutputDir the source output dir * @param cds the cds * @param compiledClass the compiled class * @param isUniName the is uni name * @return the map * @throws IOException Signals that an I/O exception has occurred. */ private static Map<String, IDLProxyObject> doCreatePro(File file, boolean multi, boolean debug, File path, boolean generateSouceOnly, File sourceOutputDir, List<CodeDependent> cds, Set<String> compiledClass, boolean isUniName) throws IOException { checkDirectory(generateSouceOnly, sourceOutputDir); // to find all PROTO file if using import command List<ProtoFile> protoFiles = findRelateProtoFiles(file, new HashSet<String>()); Collections.reverse(protoFiles); return doCreatePro(protoFiles, multi, debug, path, generateSouceOnly, sourceOutputDir, cds, compiledClass, new HashMap<String, String>(), isUniName); }