MCPcopy Index your code
hub / github.com/apache/groovy / withConfig

Method withConfig

src/main/java/groovy/lang/GroovyShell.java:73–84  ·  view source on GitHub ↗

@since 4.0.3

(@DelegatesTo(type = CONFIGURATION_CUSTOMIZER) final Closure<Void> spec)

Source from the content-addressed store, hash-verified

71 * @since 4.0.3
72 */
73 public static GroovyShell withConfig(@DelegatesTo(type = CONFIGURATION_CUSTOMIZER) final Closure<Void> spec) {
74 //TODO return new GroovyShell(CompilerCustomizationBuilder.withConfig(new CompilerConfiguration(), spec));
75 CompilerConfiguration config = new CompilerConfiguration();
76 try {
77 Class.forName(CONFIGURATION_CUSTOMIZER)
78 .getDeclaredMethod("withConfig", CompilerConfiguration.class, Closure.class)
79 .invoke(null, config, spec);
80 } catch (ReflectiveOperationException e) {
81 throw new GroovyRuntimeException(e);
82 }
83 return new GroovyShell(config);
84 }
85
86 //--------------------------------------------------------------------------
87

Callers

nothing calls this directly

Calls 3

forNameMethod · 0.80
invokeMethod · 0.45
getDeclaredMethodMethod · 0.45

Tested by

no test coverage detected