org.rococoa.internal
Class ObjCObjectInvocationHandler

java.lang.Object
  extended by org.rococoa.internal.ObjCObjectInvocationHandler
All Implemented Interfaces:
InvocationHandler, net.sf.cglib.proxy.Callback, net.sf.cglib.proxy.MethodInterceptor

public class ObjCObjectInvocationHandler
extends Object
implements InvocationHandler, net.sf.cglib.proxy.MethodInterceptor

Listens to invocations of methods on a Java NSObject, and forwards them to its Objective-C counterpart.

Author:
duncan

Constructor Summary
ObjCObjectInvocationHandler(ID ocInstance, Class<? extends ObjCObject> javaClass, boolean retain)
           
 
Method Summary
protected  void finalize()
           
 Object intercept(Object proxy, Method method, Object[] args, net.sf.cglib.proxy.MethodProxy methodProxy)
          Callback from cglib proxy
 Object invoke(Object proxy, Method method, Object[] args)
          Callback from java.lang.reflect proxy
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjCObjectInvocationHandler

public ObjCObjectInvocationHandler(ID ocInstance,
                                   Class<? extends ObjCObject> javaClass,
                                   boolean retain)
Method Detail

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable

invoke

public Object invoke(Object proxy,
                     Method method,
                     Object[] args)
              throws Throwable
Callback from java.lang.reflect proxy

Specified by:
invoke in interface InvocationHandler
Throws:
Throwable

intercept

public Object intercept(Object proxy,
                        Method method,
                        Object[] args,
                        net.sf.cglib.proxy.MethodProxy methodProxy)
                 throws Throwable
Callback from cglib proxy

Specified by:
intercept in interface net.sf.cglib.proxy.MethodInterceptor
Throws:
Throwable


Copyright © 2012. All Rights Reserved.