org.jboss.weld.bean.proxy
Class TargetBeanInstance

java.lang.Object
  extended by org.jboss.weld.bean.proxy.AbstractBeanInstance
      extended by org.jboss.weld.bean.proxy.TargetBeanInstance
All Implemented Interfaces:
Serializable, BeanInstance

public class TargetBeanInstance
extends AbstractBeanInstance
implements Serializable

A simple BeanInstance which always maintains a specific bean instance that is being proxied.

Author:
David Allen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
log
 
Constructor Summary
TargetBeanInstance(javax.enterprise.inject.spi.Bean<?> bean, Object instance)
           
TargetBeanInstance(Object instance)
           
TargetBeanInstance(TargetBeanInstance otherBeanInstance)
          Copy constructor
 
Method Summary
 Object getInstance()
          Returns the current instance for a proxy.
 Class<?> getInstanceType()
           
 javassist.util.proxy.MethodHandler getInterceptorsHandler()
           
 Object invoke(Object instance, Method method, Object... arguments)
           
 void setInterceptorsHandler(javassist.util.proxy.MethodHandler interceptorsHandler)
           
 
Methods inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
computeInstanceType, computeInstanceType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TargetBeanInstance

public TargetBeanInstance(javax.enterprise.inject.spi.Bean<?> bean,
                          Object instance)

TargetBeanInstance

public TargetBeanInstance(Object instance)

TargetBeanInstance

public TargetBeanInstance(TargetBeanInstance otherBeanInstance)
Copy constructor

Parameters:
otherBeanInstance - other bean instance to copy
Method Detail

getInstance

public Object 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<?> getInstanceType()
Specified by:
getInstanceType in interface BeanInstance

getInterceptorsHandler

public javassist.util.proxy.MethodHandler getInterceptorsHandler()
Returns:
the interceptorsHandler

setInterceptorsHandler

public void setInterceptorsHandler(javassist.util.proxy.MethodHandler interceptorsHandler)
Parameters:
interceptorsHandler - the interceptorsHandler to set

invoke

public Object invoke(Object instance,
                     Method method,
                     Object... arguments)
              throws Throwable
Specified by:
invoke in interface BeanInstance
Overrides:
invoke in class AbstractBeanInstance
Throws:
Throwable


Copyright © 2013 Seam Framework. All Rights Reserved.