net.sourceforge.dynamicdispatch.bytecode
Class ByteCodeDispatcherFactory

java.lang.Object
  extended bynet.sourceforge.dynamicdispatch.DispatcherFactory
      extended bynet.sourceforge.dynamicdispatch.bytecode.ByteCodeDispatcherFactory

public class ByteCodeDispatcherFactory
extends DispatcherFactory

This factory generates a new dispatcher class on the fly (dynamically defines the class in byte code). Requires the Byte Code Engineering Library (BCEL) in the CLASSPATH.

Version:
0.0.4
Author:
Fabian Buettner

Field Summary
 
Fields inherited from class net.sourceforge.dynamicdispatch.DispatcherFactory
METHODNAME
 
Constructor Summary
ByteCodeDispatcherFactory()
           
 
Method Summary
 Dispatcher createDispatcher(java.lang.Object receiver)
          Create a dispatcher object for receiver whose "dispatch" method is dispatching to all methods named METHODNAME.
 Dispatcher createDispatcher(java.lang.Object receiver, java.lang.String method)
          Create a dispatcher object for receiver whose "dispatch" method is dispatching to all methods named method.
 
Methods inherited from class net.sourceforge.dynamicdispatch.DispatcherFactory
createDefaultDispatcher, createDefaultDispatcher, setDefaultFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteCodeDispatcherFactory

public ByteCodeDispatcherFactory()
Method Detail

createDispatcher

public Dispatcher createDispatcher(java.lang.Object receiver)
Create a dispatcher object for receiver whose "dispatch" method is dispatching to all methods named METHODNAME.

Specified by:
createDispatcher in class DispatcherFactory

createDispatcher

public Dispatcher createDispatcher(java.lang.Object receiver,
                                   java.lang.String method)
Create a dispatcher object for receiver whose "dispatch" method is dispatching to all methods named method.

Specified by:
createDispatcher in class DispatcherFactory