org.springframework.boot.origin

Class 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.
    Since:
    2.0.0
    Author:
    Madhura Bhave, Phillip Webb
    • Method Detail

      • getResource

        public 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object