Code example for JavaFileObject

Methods: openOutputStream

0
				LOGGER.info("Generating class with no originating element: {}", qualifiedClassName);
			} 
 
			sourceFile = filer.createSourceFile(qualifiedClassName, classOriginatingElements);
 
			return sourceFile.openOutputStream();
		} catch (FilerException e) {
			LOGGER.error("Could not generate source file for {}", qualifiedClassName, e.getMessage());
			/* 
			 * This exception is expected, when some files are created twice. We 
			 * cannot delete existing files, unless using a dirty hack. Files a 
			 * created twice when the same file is created from different 
			 * annotation rounds. Happens when renaming classes, and for 
			 * Background executor. It also probably means I didn't fully 
			 * understand how annotation processing works. If anyone can point 
			 * me out... 
			 */ 
			return VOID_OUTPUT_STREAM;
		} 
	}