org.springframework.aop.scope

## 类 DefaultScopedObject

- java.lang.Object
- - org.springframework.aop.scope.DefaultScopedObject

- 所有已实现的接口:
    Serializable, RawTargetAccess, ScopedObject

      public class DefaultScopedObject
      extends Object
      implements ScopedObject, Serializable

  Default implementation of the `ScopedObject` 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(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory, String targetBeanName)` Creates a new instance of the `DefaultScopedObject` 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.

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### DefaultScopedObject

          public DefaultScopedObject(org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory,
                                     String targetBeanName)

      Creates a new instance of the `DefaultScopedObject` class.
      参数:
        `beanFactory` - the `ConfigurableBeanFactory` that holds the scoped target object
        `targetBeanName` - 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`