public interface ISourceElementInfo
ISourceElement
.
Those structure and properties correlate with a source snapshot.Modifier and Type | Method and Description |
---|---|
<T> T |
get(Property<T> property)
Returns the cached value for the given property, or
null
if no value is set. |
ISourceConstruct[] |
getChildren()
Returns the cached immediate children of the source element.
|
TextRange |
getFullRange()
Returns the text range of the whole element, or
null if none. |
TextRange |
getIdentifyingRange()
Returns the text range of the element's identifier, or
null
if none. |
ISnapshot |
getSnapshot()
Returns the source snapshot on which this object is based,
or
null if the element has no associated source code
or if the snapshot is unknown. |
ISnapshot getSnapshot()
null
if the element has no associated source code
or if the snapshot is unknown.null
if the element has no associated source code
or if the snapshot is unknown<T> T get(Property<T> property)
null
if no value is set.
To find the value to which the given property object is mapped, implementations of this method may use an identity-based lookup, name-based lookup, or anything in-between. Clients need to use unique property instances with unique names for unambiguous identification of a mapping.
Note that the result correlates to a source snapshot
(if there is one) and may be inconsistent with the current
source contents.
property
- a source element's property (not null
)null
if no value is set. Clients must not modify the returned value
even if mutation is technically possible (e.g., for a non-empty array).ISourceConstruct[] getChildren()
Note that the result correlates to a source snapshot
(if there is one) and may be inconsistent with the current
source contents.
null
). Clients must not modify
the returned array.TextRange getFullRange()
null
if none.
Note that the result correlates to a source snapshot
(if there is one) and may be inconsistent with the current
source contents.
null
if noneTextRange getIdentifyingRange()
null
if none.
Note that the result correlates to a source snapshot
(if there is one) and may be inconsistent with the current
source contents.
null
if noneCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0