本文整理汇总了Java中com.intellij.util.ObjectUtil.NULL属性的典型用法代码示例。如果您正苦于以下问题:Java ObjectUtil.NULL属性的具体用法?Java ObjectUtil.NULL怎么用?Java ObjectUtil.NULL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.util.ObjectUtil
的用法示例。
在下文中一共展示了ObjectUtil.NULL属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getData
@Override
@SuppressWarnings("unchecked")
public <T> T getData(@Nonnull Key<T> dataId) {
int currentEventCount = IdeEventQueue.getInstance().getEventCount();
if (myEventCount != -1 && myEventCount != currentEventCount) {
LOG.error("cannot share data context between Swing events; initial event count = " + myEventCount + "; current event count = " + currentEventCount);
return doGetData(dataId);
}
if (ourSafeKeys.contains(dataId)) {
Object answer = myCachedData.get(dataId);
if (answer == null) {
answer = doGetData(dataId);
myCachedData.put(dataId, answer == null ? ObjectUtil.NULL : answer);
}
return answer != ObjectUtil.NULL ? (T)answer : null;
}
else {
return doGetData(dataId);
}
}
示例2: findPackage
@RequiredReadAction
@Nullable
@Override
public PsiPackage findPackage(@Nonnull String qualifiedName, @Nonnull Class<? extends ModuleExtension> extensionClass) {
ConcurrentMap<String, Object> map = myPackageCache.get(extensionClass);
if (map != null) {
final Object value = map.get(qualifiedName);
// if we processed - but not found package
if (value == ObjectUtil.NULL) {
return null;
}
else if (value != null) {
return (PsiPackage)value;
}
}
PsiPackage newPackage = createPackage(qualifiedName, extensionClass);
Object valueForInsert = ObjectUtil.notNull(newPackage, ObjectUtil.NULL);
myPackageCache.computeIfAbsent(extensionClass, aClass -> ContainerUtil.newConcurrentMap()).putIfAbsent(qualifiedName, valueForInsert);
return newPackage;
}
示例3: findExtensionMethodGroupByName
@RequiredReadAction
@Nullable
@Override
@SuppressWarnings("unchecked")
public CSharpElementGroup<CSharpMethodDeclaration> findExtensionMethodGroupByName(@NotNull String name)
{
Object o = myExtensionGroups.get(name);
return o == ObjectUtil.NULL ? null : (CSharpElementGroup<CSharpMethodDeclaration>) o;
}
示例4: findCompositeType
@RequiredReadAction
@Nullable
public static CSharpCompositeTypeDeclaration findCompositeType(@NotNull CSharpTypeDeclaration parent)
{
Object cachedValue = CachedValuesManager.getCachedValue(parent, () -> CachedValueProvider.Result.create(findCompositeTypeImpl(parent), PsiModificationTracker
.OUT_OF_CODE_BLOCK_MODIFICATION_COUNT));
return cachedValue == ObjectUtil.NULL ? null : (CSharpCompositeTypeDeclaration) cachedValue;
}
示例5: getValue
@Nullable
public final T getValue(H h) {
T data = h.getUserData(this);
if (data == null) {
data = myFunction.fun(h);
h.putUserData(this, data == null ? (T)ObjectUtil.NULL : data);
}
return data == ObjectUtil.NULL ? null : data;
}
示例6: canNavigateToTypeSource
@Override
public boolean canNavigateToTypeSource()
{
return myTypeProxy != ObjectUtil.NULL;
}