public void callDestroy() { Closure<?> destroy = getDestroyClosure(); if (destroy != null) { Environment.executeForCurrentEnvironment(destroy); } } }
public void callInit(ServletContext servletContext) { Closure<?> init = getInitClosure(); if (init != null) { Class[] parameterTypes = init.getParameterTypes(); if(parameterTypes != null) { init = init.curry(new Object[]{servletContext}); } Environment.executeForCurrentEnvironment(init); } }