org.codehaus.groovy.grails.commons.metaclass
Interface ConstructorInterceptor

All Superinterfaces:
Interceptor
All Known Implementing Classes:
AbstractDynamicMethodsInterceptor, GroovyDynamicMethodsInterceptor

public interface ConstructorInterceptor
extends Interceptor

Extends interceptor interface to allow interception of constructors

Since:
0.2
Version:
$Revision: $ First Created: 02-Jun-2006 Last Updated: $Date: $
Author:
Graeme Rocher

Method Summary
 java.lang.Object afterConstructor(java.lang.Object[] args, java.lang.Object instantiatedInstance)
          Executed after the constructor passing the args and the instantiated instance
 java.lang.Object beforeConstructor(java.lang.Object[] args, InvocationCallback callback)
          Executed before the real constructor.
 
Methods inherited from interface org.codehaus.groovy.grails.commons.metaclass.Interceptor
afterInvoke, beforeInvoke
 

Method Detail

beforeConstructor

java.lang.Object beforeConstructor(java.lang.Object[] args,
                                   InvocationCallback callback)
Executed before the real constructor. The callback object should be marked if invokation of the real constructor should be performed

Parameters:
args - The constructor args
callback - The callback object
Returns:
The instantiated object or null

afterConstructor

java.lang.Object afterConstructor(java.lang.Object[] args,
                                  java.lang.Object instantiatedInstance)
Executed after the constructor passing the args and the instantiated instance

Parameters:
args - The arguments
instantiatedInstance - The instantiated instance
Returns:
The instantiated or replaced instance


Copyright (c) 2005-2006 The Grails project