Groovy Documentation

org.codehaus.groovy.grails.commons.metaclass
[Java] Interface ConstructorInterceptor

org.codehaus.groovy.grails.commons.metaclass.Interceptor
  org.codehaus.groovy.grails.commons.metaclass.ConstructorInterceptor
All Superinterfaces:
Interceptor

public interface ConstructorInterceptor
extends Interceptor

Extends interceptor interface to allow interception of constructors

Authors:
Graeme Rocher
Since:
0.2


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 Interceptor
afterInvoke, beforeInvoke
 

Method Detail

afterConstructor

public 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


beforeConstructor

public 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


 

Groovy Documentation