org.jboss.seam.solder.bean
Class ForwardingBean<T>

java.lang.Object
  extended by org.jboss.seam.solder.bean.ForwardingBean<T>
Type Parameters:
T - the class of the bean
All Implemented Interfaces:
Contextual<T>, Bean<T>
Direct Known Subclasses:
GenericProducerMethod

public abstract class ForwardingBean<T>
extends Object
implements Bean<T>

An implementation of Bean that forwards all calls to the delegate().

Author:
Pete Muir

Constructor Summary
ForwardingBean()
           
 
Method Summary
 T create(CreationalContext<T> creationalContext)
           
protected abstract  Bean<T> delegate()
          All calls to this Bean instance are forwarded to the delegate unless overridden.
 void destroy(T instance, CreationalContext<T> creationalContext)
           
 boolean equals(Object obj)
           
 Class<?> getBeanClass()
           
 Set<InjectionPoint> getInjectionPoints()
           
 String getName()
           
 Set<Annotation> getQualifiers()
           
 Class<? extends Annotation> getScope()
           
 Set<Class<? extends Annotation>> getStereotypes()
           
 Set<Type> getTypes()
           
 int hashCode()
           
 boolean isAlternative()
           
 boolean isNullable()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingBean

public ForwardingBean()
Method Detail

delegate

protected abstract Bean<T> delegate()
All calls to this Bean instance are forwarded to the delegate unless overridden.

Returns:
the delegate Bean

getBeanClass

public Class<?> getBeanClass()
Specified by:
getBeanClass in interface Bean<T>

getInjectionPoints

public Set<InjectionPoint> getInjectionPoints()
Specified by:
getInjectionPoints in interface Bean<T>

getName

public String getName()
Specified by:
getName in interface Bean<T>

getQualifiers

public Set<Annotation> getQualifiers()
Specified by:
getQualifiers in interface Bean<T>

getScope

public Class<? extends Annotation> getScope()
Specified by:
getScope in interface Bean<T>

getStereotypes

public Set<Class<? extends Annotation>> getStereotypes()
Specified by:
getStereotypes in interface Bean<T>

getTypes

public Set<Type> getTypes()
Specified by:
getTypes in interface Bean<T>

isAlternative

public boolean isAlternative()
Specified by:
isAlternative in interface Bean<T>

isNullable

public boolean isNullable()
Specified by:
isNullable in interface Bean<T>

create

public T create(CreationalContext<T> creationalContext)
Specified by:
create in interface Contextual<T>

destroy

public void destroy(T instance,
                    CreationalContext<T> creationalContext)
Specified by:
destroy in interface Contextual<T>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 Seam Framework. All Rights Reserved.