Package org.jboss.weld.bean.proxy
Class ContextBeanInstance<T>
- java.lang.Object
-
- org.jboss.weld.bean.proxy.AbstractBeanInstance
-
- org.jboss.weld.bean.proxy.ContextBeanInstance<T>
-
- All Implemented Interfaces:
Serializable,BeanInstance
public class ContextBeanInstance<T> extends AbstractBeanInstance implements Serializable
An instance locator that uses a context to lookup the instance if it exists; otherwise, a new instance will be created from the bean.- Author:
- David Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ContextBeanInstance(Bean<T> bean, org.jboss.weld.serialization.spi.BeanIdentifier id, String contextId)Creates a new locator for instances of the given bean.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetInstance()Returns the current instance for a proxy.Class<T>getInstanceType()-
Methods inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
computeInstanceType, computeInstanceType, invoke
-
-
-
-
Method Detail
-
getInstance
public T getInstance()
Description copied from interface:BeanInstanceReturns the current instance for a proxy.- Specified by:
getInstancein interfaceBeanInstance- Returns:
- the current bean instance
-
getInstanceType
public Class<T> getInstanceType()
- Specified by:
getInstanceTypein interfaceBeanInstance
-
-