类 DefaultScopedObject
- java.lang.Object
- org.springframework.aop.scope.DefaultScopedObject
- 所有已实现的接口:
Serializable
,RawTargetAccess
,ScopedObject
public class DefaultScopedObject extends Object implements ScopedObject, Serializable
Default implementation of theScopedObject
interface.Simply delegates the calls to the underlying
bean factory
(BeanFactory.getBean(String)
/ConfigurableBeanFactory.destroyScopedBean(String)
).- 从以下版本开始:
- 2.0
- 作者:
- Juergen Hoeller
- 另请参阅:
BeanFactory.getBean(java.lang.String)
,ConfigurableBeanFactory.destroyScopedBean(java.lang.String)
, 序列化表格
构造器概要
构造器 构造器 说明 DefaultScopedObject(ConfigurableBeanFactory beanFactory, String targetBeanName)
Creates a new instance of theDefaultScopedObject
class.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Object
getTargetObject()
Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope).void
removeFromScope()
Remove this object from its target scope, for example from the backing session.
构造器详细资料
DefaultScopedObject
public DefaultScopedObject(ConfigurableBeanFactory beanFactory, String targetBeanName)
Creates a new instance of theDefaultScopedObject
class.- 参数:
beanFactory
- theConfigurableBeanFactory
that holds the scoped target objecttargetBeanName
- the name of the target bean
方法详细资料
getTargetObject
public Object getTargetObject()
从接口复制的说明:ScopedObject
Return the current target object behind this scoped object proxy, in its raw form (as stored in the target scope).The raw target object can for example be passed to persistence providers which would not be able to handle the scoped proxy object.
- 指定者:
getTargetObject
在接口中ScopedObject
- 返回:
- the current target object behind this scoped object proxy
removeFromScope
public void removeFromScope()
从接口复制的说明:ScopedObject
Remove this object from its target scope, for example from the backing session.Note that no further calls may be made to the scoped object afterwards (at least within the current thread, that is, with the exact same target object in the target scope).
- 指定者:
removeFromScope
在接口中ScopedObject