本文整理汇总了Java中com.intellij.openapi.util.VolatileNullableLazyValue类的典型用法代码示例。如果您正苦于以下问题:Java VolatileNullableLazyValue类的具体用法?Java VolatileNullableLazyValue怎么用?Java VolatileNullableLazyValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VolatileNullableLazyValue类属于com.intellij.openapi.util包,在下文中一共展示了VolatileNullableLazyValue类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ExpectedTypeInfoImpl
import com.intellij.openapi.util.VolatileNullableLazyValue; //导入依赖的package包/类
public ExpectedTypeInfoImpl(@NotNull PsiType type,
@Type int kind,
@NotNull PsiType defaultType,
@NotNull TailType myTailType,
PsiMethod calledMethod,
@NotNull NullableComputable<String> expectedName) {
this.type = type;
this.kind = kind;
this.myTailType = myTailType;
this.defaultType = defaultType;
myCalledMethod = calledMethod;
this.expectedNameComputable = expectedName;
expectedNameLazyValue = new VolatileNullableLazyValue<String>() {
@Nullable
@Override
protected String compute() {
return expectedNameComputable.compute();
}
};
PsiUtil.ensureValidType(type);
PsiUtil.ensureValidType(defaultType);
}
示例2: ClsTypeElementImpl
import com.intellij.openapi.util.VolatileNullableLazyValue; //导入依赖的package包/类
public ClsTypeElementImpl(@NotNull PsiElement parent, @NotNull String typeText, char variance) {
myParent = parent;
myTypeText = TypeInfo.internFrequentType(typeText);
myVariance = variance;
myChild = new VolatileNullableLazyValue<ClsElementImpl>() {
@Nullable
@Override
protected ClsElementImpl compute() {
return calculateChild();
}
};
myCachedType = new AtomicNotNullLazyValue<PsiType>() {
@NotNull
@Override
protected PsiType compute() {
return calculateType();
}
};
}
示例3: ExpectedTypeInfoImpl
import com.intellij.openapi.util.VolatileNullableLazyValue; //导入依赖的package包/类
public ExpectedTypeInfoImpl(@NotNull PsiType type,
@Type int kind,
@NotNull PsiType defaultType,
@NotNull TailType myTailType,
PsiMethod calledMethod,
@NotNull NullableComputable<String> expectedName)
{
this.type = type;
this.kind = kind;
this.myTailType = myTailType;
this.defaultType = defaultType;
myCalledMethod = calledMethod;
this.expectedNameComputable = expectedName;
expectedNameLazyValue = new VolatileNullableLazyValue<String>()
{
@Nullable
@Override
protected String compute()
{
return expectedNameComputable.compute();
}
};
PsiUtil.ensureValidType(type);
PsiUtil.ensureValidType(defaultType);
}