net.sf.cglib
Class LookupDelegator

java.lang.Object
  |
  +--net.sf.cglib.LookupDelegator

public abstract class LookupDelegator
extends java.lang.Object

Similar to Delegator, but dynamically looks up the interface implementation for every method call.

Version:
$Id: LookupDelegator.java,v 1.3 2003/07/15 16:38:46 herbyderby Exp $
Author:
Chris Nokleberg

Inner Class Summary
static interface LookupDelegator.Callback
           
 
Field Summary
protected  LookupDelegator.Callback callback
           
 
Constructor Summary
protected LookupDelegator()
           
 
Method Summary
static java.lang.Object create(java.lang.Class[] interfaces, LookupDelegator.Callback callback, java.lang.ClassLoader loader)
          Returns an object that implements all of the specified interfaces.
protected abstract  LookupDelegator newInstance(LookupDelegator.Callback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callback

protected LookupDelegator.Callback callback
Constructor Detail

LookupDelegator

protected LookupDelegator()
Method Detail

newInstance

protected abstract LookupDelegator newInstance(LookupDelegator.Callback callback)

create

public static java.lang.Object create(java.lang.Class[] interfaces,
                                      LookupDelegator.Callback callback,
                                      java.lang.ClassLoader loader)
Returns an object that implements all of the specified interfaces. When any method of the object is called, the callback is used to lookup an object of the appropriate type by passing the fully-qualified name of the corresponding interface. The object returned by the callback is then used to invoke the
Parameters:
interfaces - the array of interfaces to implement
callback - used to lookup implementing objects during each method call
loader - ClassLoader for enhanced class, uses "current" if null


Copyright © 2002-2003 cglib. All Rights Reserved.