org.apache.ddlutils.util
Class CallbackClosure
java.lang.Object
org.apache.ddlutils.util.CallbackClosure
- All Implemented Interfaces:
- org.apache.commons.collections.Closure
public class CallbackClosure
- extends java.lang.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.
- Version:
- $Revision: $
Constructor Summary |
CallbackClosure(java.lang.Object callee,
java.lang.String callbackName,
java.lang.Class[] parameterTypes,
java.lang.Object[] parameters)
Creates a new closure object. |
Method Summary |
void |
execute(java.lang.Object obj)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CallbackClosure
public CallbackClosure(java.lang.Object callee,
java.lang.String callbackName,
java.lang.Class[] parameterTypes,
java.lang.Object[] parameters)
- Creates a new closure object.
- Parameters:
callee
- The object on which the callbacks will be invokedcallbackName
- The name of the callback methodparameterTypes
- 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
execute
public void execute(java.lang.Object obj)
throws DdlUtilsException
-
- Specified by:
execute
in interface org.apache.commons.collections.Closure
- Throws:
DdlUtilsException
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.