Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

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

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

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