org.perfectjpattern.core.structural.proxy
Class AbstractProxy<C>
java.lang.Object
org.perfectjpattern.core.structural.AbstractSurrogate<C,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
Proxy wrapper instance
- Specified by:
getSubject in interface IProxy<C>
- Returns:
Proxy wrapper instance
getRealSubject
public final C getRealSubject()
- Returns the actual wrapped
Subject instance
- Specified by:
getRealSubject in interface IProxy<C>
- Returns:
- actual wrapped
Subject instance
Copyright © 2007-2009. All Rights Reserved.