title: Create JCodeModel from existing source file(s)
body: <p>I want to create Java source code with code snippets that are possibly syntactically invalid. That's possible with <a href="http://codemodel.java.net/nonav/apidocs/com/sun/codemodel/JBlock.html#directStatement(java.lang.String)" rel="nofollow noreferrer">com.sun.codemodel.JBlock#directStatement() method</a>.</p>
  
  <p>My problem is, that I want to modify existing (syntactically valid) source files and I can't find a way to create a JCodeModel from a file (or a String or a Stream etc.).</p>
  
  <p>Is there a way to do this with JCodeModel?</p>
  
  <p>(I could use Eclipse JDT/AST framework instead, but it <a href="https://stackoverflow.com/questions/13801305/how-to-add-a-code-snippet-to-method-body-with-jdt-ast">apparently doesn't offer the option to add code snippets directly</a>...)</p>