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 |
ContextBeanInstance(javax.enterprise.inject.spi.Bean<T> bean,
String id)
Creates a new locator for instances of the given bean. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextBeanInstance
public ContextBeanInstance(javax.enterprise.inject.spi.Bean<T> bean,
String id)
- Creates a new locator for instances of the given bean.
- Parameters:
bean
- The contextual beanid
- The unique identifier of this bean
getInstance
public T getInstance()
- Description copied from interface:
BeanInstance
- Returns the current instance for a proxy.
- Specified by:
getInstance
in interface BeanInstance
- Returns:
- the current bean instance
getInstanceType
public Class<T> getInstanceType()
- Specified by:
getInstanceType
in interface BeanInstance
Copyright © 2013 Seam Framework. All Rights Reserved.