org.jboss.webbeans.bean
Class ForwardingBean<T>

java.lang.Object
  extended by javax.inject.manager.Bean<T>
      extended by org.jboss.webbeans.bean.ForwardingBean<T>
Type Parameters:
T -
All Implemented Interfaces:
Contextual<T>

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

A delegating bean

Author:
Pete Muir

Constructor Summary
ForwardingBean(Manager manager)
          Constructor
 
Method Summary
 T create(CreationalContext<T> creationalContext)
          Creates an instance of the delegate
protected abstract  Bean<T> delegate()
          Abstract getter for the delegate
 void destroy(T instance)
          Destroys an instance through the delegate
 boolean equals(java.lang.Object obj)
          Compares an object with the delegate
 java.util.Set<java.lang.annotation.Annotation> getBindings()
          Gets the binding types of the delegate
 java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
          Gets the deployment types of the delegate
 java.util.Set<? extends InjectionPoint> getInjectionPoints()
          The injection points of a bean
 java.lang.String getName()
          Gets the name of the delegate
 java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
          Gets the scope type of the delegate
 java.util.Set<? extends java.lang.reflect.Type> getTypes()
          Gets the API types of the delegate
 int hashCode()
          Gets the hash code of the delegate
 boolean isNullable()
          Indicates if the delegate is nullable
 boolean isSerializable()
          Indicates if the delegate is serializable
 java.lang.String toString()
          Returns a string representation
 
Methods inherited from class javax.inject.manager.Bean
getManager
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForwardingBean

public ForwardingBean(Manager manager)
Constructor

Parameters:
manager - The Web Beans manager
Method Detail

create

public T create(CreationalContext<T> creationalContext)
Creates an instance of the delegate

Parameters:
creationalContext - the creational context in which incompletely initialized contexts may be placed
Returns:
an instance of the delegate

destroy

public void destroy(T instance)
Destroys an instance through the delegate

Parameters:
instance - The instance to destroy

getBindings

public java.util.Set<java.lang.annotation.Annotation> getBindings()
Gets the binding types of the delegate

Specified by:
getBindings in class Bean<T>
Returns:
The binding types

getDeploymentType

public java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
Gets the deployment types of the delegate

Specified by:
getDeploymentType in class Bean<T>
Returns:
The deployment types

getName

public java.lang.String getName()
Gets the name of the delegate

Specified by:
getName in class Bean<T>
Returns:
The name

getScopeType

public java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
Gets the scope type of the delegate

Specified by:
getScopeType in class Bean<T>
Returns:
The scope type

getTypes

public java.util.Set<? extends java.lang.reflect.Type> getTypes()
Gets the API types of the delegate

Specified by:
getTypes in class Bean<T>
Returns:
The API types

isNullable

public boolean isNullable()
Indicates if the delegate is nullable

Specified by:
isNullable in class Bean<T>
Returns:
True if nullable, false otherwise

isSerializable

public boolean isSerializable()
Indicates if the delegate is serializable

Specified by:
isSerializable in class Bean<T>
Returns:
True if serializable, false otherwise

getInjectionPoints

public java.util.Set<? extends InjectionPoint> getInjectionPoints()
Description copied from class: Bean
The injection points of a bean

Specified by:
getInjectionPoints in class Bean<T>
Returns:
the injection points of a bean

hashCode

public int hashCode()
Gets the hash code of the delegate

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code

equals

public boolean equals(java.lang.Object obj)
Compares an object with the delegate

Overrides:
equals in class java.lang.Object
Returns:
True if equals, false otherwise

delegate

protected abstract Bean<T> delegate()
Abstract getter for the delegate

Returns:
The delegate

toString

public java.lang.String toString()
Returns a string representation

Overrides:
toString in class java.lang.Object
Returns:
The string representation


Copyright © 2011. All Rights Reserved.