Package org.jboss.weld.bean
Class CommonBean<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- All Implemented Interfaces:
Contextual<T>,Bean<T>,BeanAttributes<T>,WeldBean<T>
- Direct Known Subclasses:
AbstractSyntheticBean,RIBean
public abstract class CommonBean<T> extends ForwardingBeanAttributes<T> implements Bean<T>, WeldBean<T>
Common superclass for beans that are identified using id.- Author:
- Jozef Hartinger, Pete Muir
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCommonBean(BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BeanAttributes<T>attributes()booleanequals(Object obj)StringgetId()org.jboss.weld.serialization.spi.BeanIdentifiergetIdentifier()inthashCode()booleanisNullable()Determines ifContextual.create(CreationalContext)sometimes return a null value.voidsetAttributes(BeanAttributes<T> attributes)StringtoString()protected Objectunwrap(Object object)-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints
-
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
-
Methods inherited from interface org.jboss.weld.bean.WeldBean
getPriority
-
-
-
-
Constructor Detail
-
CommonBean
protected CommonBean(BeanAttributes<T> attributes, org.jboss.weld.serialization.spi.BeanIdentifier identifier)
-
-
Method Detail
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classForwardingBeanAttributes<T>
-
attributes
protected BeanAttributes<T> attributes()
- Specified by:
attributesin classForwardingBeanAttributes<T>
-
setAttributes
public void setAttributes(BeanAttributes<T> attributes)
-
isNullable
public boolean isNullable()
Description copied from interface:BeanDetermines if
Contextual.create(CreationalContext)sometimes return a null value.As of CDI 1.1 this method is deprecated and can safely always return false.
- Specified by:
isNullablein interfaceBean<T>- Returns:
- true if the
create()method may return a null value, and false otherwise
-
hashCode
public int hashCode()
- Overrides:
hashCodein classForwardingBeanAttributes<T>
-
getId
public String getId()
-
getIdentifier
public org.jboss.weld.serialization.spi.BeanIdentifier getIdentifier()
- Specified by:
getIdentifierin interfaceWeldBean<T>- Returns:
- the
BeanIdentifierfor this bean
-
-