T - the type of the cached valuepublic static class CachedValueProvider.Result<T>
extends java.lang.Object
| Constructor and Description |
|---|
Result(T value,
java.lang.Object... dependencyItems)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static <T> CachedValueProvider.Result<T> |
create(T value,
java.util.Collection<?> dependencies)
Creates a result
|
static <T> CachedValueProvider.Result<T> |
create(T value,
java.lang.Object... dependencies)
Creates a result
|
static <T> CachedValueProvider.Result<T> |
createSingleDependency(T value,
java.lang.Object dependency)
Creates a result
|
java.lang.Object [] |
getDependencyItems()
Dependency items are used in cached values to remember the state of the environment as it was when the value was computed
and to compare that to the state of the world when querying
CachedValue.getValue(). |
T |
getValue() |
public Result(T value, java.lang.Object... dependencyItems)
getDependencyItems()public T getValue()
public java.lang.Object [] getDependencyItems()
CachedValue.getValue(). The state is remembered as
a collection of long values representing some time stamps. When changes occur, these stamps are incremented.
Dependencies can be following:
ModificationTracker returning stamps explicitly
Constant fields of PsiModificationTracker class, e.g. PsiModificationTracker.MODIFICATION_COUNT
PsiElement or VirtualFile objects. Such cache would be dropped
on any change in the corresponding file
ModificationTracker,
PsiModificationTracker,
ProjectRootModificationTrackerpublic static <T> CachedValueProvider.Result<T> createSingleDependency(T value, java.lang.Object dependency)
getDependencyItems()public static <T> CachedValueProvider.Result<T> create(T value, java.lang.Object... dependencies)
getDependencyItems()public static <T> CachedValueProvider.Result<T> create(T value, java.util.Collection<?> dependencies)
getDependencyItems()