MCPcopy Create free account
hub / github.com/apache/groovy / create

Method create

src/main/java/org/codehaus/groovy/control/SourceUnit.java:180–185  ·  view source on GitHub ↗

A convenience routine to create a standalone SourceUnit on a String with defaults for almost everything that is configurable.

(String name, String source)

Source from the content-addressed store, hash-verified

178 * with defaults for almost everything that is configurable.
179 */
180 public static SourceUnit create(String name, String source) {
181 CompilerConfiguration configuration = new CompilerConfiguration();
182 configuration.setTolerance(1);
183
184 return new SourceUnit(name, source, configuration, null, new ErrorCollector(configuration));
185 }
186
187 /**
188 * A convenience routine to create a standalone SourceUnit on a String

Calls 1

setToleranceMethod · 0.95