Package org.jboss.weld.util.bean
Class IsolatedForwardingBean<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.util.bean.IsolatedForwardingBean<T>
-
- All Implemented Interfaces:
Contextual<T>,Bean<T>,BeanAttributes<T>,WrappedContextual<T>
- Direct Known Subclasses:
ForwardingBean,IsolatedForwardingBean.Impl,IsolatedForwardingDecorator,IsolatedForwardingInterceptor
public abstract class IsolatedForwardingBean<T> extends ForwardingBeanAttributes<T> implements Bean<T>, WrappedContextual<T>
Delegating implementation ofBean. Separate delegate is used forBeanAttributesmethods, allowing this class to be used for processing of extension-provided beans.- Author:
- Jozef Hartinger
- See Also:
ProcessBeanAttributes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIsolatedForwardingBean.Impl<T>
-
Constructor Summary
Constructors Constructor Description IsolatedForwardingBean()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tcreate(CreationalContext<T> creationalContext)Create a new instance of the contextual type.abstract Bean<T>delegate()voiddestroy(T instance, CreationalContext<T> creationalContext)Destroy an instance of the contextual type.booleanequals(Object obj)Class<?>getBeanClass()The bean class of the managed bean or session bean or of the bean that declares the producer method or field.Set<InjectionPoint>getInjectionPoints()Obtains theInjectionPointobjects representing injection points of the bean, that will be validated by the container at initialization time.inthashCode()booleanisNullable()Determines ifContextual.create(CreationalContext)sometimes return a null value.StringtoString()-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
attributes, 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.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
-
-
-
Method Detail
-
delegate
public abstract Bean<T> delegate()
- Specified by:
delegatein interfaceWrappedContextual<T>
-
create
public T create(CreationalContext<T> creationalContext)
Description copied from interface:ContextualCreate a new instance of the contextual type. Instances should use the givenCreationalContextwhen obtaining contextual references to inject, in order to ensure that any dependent objects are associated with the contextual instance that is being created. An implementation may callCreationalContext.push(Object)between instantiation and injection to help the container minimize the use of client proxy objects.- Specified by:
createin interfaceContextual<T>- Parameters:
creationalContext- the context in which this instance is being created- Returns:
- the contextual instance
-
destroy
public void destroy(T instance, CreationalContext<T> creationalContext)
Description copied from interface:ContextualDestroy an instance of the contextual type. Implementations should callCreationalContext.release()to allow the container to destroy dependent objects of the contextual instance.- Specified by:
destroyin interfaceContextual<T>- Parameters:
instance- the contextual instance to destroycreationalContext- the context in which this instance was created
-
getBeanClass
public Class<?> getBeanClass()
Description copied from interface:BeanThe bean class of the managed bean or session bean or of the bean that declares the producer method or field.- Specified by:
getBeanClassin interfaceBean<T>- Returns:
- the bean class
-
getInjectionPoints
public Set<InjectionPoint> getInjectionPoints()
Description copied from interface:BeanObtains theInjectionPointobjects representing injection points of the bean, that will be validated by the container at initialization time.- Specified by:
getInjectionPointsin interfaceBean<T>- Returns:
- the set of injection points of the bean
-
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>
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classForwardingBeanAttributes<T>
-
-