Class CallbackClosure

  extended by org.apache.ddlutils.util.CallbackClosure
All Implemented Interfaces:

public class CallbackClosure
extends Object
implements org.apache.commons.collections.Closure

A closure that determines a callback for the type of the object and calls it. Note that inheritance is also taken into account. I.e. if the object is of type B which is a subtype of A, and there is only a callback for type A, then this one will be invoked. If there is however also a callback for type B, then only this callback for type B will be invoked and not the one for type A.

$Revision: $

Constructor Summary
CallbackClosure(Object callee, String callbackName, Class[] parameterTypes, Object[] parameters)
          Creates a new closure object.
Method Summary
 void execute(Object obj)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public CallbackClosure(Object callee,
                       String callbackName,
                       Class[] parameterTypes,
                       Object[] parameters)
Creates a new closure object.

callee - The object on which the callbacks will be invoked
callbackName - The name of the callback method
parameterTypes - The parameter types. This array has to contain one null for the type of the object for which the callback is invoked. null or an empty array is regarded to be the same as an array containing a single null
parameters - The actual arguments. The value at the placeholder position will be ignored. Can be null if no parameter types where given
Method Detail


public void execute(Object obj)
             throws DdlUtilsException

Specified by:
execute in interface org.apache.commons.collections.Closure

Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.