org.jboss.weld.bean
Class DecoratorImpl<T>

java.lang.Object
  extended by org.jboss.weld.bean.RIBean<T>
      extended by org.jboss.weld.bean.AbstractBean<T,Class<T>>
          extended by org.jboss.weld.bean.AbstractClassBean<T>
              extended by org.jboss.weld.bean.ManagedBean<T>
                  extended by org.jboss.weld.bean.DecoratorImpl<T>
All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.Decorator<T>, javax.enterprise.inject.spi.PassivationCapable, WeldDecorator<T>

public class DecoratorImpl<T>
extends ManagedBean<T>
implements WeldDecorator<T>


Field Summary
 
Fields inherited from class org.jboss.weld.bean.AbstractClassBean
annotatedItem, constructorForEnhancedSubclass, decoratorProxyFactory, enhancedSubclass
 
Fields inherited from class org.jboss.weld.bean.AbstractBean
alternative, beanManager, name, qualifiers, scope, type, types
 
Fields inherited from class org.jboss.weld.bean.RIBean
BEAN_ID_PREFIX, BEAN_ID_SEPARATOR
 
Constructor Summary
protected DecoratorImpl(WeldClass<T> type, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services)
           
 
Method Summary
protected  void checkDelegateInjectionPoints()
           
protected  void checkDelegateType()
           
protected  Class<T> createEnhancedSubclass()
           
 Set<Type> getDecoratedTypes()
           
 WeldMethod<?,?> getDecoratorMethod(Method method)
          Returns the decorated method that can decorate a particular method, if one exists

Such a method must be implement one of the decorated type methods, and can be parametrized

 WeldInjectionPoint<?,?> getDelegateInjectionPoint()
           
 Set<Annotation> getDelegateQualifiers()
           
 Type getDelegateType()
           
 javax.enterprise.inject.spi.InjectionTarget<T> getInjectionTarget()
           
protected  void initDecoratedTypes()
           
 void initDecorators()
           
protected  void initDelegateBindings()
           
protected  void initDelegateInjectionPoint()
           
protected  void initDelegateType()
           
 void initialize(BeanDeployerEnvironment environment)
          Initializes the bean and its metadata
protected  boolean isSubclassed()
           
static
<T> DecoratorImpl<T>
of(WeldClass<T> clazz, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services)
          Creates a decorator bean
 String toString()
           
static
<T> javax.enterprise.inject.spi.Decorator<T>
wrap(javax.enterprise.inject.spi.Decorator<T> decorator)
           
 
Methods inherited from class org.jboss.weld.bean.ManagedBean
applyInterceptors, checkBeanImplementation, checkType, create, createId, createInstance, createSimpleId, destroy, getSpecializedBean, hasDefaultProducer, initializeAfterBeanDiscovery, isInterceptionCandidate, isPassivationCapableBean, isPassivationCapableDependency, isProxyable, preSpecialize, specialize
 
Methods inherited from class org.jboss.weld.bean.AbstractClassBean
applyDecorators, checkConstructor, defaultPostConstruct, defaultPreDestroy, getConstructor, getDecorators, getDefaultName, getInitializerMethods, getInjectableFields, getInjectionPoints, getPostConstruct, getPreDestroy, getWeldAnnotated, hasDecorators, hasInterceptors, initConstructor, initEnhancedSubclass, initInitializerMethods, initInjectableFields, initInterceptorsIfNeeded, initPostConstruct, initPreDestroy, initScope, initType, setInjectionTarget
 
Methods inherited from class org.jboss.weld.bean.AbstractBean
addInjectionPoint, addInjectionPoints, cleanupAfterBoot, getDelegateInjectionPoints, getMergedStereotypes, getName, getNewInjectionPoints, getQualifiers, getScope, getServices, getStereotypes, getType, getTypedTypes, getTypes, getWeldInjectionPoints, initAlternative, initDefaultQualifiers, initName, initQualifiers, initScopeFromStereotype, initStereotypes, initTypes, isAlternative, isDependent, isInitialized, isNormalScoped, isNullable, isPrimitive, isProxyRequired, isSpecializing, postSpecialize
 
Methods inherited from class org.jboss.weld.bean.RIBean
equals, getBeanClass, getBeanManager, getId, getQualifierInstances, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.weld.bean.WeldDecorator
getWeldAnnotated
 
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints, getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative, isNullable
 
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
 

Constructor Detail

DecoratorImpl

protected DecoratorImpl(WeldClass<T> type,
                        BeanManagerImpl beanManager,
                        org.jboss.weld.bootstrap.api.ServiceRegistry services)
Method Detail

wrap

public static <T> javax.enterprise.inject.spi.Decorator<T> wrap(javax.enterprise.inject.spi.Decorator<T> decorator)

of

public static <T> DecoratorImpl<T> of(WeldClass<T> clazz,
                                      BeanManagerImpl beanManager,
                                      org.jboss.weld.bootstrap.api.ServiceRegistry services)
Creates a decorator bean

Type Parameters:
T - The type
Parameters:
clazz - The class
beanManager - the current manager
Returns:
a Bean

initialize

public void initialize(BeanDeployerEnvironment environment)
Description copied from class: ManagedBean
Initializes the bean and its metadata

Overrides:
initialize in class ManagedBean<T>

initDecoratedTypes

protected void initDecoratedTypes()

initDelegateInjectionPoint

protected void initDelegateInjectionPoint()

createEnhancedSubclass

protected Class<T> createEnhancedSubclass()
Overrides:
createEnhancedSubclass in class AbstractClassBean<T>

isSubclassed

protected boolean isSubclassed()
Overrides:
isSubclassed in class AbstractClassBean<T>

checkDelegateInjectionPoints

protected void checkDelegateInjectionPoints()
Overrides:
checkDelegateInjectionPoints in class AbstractBean<T,Class<T>>

initDelegateBindings

protected void initDelegateBindings()

initDelegateType

protected void initDelegateType()

checkDelegateType

protected void checkDelegateType()

getInjectionTarget

public javax.enterprise.inject.spi.InjectionTarget<T> getInjectionTarget()
Overrides:
getInjectionTarget in class AbstractClassBean<T>

getDelegateQualifiers

public Set<Annotation> getDelegateQualifiers()
Specified by:
getDelegateQualifiers in interface javax.enterprise.inject.spi.Decorator<T>

getDelegateType

public Type getDelegateType()
Specified by:
getDelegateType in interface javax.enterprise.inject.spi.Decorator<T>

getDecoratedTypes

public Set<Type> getDecoratedTypes()
Specified by:
getDecoratedTypes in interface javax.enterprise.inject.spi.Decorator<T>

getDelegateInjectionPoint

public WeldInjectionPoint<?,?> getDelegateInjectionPoint()

initDecorators

public void initDecorators()
Overrides:
initDecorators in class AbstractClassBean<T>

getDecoratorMethod

public WeldMethod<?,?> getDecoratorMethod(Method method)
Description copied from interface: WeldDecorator
Returns the decorated method that can decorate a particular method, if one exists

Such a method must be implement one of the decorated type methods, and can be parametrized

Specified by:
getDecoratorMethod in interface WeldDecorator<T>
Returns:

toString

public String toString()
Overrides:
toString in class ManagedBean<T>


Copyright © 2013 Seam Framework. All Rights Reserved.