rita.support.dyn
Class RiDynamicType

java.lang.Object
  extended by rita.support.dyn.RiDynamicType
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class RiDynamicType
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

A dynamic proxy invocation handler that enables dynamic typing for local RiTa objects


Method Summary
static java.lang.Object implement(java.lang.Class iface, java.lang.Object object)
          Causes object to implement the interface and returns an instance of the object implementing interface even if interface was not declared in object.getClass()'s implements declaration.
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

invoke

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

implement

public static java.lang.Object implement(java.lang.Class iface,
                                         java.lang.Object object)
Causes object to implement the interface and returns an instance of the object implementing interface even if interface was not declared in object.getClass()'s implements declaration. This works as long as all methods declared in interface are present in the object.

Parameters:
iface - The Java class of the interface to implement
object - The object to force to implement the interface
Returns:
the object, but now implementing the interface

main

public static void main(java.lang.String[] args)