public class TextResourceOrigin extends java.lang.Object implements Origin
Origin
for an item loaded from a text resource. Provides access to the original
Resource
that loaded the text and a TextResourceOrigin.Location
within it. If the provided
resource provides an Origin
(e.g. it is an OriginTrackedResource
), then
it will be used as the origin parent
.OriginTrackedResource
Modifier and Type | Class and Description |
---|---|
static class |
TextResourceOrigin.Location
A location (line and column number) within the resource.
|
Constructor and Description |
---|
TextResourceOrigin(org.springframework.core.io.Resource resource,
TextResourceOrigin.Location location) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
TextResourceOrigin.Location |
getLocation()
Return the location of the property within the source (if known).
|
Origin |
getParent()
Return the parent origin for this instance if there is one.
|
org.springframework.core.io.Resource |
getResource()
Return the resource where the property originated.
|
int |
hashCode() |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
from, parentsFrom
public TextResourceOrigin(org.springframework.core.io.Resource resource, TextResourceOrigin.Location location)
public org.springframework.core.io.Resource getResource()
null
public TextResourceOrigin.Location getLocation()
null
public Origin getParent()
Origin
getParent
in interface Origin
null
Origin.parentsFrom(Object)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object