public interface Origin
File
may have an origin made up of the file name along with line/column
numbers.
Implementations must provide sensible hashCode()
, equals(...)
and
#toString()
implementations.
OriginProvider
,
TextResourceOrigin
Modifier and Type | Method and Description |
---|---|
static Origin |
from(java.lang.Object source)
Find the
Origin that an object originated from. |
default Origin |
getParent()
Return the parent origin for this instance if there is one.
|
static java.util.List<Origin> |
parentsFrom(java.lang.Object source)
Find the parents of the
Origin that an object originated from. |
default Origin getParent()
null
parentsFrom(Object)
static Origin from(java.lang.Object source)
Origin
that an object originated from. Checks if the source object
is an Origin
or OriginProvider
and also searches exception stacks.source
- the source object or null
Origin
static java.util.List<Origin> parentsFrom(java.lang.Object source)
Origin
that an object originated from. Checks if
the source object is an Origin
or OriginProvider
and also searches
exception stacks. Provides a list of all parents up to root Origin
,
starting with the most immediate parent.source
- the source object or null
null
, has no
origin, or no parent