Package: org.codehaus.groovy.grails.commons.metaclass

## [Java] Interface ConstructorInterceptor

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

- All Superinterfaces:
    Interceptor

  Extends interceptor interface to allow interception of constructors

  Authors:
    Graeme Rocher
  Since:
    0.2

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Interceptor` | `afterInvoke, beforeInvoke`

- - ### Method Detail

    - #### 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

    - #### 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