org.perfectjpattern.core.structural.proxy
Class AbstractProxy<C>
java.lang.Object
   org.perfectjpattern.core.structural.AbstractSurrogate<C,C>
org.perfectjpattern.core.structural.AbstractSurrogate<C,C>
       org.perfectjpattern.core.structural.proxy.AbstractProxy<C>
org.perfectjpattern.core.structural.proxy.AbstractProxy<C>
- Type Parameters:
- C- Decorated Component type
- All Implemented Interfaces: 
- InvocationHandler, ISurrogate<C>, IProxy<C>
- Direct Known Subclasses: 
- ImageProxy, SynchronizedProxy
- public abstract class AbstractProxy<C> 
- extends AbstractSurrogate<C,C>- implements IProxy<C>
Componentized implementation of IProxy interface. Provides
 special access to the underlying Subject.
- Version:
- $Revision: 1.0 $ $Date: Nov 25, 2007 3:15:23 PM $
- Author:
- Giovanni Azua
-  
- 
 
| Constructor Summary | 
| AbstractProxy(Class<C> anInterface,
              C aComponent)Creates a
 Proxy<E>from a Component interface 
 type and instance. | 
 
 
 
 
 
 
AbstractProxy
public AbstractProxy(Class<C> anInterface,
                     C aComponent)
              throws IllegalArgumentException
- Creates a Proxy<E>from a Component interface 
 type and instance.
 
- Parameters:
- anInterface- The Component interface type.
- aComponent- The Component instance to Decorate.
- Throws:
- IllegalArgumentException- 'anInterface' must not be null.
- IllegalArgumentException- 'anInterface' must be an interface type.
- IllegalArgumentException- 'aComponent' must not be null.
 
getSubject
public final C getSubject()
- Returns the Proxywrapper instance
 
- 
- Specified by:
- getSubjectin interface- IProxy<C>
 
- 
- Returns:
- Proxywrapper instance
 
getRealSubject
public final C getRealSubject()
- Returns the actual wrapped Subjectinstance
 
- 
- Specified by:
- getRealSubjectin interface- IProxy<C>
 
- 
- Returns:
- actual wrapped Subjectinstance
 
Copyright © 2007-2009. All Rights Reserved.