类 TextResourceOrigin
- java.lang.Object
- org.springframework.boot.origin.TextResourceOrigin
- 所有已实现的接口:
Origin
public class TextResourceOrigin extends Object implements Origin
Origin
for an item loaded from a text resource. Provides access to the originalResource
that loaded the text and aTextResourceOrigin.Location
within it.- 从以下版本开始:
- 2.0.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
TextResourceOrigin.Location
A location (line and column number) within the resource.
构造器概要
构造器 构造器 说明 TextResourceOrigin(org.springframework.core.io.Resource resource, TextResourceOrigin.Location location)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object obj)
TextResourceOrigin.Location
getLocation()
Return the location of the property within the source (if known).org.springframework.core.io.Resource
getResource()
Return the resource where the property originated.int
hashCode()
String
toString()
构造器详细资料
TextResourceOrigin
public TextResourceOrigin(org.springframework.core.io.Resource resource, TextResourceOrigin.Location location)
方法详细资料
getResource
public org.springframework.core.io.Resource getResource()
Return the resource where the property originated.- 返回:
- the text resource or
null
getLocation
public TextResourceOrigin.Location getLocation()
Return the location of the property within the source (if known).- 返回:
- the location or
null