summaryrefslogtreecommitdiff
path: root/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-18 20:40:22 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-18 20:40:22 +0000
commit07d35c37ce79a64bdd905b394d40fc9bbb18fa60 (patch)
treee8787c45e494dfcc558faf0f75956f8785c39b94 /platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java
parente222a9e1e66670a56e926a6b0f3e10231eeeb1fb (diff)
parentb5fb31ef6a38f19404859755dbd2e345215b97bf (diff)
downloadidea-07d35c37ce79a64bdd905b394d40fc9bbb18fa60.tar.gz
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java')
-rw-r--r--platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java b/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java
index a8a82bed411a..4c7c12d79906 100644
--- a/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java
+++ b/platform/core-api/src/com/intellij/psi/util/CachedValuesManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 JetBrains s.r.o.
+ * Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -42,9 +42,12 @@ public abstract class CachedValuesManager {
* @param trackValue if value tracking required. T should be trackable in this case.
* @return new CachedValue instance.
*/
+ @NotNull
public abstract <T> CachedValue<T> createCachedValue(@NotNull CachedValueProvider<T> provider, boolean trackValue);
+ @NotNull
public abstract <T,P> ParameterizedCachedValue<T,P> createParameterizedCachedValue(@NotNull ParameterizedCachedValueProvider<T,P> provider, boolean trackValue);
+ @NotNull
public <T> CachedValue<T> createCachedValue(@NotNull CachedValueProvider<T> provider) {
return createCachedValue(provider, true);
}
@@ -54,7 +57,6 @@ public abstract class CachedValuesManager {
@NotNull ParameterizedCachedValueProvider<T, P> provider,
boolean trackValue,
P parameter) {
-
ParameterizedCachedValue<T,P> value;
if (dataHolder instanceof UserDataHolderEx) {
@@ -100,6 +102,7 @@ public abstract class CachedValuesManager {
}
private final ConcurrentMap<String, Key<CachedValue>> keyForProvider = new ConcurrentHashMap<String, Key<CachedValue>>();
+ @NotNull
public <T> Key<CachedValue<T>> getKeyForClass(@NotNull Class<?> providerClass) {
String name = providerClass.getName();
assert name != null : providerClass + " doesn't have a name; can't be used for cache value provider";