接口 Origin
public interface Origin
Interface that uniquely represents the origin of an item. For example, an item loaded
from a
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.
- 从以下版本开始:
- 2.0.0
- 作者:
- Madhura Bhave, Phillip Webb
- 另请参阅:
-
方法概要
-
方法详细资料
-
getParent
Return the parent origin for this instance if there is one. The parent origin provides the origin of the item that created this one.- 返回:
- the parent origin or
null
- 从以下版本开始:
- 2.4.0
- 另请参阅:
-
from
Find theOrigin
that an object originated from. Checks if the source object is anOrigin
orOriginProvider
and also searches exception stacks.- 参数:
source
- the source object ornull
- 返回:
- an optional
Origin
-
parentsFrom
Find the parents of theOrigin
that an object originated from. Checks if the source object is anOrigin
orOriginProvider
and also searches exception stacks. Provides a list of all parents up to rootOrigin
, starting with the most immediate parent.- 参数:
source
- the source object ornull
- 返回:
- a list of parents or an empty list if the source is
null
, has no origin, or no parent - 从以下版本开始:
- 2.4.0
-