org.rococoa.internal
Class NSObjectInvocationHandler

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

public class NSObjectInvocationHandler
extends java.lang.Object
implements java.lang.reflect.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
NSObjectInvocationHandler(ID ocInstance, java.lang.Class<? extends NSObject> javaClass, boolean retain)
           
 
Method Summary
protected  void finalize()
           
 java.lang.Object intercept(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args, net.sf.cglib.proxy.MethodProxy methodProxy)
          Callback from cglib proxy
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.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

NSObjectInvocationHandler

public NSObjectInvocationHandler(ID ocInstance,
                                 java.lang.Class<? extends NSObject> javaClass,
                                 boolean retain)
Method Detail

finalize

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

invoke

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

Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

intercept

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

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


Copyright © 2009. All Rights Reserved.