public static SourceUnit create ( String name , String source ) { CompilerConfiguration configuration = new CompilerConfiguration ( ) ; configuration . setTolerance ( 1 ) ; return new SourceUnit ( name , source , configuration , null , new ErrorCollector ( configuration ) ) ; }
A convenience routine to create a standalone SourceUnit on a String with defaults for almost everything that is configurable .