jfun.yan.xml
Class SynchronizedNutsFunction

java.lang.Object
  extended by jfun.yan.xml.DelegatingNutsFunction
      extended by jfun.yan.xml.SynchronizedNutsFunction
All Implemented Interfaces:
java.io.Serializable, LocationAware, NutsFunction

public class SynchronizedNutsFunction
extends DelegatingNutsFunction

A synchronization wrapper for NutsFunction. Calls through this class are synchronized.

Author:
Ben Yu Nov 27, 2005 11:50:32 AM
See Also:
Serialized Form

Constructor Summary
SynchronizedNutsFunction(NutsFunction fun)
          To create a SynchronizedNutsFunction object.
 
Method Summary
 java.lang.Object call(java.lang.Object[] args)
          synchronize against "this", then forward the call to the delegate target.
 boolean equals(java.lang.Object obj)
           
 
Methods inherited from class jfun.yan.xml.DelegatingNutsFunction
getDelegateTarget, getLocation, getName, getParameterCount, getParameterNames, getReturnType, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SynchronizedNutsFunction

public SynchronizedNutsFunction(NutsFunction fun)
To create a SynchronizedNutsFunction object.

Parameters:
fun - the NutsFunction object to synchronize access to.
Method Detail

call

public java.lang.Object call(java.lang.Object[] args)
synchronize against "this", then forward the call to the delegate target.

Specified by:
call in interface NutsFunction
Overrides:
call in class DelegatingNutsFunction
Parameters:
args - the arguments.
Returns:
the return value.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class DelegatingNutsFunction