org.apache.webbeans.component.third
Class ThirdpartyBeanImpl<T>

java.lang.Object
  extended by org.apache.webbeans.component.AbstractOwbBean<T>
      extended by org.apache.webbeans.component.third.ThirdpartyBeanImpl<T>
All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, OwbBean<T>

public class ThirdpartyBeanImpl<T>
extends AbstractOwbBean<T>
implements javax.enterprise.inject.spi.Bean<T>


Field Summary
 
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
apiTypes, enabled, implQualifiers, implScopeType, injectionPoints, name, nullable, passivatingId, returnType, scopeClass, serializable, specializedBean, stereoTypeClasses, stereoTypes, webBeansType
 
Constructor Summary
ThirdpartyBeanImpl(javax.enterprise.inject.spi.Bean<T> bean, WebBeansContext webBeansContext)
           
 
Method Summary
 T create(javax.enterprise.context.spi.CreationalContext<T> context)
          
protected  T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Creates the instance of the bean that has a specific implementation type.
 void destroy(T instance, javax.enterprise.context.spi.CreationalContext<T> context)
           
protected  void destroyInstance(T instance, javax.enterprise.context.spi.CreationalContext<T> creationalContext)
          Destroy the instance of the bean.
 boolean equals(Object other)
           
 Class<?> getBeanClass()
          Get return types of the bean.
 String getId()
          get the unique Id of the bean.
 Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
          
 String getName()
          Name of the bean.
 Set<Annotation> getQualifiers()
           
 Class<? extends Annotation> getScope()
           
 Set<Class<? extends Annotation>> getStereotypes()
          
 Set<Type> getTypes()
           
 int hashCode()
          We need to override the hash code from the AbstractOwbBean and delegate to the shaded instance.
 boolean isAlternative()
          
 boolean isNullable()
          
 boolean isPassivationCapable()
          True if passivation capable false otherwise.
 
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addApiType, addInjectionPoint, addQualifier, addStereoType, createNewInstance, destroyCreatedInstance, getImplQualifiers, getImplScopeType, getInjectionPoint, getLogger, getManager, getOwbStereotypes, getReturnType, getWebBeansContext, getWebBeansType, isDependent, isEnabled, isSerializable, isSpecializedBean, setEnabled, setImplScopeType, setName, setNullable, setSerializable, setSpecializedBean, toString, validatePassivationDependencies
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThirdpartyBeanImpl

public ThirdpartyBeanImpl(javax.enterprise.inject.spi.Bean<T> bean,
                          WebBeansContext webBeansContext)
Method Detail

getQualifiers

public Set<Annotation> getQualifiers()
Specified by:
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getQualifiers in class AbstractOwbBean<T>

getInjectionPoints

public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
Description copied from class: AbstractOwbBean

Specified by:
getInjectionPoints in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getInjectionPoints in class AbstractOwbBean<T>

getName

public String getName()
Description copied from class: AbstractOwbBean
Name of the bean.

Specified by:
getName in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getName in class AbstractOwbBean<T>
Returns:
name of the bean

getScope

public Class<? extends Annotation> getScope()
Specified by:
getScope in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getScope in class AbstractOwbBean<T>

getTypes

public Set<Type> getTypes()
Specified by:
getTypes in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getTypes in class AbstractOwbBean<T>

isNullable

public boolean isNullable()
Description copied from class: AbstractOwbBean

Specified by:
isNullable in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
isNullable in class AbstractOwbBean<T>

create

public T create(javax.enterprise.context.spi.CreationalContext<T> context)
Description copied from class: AbstractOwbBean

Specified by:
create in interface javax.enterprise.context.spi.Contextual<T>
Overrides:
create in class AbstractOwbBean<T>

destroy

public void destroy(T instance,
                    javax.enterprise.context.spi.CreationalContext<T> context)
Specified by:
destroy in interface javax.enterprise.context.spi.Contextual<T>
Overrides:
destroy in class AbstractOwbBean<T>

getId

public String getId()
Description copied from class: AbstractOwbBean
get the unique Id of the bean. This will get used as reference on passivation. Gets id of the bean.

Specified by:
getId in interface OwbBean<T>
Overrides:
getId in class AbstractOwbBean<T>
Returns:
id of the bean

isPassivationCapable

public boolean isPassivationCapable()
Description copied from interface: OwbBean
True if passivation capable false otherwise.

Specified by:
isPassivationCapable in interface OwbBean<T>
Overrides:
isPassivationCapable in class AbstractOwbBean<T>
Returns:
true if this bean is passivation capable

createInstance

protected T createInstance(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Description copied from class: AbstractOwbBean
Creates the instance of the bean that has a specific implementation type. Each subclass must define its own create mechanism.

Specified by:
createInstance in class AbstractOwbBean<T>
Parameters:
creationalContext - the contextual instance shall be created in
Returns:
instance of the bean

destroyInstance

protected void destroyInstance(T instance,
                               javax.enterprise.context.spi.CreationalContext<T> creationalContext)
Description copied from class: AbstractOwbBean
Destroy the instance of the bean. Each subclass must define its own destroy mechanism.

Overrides:
destroyInstance in class AbstractOwbBean<T>
Parameters:
instance - instance of the bean that is being destroyed
creationalContext - the contextual instance has been created in

getBeanClass

public Class<?> getBeanClass()
Description copied from class: AbstractOwbBean
Get return types of the bean.

Specified by:
getBeanClass in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getBeanClass in class AbstractOwbBean<T>

getStereotypes

public Set<Class<? extends Annotation>> getStereotypes()
Description copied from class: AbstractOwbBean

Specified by:
getStereotypes in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getStereotypes in class AbstractOwbBean<T>

isAlternative

public boolean isAlternative()
Description copied from class: AbstractOwbBean

Specified by:
isAlternative in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
isAlternative in class AbstractOwbBean<T>

hashCode

public int hashCode()
We need to override the hash code from the AbstractOwbBean and delegate to the shaded instance.

Overrides:
hashCode in class AbstractOwbBean<T>
Returns:
the hash mixed with the shadowed bean.

equals

public boolean equals(Object other)
Overrides:
equals in class AbstractOwbBean<T>


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.