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

java.lang.Object
  extended by javax.inject.manager.Bean<T>
      extended by org.jboss.webbeans.bean.RIBean<T>
          extended by org.jboss.webbeans.bean.AbstractBean<T,java.lang.Class<T>>
              extended by org.jboss.webbeans.bean.AbstractClassBean<T>
                  extended by org.jboss.webbeans.bean.EnterpriseBean<T>
                      extended by org.jboss.webbeans.bean.NewEnterpriseBean<T>
All Implemented Interfaces:
Contextual<T>, NewBean

public class NewEnterpriseBean<T>
extends EnterpriseBean<T>
implements NewBean

Represents a @New enterprise bean

Author:
Nicklas Karlsson

Field Summary
 
Fields inherited from class org.jboss.webbeans.bean.AbstractClassBean
annotatedItem
 
Fields inherited from class org.jboss.webbeans.bean.AbstractBean
_serializable, bindings, dependentInstancesStore, deploymentType, injectionPoints, manager, name, scopeType, type, types
 
Constructor Summary
protected NewEnterpriseBean(AnnotatedClass<T> type, ManagerImpl manager, BeanDeployerEnvironment environment)
          Protected constructor
 
Method Summary
protected  void checkScopeAllowed()
          Check that the scope type is allowed by the stereotypes on the bean and the bean type
 java.util.Set<java.lang.annotation.Annotation> getBindings()
          Gets the bindings
 java.lang.Class<? extends java.lang.annotation.Annotation> getDeploymentType()
          Gets the deployment type
 java.lang.String getName()
          Gets the name of the bean
 java.lang.Class<? extends java.lang.annotation.Annotation> getScopeType()
          Gets the scope type
 boolean isSpecializing()
           
static
<T> NewEnterpriseBean<T>
of(AnnotatedClass<T> clazz, ManagerImpl manager, BeanDeployerEnvironment environment)
          Creates an instance of a NewEnterpriseBean from an annotated class
 
Methods inherited from class org.jboss.webbeans.bean.EnterpriseBean
canCallRemoveMethods, checkConflictingRoles, checkObserverMethods, create, createReference, destroy, getEjbDescriptor, getSpecializedBean, initialize, initProxyClass, initSerializable, initTypes, isMethodExistsOnTypes, postConstruct, preDestroy, preSpecialize, specialize, toString
 
Methods inherited from class org.jboss.webbeans.bean.AbstractClassBean
callInitializers, checkBeanImplementation, getAnnotatedItem, getDefaultDeploymentType, getDefaultName, getId, getInitializerMethods, getSuperclasses, initDeploymentType, initInitializerMethods, initInjectionPoints, initScopeType, initType, injectBoundFields
 
Methods inherited from class org.jboss.webbeans.bean.AbstractBean
checkDeploymentType, checkRequiredTypesImplemented, getDeploymentType, getInjectionPoints, getMergedStereotypes, getType, getTypes, initBindings, initDefaultBindings, initDeploymentTypeFromStereotype, initName, initPrimitive, initProxyable, initScopeTypeFromStereotype, isAssignableFrom, isDependent, isInitialized, isNullable, isPrimitive, isProxyable, isSerializable, postSpecialize
 
Methods inherited from class org.jboss.webbeans.bean.RIBean
createId, equals, getManager, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NewEnterpriseBean

protected NewEnterpriseBean(AnnotatedClass<T> type,
                            ManagerImpl manager,
                            BeanDeployerEnvironment environment)
Protected constructor

Parameters:
type - An annotated class
manager - The Web Beans manager
Method Detail

of

public static <T> NewEnterpriseBean<T> of(AnnotatedClass<T> clazz,
                                          ManagerImpl manager,
                                          BeanDeployerEnvironment environment)
Creates an instance of a NewEnterpriseBean from an annotated class

Parameters:
clazz - The annotated class
manager - The Web Beans manager
Returns:
a new NewEnterpriseBean instance

getScopeType

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

Overrides:
getScopeType in class AbstractBean<T,java.lang.Class<T>>
Returns:
@Dependent
See Also:
Bean.getScopeType()

getDeploymentType

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

Overrides:
getDeploymentType in class AbstractBean<T,java.lang.Class<T>>
Returns:
The standard deployment type
See Also:
Bean.getDeploymentType()

getName

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

Overrides:
getName in class AbstractBean<T,java.lang.Class<T>>
Returns:
null
See Also:
Bean.getName()

getBindings

public java.util.Set<java.lang.annotation.Annotation> getBindings()
Gets the bindings

Overrides:
getBindings in class AbstractBean<T,java.lang.Class<T>>
Returns:
The set of binding types
See Also:
Bean.getBindings()

isSpecializing

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

checkScopeAllowed

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

Overrides:
checkScopeAllowed in class EnterpriseBean<T>


Copyright © 2011. All Rights Reserved.