org.jboss.webbeans.bean
Class NewSimpleBean<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.SimpleBean<T>
                      extended by org.jboss.webbeans.bean.NewSimpleBean<T>
All Implemented Interfaces:
Contextual<T>, NewBean

public class NewSimpleBean<T>
extends SimpleBean<T>
implements NewBean

Represents a @New simple 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 NewSimpleBean(AnnotatedClass<T> type, ManagerImpl manager)
          Protected constructor
 
Method Summary
protected  void checkScopeAllowed()
          Validate 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> NewSimpleBean<T>
of(AnnotatedClass<T> clazz, ManagerImpl manager)
          Creates an instance of a NewSimpleBean from an annotated class
 
Methods inherited from class org.jboss.webbeans.bean.SimpleBean
callPostConstruct, callPreDestroy, checkBeanImplementation, checkType, create, destroy, getConstructor, getPostConstruct, getPreDestroy, getSpecializedBean, initConstructor, initEjbInjectionPoints, initialize, initInjectionPoints, initPersistenceUnitInjectionPoints, initPostConstruct, initPreDestroy, initResourceInjectionPoints, injectEjbAndCommonFields, preSpecialize, specialize, toString
 
Methods inherited from class org.jboss.webbeans.bean.AbstractClassBean
callInitializers, getAnnotatedItem, getDefaultDeploymentType, getDefaultName, getId, getInitializerMethods, getSuperclasses, initDeploymentType, initInitializerMethods, 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, initSerializable, initTypes, 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

NewSimpleBean

protected NewSimpleBean(AnnotatedClass<T> type,
                        ManagerImpl manager)
Protected constructor

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

of

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

Parameters:
clazz - The annotated class
manager - The Web Beans manager
Returns:
a new NewSimpleBean 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: AbstractClassBean
Validate that the scope type is allowed by the stereotypes on the bean and the bean type

Overrides:
checkScopeAllowed in class AbstractClassBean<T>


Copyright © 2011. All Rights Reserved.