org.perfectjpattern.core.extras.delegate
Class Delegator<I>
java.lang.Object
   org.perfectjpattern.core.extras.delegate.AbstractDelegator<I>
org.perfectjpattern.core.extras.delegate.AbstractDelegator<I>
       org.perfectjpattern.core.extras.delegate.Delegator<I>
org.perfectjpattern.core.extras.delegate.Delegator<I>
- Type Parameters:
- I- Interface type built by this- Delegatorinstance.
- All Implemented Interfaces: 
- IDelegator<I>
- public class Delegator<I> 
- extends AbstractDelegator<I>
Implementation of IDelegator interface for creating
 Delegate instances based user-defined interface types.
 
 Notes: Base source code implemented by Steve Lewis and Wilhelm 
 Fitzpatrick and adapted to fit PerfectJPattern componentization 
 criteria and code conventions.
- Version:
- $Revision: 1.0 $ $Date: Jun 25, 2007 7:20:28 AM $
- Author:
- Steve Lewis, Wilhelm 
 Fitzpatrick, Giovanni Azua
-  
- 
 
 
 
| Constructor Summary | 
| Delegator(Class<I> anInterface)Creates a
 Delegator<E>from the type interface. | 
 
| Method Summary | 
|  I | build(Class aTarget,
      String aMethodName)Returns Dynamic Proxy that implements the target generic parameter 
 interface.
 | 
|  I | build(Object aTarget,
      String aMethodName)Returns Dynamic Proxy that implements the target generic parameter 
 interface.
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
Delegator
public Delegator(Class<I> anInterface)
- Creates a Delegator<E>from the type interface.
 
- Parameters:
- anInterface- The interface to build references from.
- Throws:
- IllegalArgumentException- 'anInterface' must not be null.
- IllegalArgumentException- 'anInterface' must be an interface type.
 
build
public I build(Class aTarget,
               String aMethodName)
        throws IllegalArgumentException,
               UnsupportedOperationException
- Returns Dynamic Proxy that implements the target generic parameter 
 interface. The implementing Dynamic Proxy executes the underlying 
 method identified by Class type and Method name.
 
- 
- Parameters:
- aTarget- non-null class with a bindable static method.
- aMethodName- name of the static method.
- Returns:
- Dynamic proxy implementing the target generic interface.
- Throws:
- IllegalArgumentException- 'aTarget' must not be null.
- UnsupportedOperationException- No suitable method found.
 
build
public I build(Object aTarget,
               String aMethodName)
        throws IllegalArgumentException,
               UnsupportedOperationException
- Returns Dynamic Proxy that implements the target generic parameter 
 interface. The implementing Dynamic Proxy executes the underlying 
 method identified by Object instance and Method name.
 
- 
- Parameters:
- aTarget- non-null target with a bindable method.
- aMethodName- name of the method.
- Returns:
- Dynamic proxy implementing the target generic interface.
- Throws:
- IllegalArgumentException- 'aTarget' must not be null.
- UnsupportedOperationException- No suitable method found.
 
Copyright © 2007-2009. All Rights Reserved.