cookxml.cookjs.util
Class ProxyHandler

java.lang.Object
  extended bycookxml.cookjs.util.ProxyHandler
All Implemented Interfaces:
InvocationHandler

public class ProxyHandler
extends Object
implements InvocationHandler

This is the handler class that redirect Java calls to Rhino interpreter. It is created by ProxyJavaAdapter as the handler for the Proxy object.

Here I made an assumption that all objects passed to "invoke" method are Java objects rather than JavaScript's Scriptables, since one only use JavaAdapter in such cases anyways.

Since:
CookJS 1.0
See Also:
Proxy, JavaAdapter, ProxyJavaAdapter

Constructor Summary
ProxyHandler(org.mozilla.javascript.Scriptable delegate)
           
 
Method Summary
 Object invoke(Object proxy, Method method, Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyHandler

public ProxyHandler(org.mozilla.javascript.Scriptable delegate)
Method Detail

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Specified by:
invoke in interface InvocationHandler
Throws:
Throwable