Package org.springframework.boot.origin
Class TextResourceOrigin
- java.lang.Object
- org.springframework.boot.origin.TextResourceOrigin
- All Implemented Interfaces:
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.- Since:
- 2.0.0
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextResourceOrigin.Location
A location (line and column number) within the resource.
Constructor Summary
Constructors Constructor Description TextResourceOrigin(org.springframework.core.io.Resource resource, TextResourceOrigin.Location location)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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()
Constructor Detail
TextResourceOrigin
public TextResourceOrigin(org.springframework.core.io.Resource resource, TextResourceOrigin.Location location)
Method Detail
getResource
public org.springframework.core.io.Resource getResource()
Return the resource where the property originated.- Returns:
- the text resource or
null
getLocation
public TextResourceOrigin.Location getLocation()
Return the location of the property within the source (if known).- Returns:
- the location or
null