org.springframework.beans.factory.parsing

## 接口 SourceExtractor

- 所有已知实现类:
    NullSourceExtractor, PassThroughSourceExtractor
  函数接口:
    这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

      @FunctionalInterface
      public interface SourceExtractor

  Simple strategy allowing tools to control how source metadata is attached to the bean definition metadata.

  Configuration parsers may provide the ability to attach source metadata during the parse phase. They will offer this metadata in a generic format which can be further modified by a `SourceExtractor` before being attached to the bean definition metadata.

  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller
  另请参阅:
    `BeanMetadataElement.getSource()`, `BeanDefinition`

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `Object` | `extractSource(Object sourceCandidate, org.springframework.core.io.Resource definingResource)` Extract the source metadata from the candidate object supplied by the configuration parser.

- - ### 方法详细资料

    - #### extractSource

          @Nullable
          Object extractSource(Object sourceCandidate,
                                          @Nullable
                                          org.springframework.core.io.Resource definingResource)

      Extract the source metadata from the candidate object supplied by the configuration parser.
      参数:
        `sourceCandidate` - the original source metadata (never `null`)
        `definingResource` - the resource that defines the given source object (may be `null`)
      返回:
        the source metadata object to store (may be `null`)