Package org.jboss.weld.bean.proxy
Class TargetBeanInstance
- java.lang.Object
-
- org.jboss.weld.bean.proxy.AbstractBeanInstance
-
- org.jboss.weld.bean.proxy.TargetBeanInstance
-
- All Implemented Interfaces:
Serializable,BeanInstance
public class TargetBeanInstance extends AbstractBeanInstance implements Serializable
A simpleBeanInstancewhich always maintains a specific bean instance that is being proxied.- Author:
- David Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TargetBeanInstance(Object instance)TargetBeanInstance(Bean<?> bean, Object instance)TargetBeanInstance(TargetBeanInstance otherBeanInstance)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetInstance()Returns the current instance for a proxy.Class<?>getInstanceType()MethodHandlergetInterceptorsHandler()Objectinvoke(Object instance, Method method, Object... arguments)voidsetInterceptorsHandler(MethodHandler interceptorsHandler)-
Methods inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
computeInstanceType, computeInstanceType
-
-
-
-
Constructor Detail
-
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:BeanInstanceReturns the current instance for a proxy.- Specified by:
getInstancein interfaceBeanInstance- Returns:
- the current bean instance
-
getInstanceType
public Class<?> getInstanceType()
- Specified by:
getInstanceTypein interfaceBeanInstance
-
getInterceptorsHandler
public MethodHandler getInterceptorsHandler()
- Returns:
- the interceptorsHandler
-
setInterceptorsHandler
public void setInterceptorsHandler(MethodHandler interceptorsHandler)
- Parameters:
interceptorsHandler- the interceptorsHandler to set
-
invoke
public Object invoke(Object instance, Method method, Object... arguments) throws Throwable
- Specified by:
invokein interfaceBeanInstance- Overrides:
invokein classAbstractBeanInstance- Throws:
Throwable
-
-