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 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
See Also:
  • Constructor Details

  • Method Details

    • 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
    • getParent

      public Origin getParent()
      Description copied from interface: Origin
      Return the parent origin for this instance if there is one. The parent origin provides the origin of the item that created this one.
      Specified by:
      getParent in interface Origin
      Returns:
      the parent origin or null
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object