Class TextResourceOrigin
java.lang.Object
org.springframework.boot.origin.TextResourceOrigin
- All Implemented Interfaces:
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.- Since:
- 2.0.0
- Author:
- Madhura Bhave, Phillip Webb
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA location (line and column number) within the resource. -
Constructor Summary
ConstructorsConstructorDescriptionTextResourceOrigin(@Nullable Resource resource, @Nullable TextResourceOrigin.Location location) -
Method Summary
Modifier and TypeMethodDescriptionboolean@Nullable TextResourceOrigin.LocationReturn the location of the property within the source (if known).@Nullable OriginReturn the parent origin for this instance if there is one.@Nullable ResourceReturn the resource where the property originated.inthashCode()toString()
-
Constructor Details
-
TextResourceOrigin
public TextResourceOrigin(@Nullable Resource resource, @Nullable TextResourceOrigin.Location location)
-
-
Method Details
-
getResource
Return the resource where the property originated.- Returns:
- the text resource or
null
-
getLocation
Return the location of the property within the source (if known).- Returns:
- the location or
null
-
getParent
-
equals
-
hashCode
-
toString
-