Returns any comments that appeared to "go with" this place in the file.
Returns any comments that appeared to "go with" this place in the file. Often an empty list, but never null. The details of this are subject to change, but at the moment comments that are immediately before an array element or object field, with no blank line after the comment, "go with" that element or field.
any comments that seemed to "go with" this origin, empty list if none
Returns a string describing the origin of a value or exception.
Returns a string describing the origin of a value or exception. This will never return null.
string describing the origin
Returns a filename describing the origin.
Returns a filename describing the origin. This will return null if the origin was not a file.
filename of the origin or null
Returns a line number where the value or exception originated.
Returns a line number where the value or exception originated. This will return -1 if there's no meaningful line number.
line number or -1 if none is available
Returns a classpath resource name describing the origin.
Returns a classpath resource name describing the origin. This will return null if the origin was not a classpath resource.
resource name of the origin or null
Returns a URL describing the origin.
Returns a URL describing the origin. This will return null if the origin has no meaningful URL.
url of the origin or null
Returns a ConfigOrigin
based on this one, but with the given
comments.
Returns a ConfigOrigin
based on this one, but with the given
comments. Does not modify this instance or any ConfigValue
s with
this origin (since they are immutable). To set the returned origin to a
ConfigValue
, use ConfigValue#withOrigin
.
Note that when the given comments are equal to the comments on this object,
a new instance may not be created and this
is returned directly.
the comments used on the returned origin
the ConfigOrigin with the given comments
1.3.0
Returns a ConfigOrigin
based on this one, but with the given
line number.
Returns a ConfigOrigin
based on this one, but with the given
line number. This origin must be a FILE, URL or RESOURCE. Does not modify
this instance or any ConfigValue
s with this origin (since they are
immutable). To set the returned origin to a ConfigValue
, use
ConfigValue#withOrigin
.
Note that when the given lineNumber are equal to the lineNumber on this
object, a new instance may not be created and this
is returned
directly.
the new line number
the created ConfigOrigin
1.3.0