@since 4.0.3
(@DelegatesTo(type = CONFIGURATION_CUSTOMIZER) final Closure<Void> spec)
| 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 |
nothing calls this directly
no test coverage detected