Top Description Methods
javax.enterprise.inject.spi

public Interface Bean<T>

extends Contextual<T>, BeanAttributes<T>
Known Direct Subinterfaces
javax.enterprise.inject.spi.Decorator, javax.enterprise.inject.spi.Interceptor
Type Parameters
<T>
the class of the bean instance
Imports
java.util.Set, javax.enterprise.context.spi.Contextual, .CreationalContext

Represents an enabled bean. This interface defines everything the container needs to manage instances of the bean.

Authors
Gavin King, David Allen

Method Summary

Modifier and TypeMethod and Description
public Class<?>

Returns:

the bean class
getBeanClass
()

The bean class of the managed bean or session bean or of the bean that declares the producer method or field.

public Set<InjectionPoint>

Returns:

the set of injection points of the bean
getInjectionPoints
()

Obtains the javax.enterprise.inject.spi.InjectionPoint objects representing injection points of the bean, that will be validated by the container at initialization time.

public boolean

Returns:

true if the create() method may return a null value, and false otherwise
isNullable
()

Determines if javax.enterprise.context.spi.Contextual#create(CreationalContext) sometimes return a null value.

Inherited from javax.enterprise.context.spi.Contextual:
createdestroy
Inherited from javax.enterprise.inject.spi.BeanAttributes:
getNamegetQualifiersgetScopegetStereotypesgetTypesisAlternative

Method Detail

getBeanClassback to summary
public Class<?> getBeanClass()

The bean class of the managed bean or session bean or of the bean that declares the producer method or field.

Returns:Class<?>

the bean class

getInjectionPointsback to summary
public Set<InjectionPoint> getInjectionPoints()

Obtains the javax.enterprise.inject.spi.InjectionPoint objects representing injection points of the bean, that will be validated by the container at initialization time.

Returns:Set<InjectionPoint>

the set of injection points of the bean

isNullableback to summary
public boolean isNullable()

Determines if javax.enterprise.context.spi.Contextual#create(CreationalContext) sometimes return a null value.

As of CDI 1.1 this method is deprecated and can safely always return false.

Returns:boolean

true if the create() method may return a null value, and false otherwise