org.jboss.weld.bean
Class NewSessionBean<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.SessionBean<T>
                  extended by org.jboss.weld.bean.NewSessionBean<T>
All Implemented Interfaces:
javax.enterprise.context.spi.Contextual<T>, javax.enterprise.inject.spi.Bean<T>, javax.enterprise.inject.spi.PassivationCapable, NewBean

public class NewSessionBean<T>
extends SessionBean<T>
implements NewBean

Represents a @New enterprise bean

Author:
Nicklas Karlsson

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 NewSessionBean(WeldClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services)
          Protected constructor
 
Method Summary
protected  void checkScopeAllowed()
          Check that the scope type is allowed by the stereotypes on the bean and the bean type
 String getName()
          Gets the name of the bean
 Set<Annotation> getQualifiers()
          Gets the bindings
 Class<? extends Annotation> getScope()
          Gets the scope type
 boolean isAlternative()
           
 boolean isSpecializing()
           
static
<T> NewSessionBean<T>
of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl beanManager, org.jboss.weld.bootstrap.api.ServiceRegistry services)
          Creates an instance of a NewEnterpriseBean from an annotated class
protected  void registerInterceptors()
           
 String toString()
           
 
Methods inherited from class org.jboss.weld.bean.SessionBean
applyDecorators, checkConflictingRoles, checkObserverMethods, checkType, create, createId, createId, createInstance, createReference, destroy, getEjbDescriptor, getSpecializedBean, hasDefaultProducer, initialize, initializeAfterBeanDiscovery, initProxyClass, initTypes, isClientCanCallRemoveMethods, isInterceptionCandidate, isPassivationCapableBean, isPassivationCapableDependency, isProxyable, of, preSpecialize, specialize
 
Methods inherited from class org.jboss.weld.bean.AbstractClassBean
checkBeanImplementation, checkConstructor, createEnhancedSubclass, defaultPostConstruct, defaultPreDestroy, getConstructor, getDecorators, getDefaultName, getInitializerMethods, getInjectableFields, getInjectionPoints, getInjectionTarget, getPostConstruct, getPreDestroy, getWeldAnnotated, hasDecorators, hasInterceptors, initConstructor, initDecorators, initEnhancedSubclass, initInitializerMethods, initInjectableFields, initInterceptorsIfNeeded, initPostConstruct, initPreDestroy, initScope, initType, isSubclassed, setInjectionTarget
 
Methods inherited from class org.jboss.weld.bean.AbstractBean
addInjectionPoint, addInjectionPoints, checkDelegateInjectionPoints, cleanupAfterBoot, getDelegateInjectionPoints, getMergedStereotypes, getNewInjectionPoints, getServices, getStereotypes, getType, getTypedTypes, getTypes, getWeldInjectionPoints, initAlternative, initDefaultQualifiers, initName, initQualifiers, initScopeFromStereotype, initStereotypes, isDependent, isInitialized, isNormalScoped, isNullable, isPrimitive, isProxyRequired, 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
 

Constructor Detail

NewSessionBean

protected NewSessionBean(WeldClass<T> type,
                         InternalEjbDescriptor<T> ejbDescriptor,
                         String idSuffix,
                         BeanManagerImpl beanManager,
                         org.jboss.weld.bootstrap.api.ServiceRegistry services)
Protected constructor

Parameters:
type - An annotated class
beanManager - The Bean manager
Method Detail

of

public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor,
                                       BeanManagerImpl beanManager,
                                       org.jboss.weld.bootstrap.api.ServiceRegistry services)
Creates an instance of a NewEnterpriseBean from an annotated class

Parameters:
clazz - The annotated class
beanManager - The Bean manager
Returns:
a new NewEnterpriseBean instance

getScope

public Class<? extends Annotation> getScope()
Gets the scope type

Specified by:
getScope in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getScope in class AbstractBean<T,Class<T>>
Returns:
@Dependent
See Also:
Bean.getScope()

isAlternative

public boolean isAlternative()
Specified by:
isAlternative in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
isAlternative in class AbstractBean<T,Class<T>>

getName

public String getName()
Gets the name of the bean

Specified by:
getName in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getName in class AbstractBean<T,Class<T>>
Returns:
null
See Also:
Bean.getName()

getQualifiers

public Set<Annotation> getQualifiers()
Gets the bindings

Specified by:
getQualifiers in interface javax.enterprise.inject.spi.Bean<T>
Overrides:
getQualifiers in class AbstractBean<T,Class<T>>
Returns:
The set of binding types
See Also:
Bean.getQualifiers()

isSpecializing

public boolean isSpecializing()
Overrides:
isSpecializing in class AbstractBean<T,Class<T>>

checkScopeAllowed

protected void checkScopeAllowed()
Description copied from class: SessionBean
Check that the scope type is allowed by the stereotypes on the bean and the bean type

Overrides:
checkScopeAllowed in class SessionBean<T>

registerInterceptors

protected void registerInterceptors()
Overrides:
registerInterceptors in class SessionBean<T>

toString

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


Copyright © 2013 Seam Framework. All Rights Reserved.