org.springframework.beans.factory.parsing

## 类 Location

- java.lang.Object
- - org.springframework.beans.factory.parsing.Location

-     public class Location
      extends Object

  Class that models an arbitrary location in a `resource`.

  Typically used to track the location of problematic or erroneous metadata in XML configuration files. For example, a `source` location might be 'The bean defined on line 76 of beans.properties has an invalid Class'; another source might be the actual DOM Element from a parsed XML `Document`; or the source object might simply be `null`.

  从以下版本开始:
    2.0
  作者:
    Rob Harrop

- - ### 构造器概要

    构造器
    构造器和说明
    `Location(org.springframework.core.io.Resource resource)` Create a new instance of the `Location` class.
    `Location(org.springframework.core.io.Resource resource, Object source)` Create a new instance of the `Location` class.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `org.springframework.core.io.Resource` | `getResource()` Get the resource with which this location is associated.
    `Object` | `getSource()` Get the actual location within the associated `resource` (may be `null`).

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

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

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

    - #### Location

          public Location(org.springframework.core.io.Resource resource)

      Create a new instance of the `Location` class.
      参数:
        `resource` - the resource with which this location is associated

    - #### Location

          public Location(org.springframework.core.io.Resource resource,
                          @Nullable
                          Object source)

      Create a new instance of the `Location` class.
      参数:
        `resource` - the resource with which this location is associated
        `source` - the actual location within the associated resource (may be `null`)

  - ### 方法详细资料

    - #### getResource

          public org.springframework.core.io.Resource getResource()

      Get the resource with which this location is associated.

    - #### getSource

          @Nullable
          public Object getSource()

      Get the actual location within the associated `resource` (may be `null`).

      See the `class level javadoc for this class` for examples of what the actual type of the returned object may be.