/** * Unlike general impl in superclass, ctors are not intercepted but relayed * unless interceptConstruction is set. */ public Object invokeConstructor(final Object[] arguments) { if (interceptConstruction && null == interceptor) throw new RuntimeException("cannot invoke constructor without interceptor"); if (interceptConstruction) { GroovyObject newInstance = (GroovyObject) interceptor.beforeInvoke(null, getTheClass().getSimpleName(), arguments); newInstance.setMetaClass(this); return newInstance; } return adaptee.invokeConstructor(arguments); }
/** * Unlike general impl in superclass, ctors are not intercepted but relayed * unless interceptConstruction is set. */ public Object invokeConstructor(final Object[] arguments) { if (interceptConstruction && null == interceptor) throw new RuntimeException("cannot invoke constructor without interceptor"); if (interceptConstruction) { GroovyObject newInstance = (GroovyObject) interceptor.beforeInvoke(null, getTheClass().getSimpleName(), arguments); newInstance.setMetaClass(this); return newInstance; } return adaptee.invokeConstructor(arguments); }
/** * Unlike general impl in superclass, ctors are not intercepted but relayed * unless interceptConstruction is set. */ public Object invokeConstructor(final Object[] arguments) { if (interceptConstruction && null == interceptor) throw new RuntimeException("cannot invoke constructor without interceptor"); if (interceptConstruction) { GroovyObject newInstance = (GroovyObject) interceptor.beforeInvoke(null, getTheClass().getSimpleName(), arguments); newInstance.setMetaClass(this); return newInstance; } return adaptee.invokeConstructor(arguments); }