|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.javasupport.RubyInvocationHandler
A RubyInvocationHandler intercepts method calls to Proxy objects and forwards them on to the corresponding RubyObject. Arguments passed to and sent from the method are translated between Java and Ruby objects. A new RubyInvocationHandler instance is created for each Proxy object created by RubyProxyFactory.
Method Summary | |
protected Ruby |
getRuby()
Get the Ruby instance that should be used. |
protected IRubyObject |
getRubyObject()
Get the RubyObject that we should forward method calls to. |
protected RubyProxyFactory |
getRubyProxyFactory()
Get the RubyProxyFactory instance that created this handler. |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
The invoke method is called by Java's reflection whenever a method is called on a Proxy object. |
protected boolean |
respondsTo(IRubyObject obj,
java.lang.String methodName)
Simple helper method for RubyObject.respond_to(RubySymbol). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
invoke
in interface java.lang.reflect.InvocationHandler
protected Ruby getRuby()
protected RubyProxyFactory getRubyProxyFactory()
protected IRubyObject getRubyObject()
protected boolean respondsTo(IRubyObject obj, java.lang.String methodName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |