站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

Location (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.beans.factory.parsing
Class Location

java.lang.Object
  extended by 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.

Since:
2.0
Author:
Rob Harrop

Constructor Summary
Location(Resource resource)
          Create a new instance of the Location class.
Location(Resource resource, Object source)
          Create a new instance of the Location class.
 
Method Summary
 Resource getResource()
          Get the resource with which this location is associated.
 Object getSource()
          Get the actual location within the associated resource (may be null).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Location

public Location(Resource resource)
Create a new instance of the Location class.

Parameters:
resource - the resource with which this location is associated

Location

public Location(Resource resource,
                Object source)
Create a new instance of the Location class.

Parameters:
resource - the resource with which this location is associated
source - the actual location within the associated resource (may be null)
Method Detail

getResource

public Resource getResource()
Get the resource with which this location is associated.


getSource

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.


The Spring Framework

Copyright © 2002-2007 The Spring Framework.