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 simpleBeanInstance
which always maintains a specific bean instance that is being proxied.- Author:
- David Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TargetBeanInstance(jakarta.enterprise.inject.spi.Bean<?> bean, Object instance)
TargetBeanInstance(Object instance)
TargetBeanInstance(TargetBeanInstance otherBeanInstance)
Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getInstance()
Returns the current instance for a proxy.Class<?>
getInstanceType()
MethodHandler
getInterceptorsHandler()
Object
invoke(Object instance, Method method, Object... arguments)
void
setInterceptorsHandler(MethodHandler interceptorsHandler)
-
Methods inherited from class org.jboss.weld.bean.proxy.AbstractBeanInstance
computeInstanceType, computeInstanceType
-
-
-
-
Constructor Detail
-
TargetBeanInstance
public TargetBeanInstance(jakarta.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 interfaceBeanInstance
- Returns:
- the current bean instance
-
getInstanceType
public Class<?> getInstanceType()
- Specified by:
getInstanceType
in 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:
invoke
in interfaceBeanInstance
- Overrides:
invoke
in classAbstractBeanInstance
- Throws:
Throwable
-
-