public final class CachedValuesManagerImpl extends CachedValuesManager
Constructor and Description |
---|
CachedValuesManagerImpl(Project project) |
CachedValuesManagerImpl(Project project,
CachedValuesFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
clearCachedValues() |
<T> CachedValue<T> |
createCachedValue(CachedValueProvider<T> provider,
boolean trackValue)
Creates new CachedValue instance with given provider.
|
<T,P> ParameterizedCachedValue<T,P> |
createParameterizedCachedValue(ParameterizedCachedValueProvider<T,P> provider,
boolean trackValue) |
<T> T |
getCachedValue(UserDataHolder dataHolder,
Key<CachedValue<T>> key,
CachedValueProvider<T> provider,
boolean trackValue)
Utility method storing created cached values in a
UserDataHolder . |
protected void |
trackKeyHolder(UserDataHolder dataHolder,
Key<?> key) |
createCachedValue, getCachedValue, getCachedValue, getCachedValue, getKeyForClass, getManager, getParameterizedCachedValue
public CachedValuesManagerImpl(Project project)
public CachedValuesManagerImpl(Project project, CachedValuesFactory factory)
public <T> CachedValue<T> createCachedValue(CachedValueProvider<T> provider, boolean trackValue)
CachedValuesManager
CachedValueProvider.Result.getDependencyItems()
for
the details.createCachedValue
in class CachedValuesManager
provider
- computes values.trackValue
- if value tracking is required. T should be trackable in this case.public <T,P> ParameterizedCachedValue<T,P> createParameterizedCachedValue(ParameterizedCachedValueProvider<T,P> provider, boolean trackValue)
createParameterizedCachedValue
in class CachedValuesManager
public <T> T getCachedValue(UserDataHolder dataHolder, Key<CachedValue<T>> key, CachedValueProvider<T> provider, boolean trackValue)
CachedValuesManager
UserDataHolder
.
The passed cached value provider may only depend on the passed user data holder and longer-living system state (e.g. project/application components/services),
see CachedValue
documentation for more details.getCachedValue
in class CachedValuesManager
dataHolder
- holder to store the cached value, e.g. a PsiElement.key
- key to store the cached value.provider
- provider creating the cached value.trackValue
- if value tracking is required (T should be trackable in that case). See CachedValuesManager.createCachedValue(CachedValueProvider, boolean)
for more details.protected void trackKeyHolder(UserDataHolder dataHolder, Key<?> key)
trackKeyHolder
in class CachedValuesManager
public void clearCachedValues()