org.jboss.weld.bean.proxy
Class ContextBeanInstance<T>

java.lang.Object
  extended by org.jboss.weld.bean.proxy.AbstractBeanInstance
      extended by 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

Field Summary
 
Fields inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
log
 
Constructor Summary
ContextBeanInstance(javax.enterprise.inject.spi.Bean<T> bean, String id)
          Creates a new locator for instances of the given bean.
 
Method Summary
 T getInstance()
          Returns the current instance for a proxy.
 Class<T> getInstanceType()
           
 
Methods inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
computeInstanceType, computeInstanceType, invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 bean
id - The unique identifier of this bean
Method Detail

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.