private static void generateJavaFile(File genFolder, String packageName, String destClassName, String content) {
		File folder = new File(genFolder, packageName.replaceAll("\\.", "/"));
		if (!folder.exists()) {
			folder.mkdirs();
		}
		
		File javaFile = new File(folder, destClassName + ".java");
		
		if (javaFile.exists()) {
			try {
				StringBuilder customCode = new StringBuilder();
				BufferedReader br = new BufferedReader(new FileReader(javaFile));
				
				String marker = "/* CUSTOM CODE *";
				boolean markerFound = false;
				int index = 0;
				String line = null;
				while ((line = br.readLine()) != null) {
					if (markerFound) {
						customCode.append(line).append('\n');
					} else {
						if ((index = line.indexOf(marker)) > -1) {
							markerFound = true;
							customCode.append(line.substring(index)).append('\n');
						}
					}
				}
				
				if (markerFound) {
					index = content.indexOf(marker);
					if (index > -1) {
						content = content.substring(0, index) + customCode.toString();
					}
				}
				
				br.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
			
		}
		
		try {
			FileWriter fw = new FileWriter(javaFile);
			fw.write(content);
			fw.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}