本文整理汇总了Java中com.intellij.psi.impl.light.LightTypeElement类的典型用法代码示例。如果您正苦于以下问题:Java LightTypeElement类的具体用法?Java LightTypeElement怎么用?Java LightTypeElement使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LightTypeElement类属于com.intellij.psi.impl.light包,在下文中一共展示了LightTypeElement类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: substituteReturnType
import com.intellij.psi.impl.light.LightTypeElement; //导入依赖的package包/类
private static void substituteReturnType(@NotNull PsiManager manager,
@NotNull PsiMethod method,
@Nullable PsiType returnType,
@NotNull PsiSubstitutor substitutor) {
final PsiTypeElement returnTypeElement = method.getReturnTypeElement();
if (returnTypeElement == null || returnType == null) {
return;
}
final PsiType substitutedReturnType = substituteType(substitutor, returnType, method);
returnTypeElement.replace(new LightTypeElement(manager, substitutedReturnType instanceof PsiWildcardType ? TypeConversionUtil.erasure(substitutedReturnType) : substitutedReturnType));
}
示例2: createTypeElement
import com.intellij.psi.impl.light.LightTypeElement; //导入依赖的package包/类
@NotNull
@Override
public PsiTypeElement createTypeElement(@NotNull final PsiType psiType)
{
final LightTypeElement element = new LightTypeElement(myManager, psiType);
CodeEditUtil.setNodeGenerated(element.getNode(), true);
return element;
}
示例3: substituteReturnType
import com.intellij.psi.impl.light.LightTypeElement; //导入依赖的package包/类
private static void substituteReturnType(@NotNull PsiManager manager, @NotNull PsiMethod method, @Nullable PsiType returnType, @NotNull PsiSubstitutor substitutor)
{
final PsiTypeElement returnTypeElement = method.getReturnTypeElement();
if(returnTypeElement == null || returnType == null)
{
return;
}
final PsiType substitutedReturnType = substituteType(substitutor, returnType, method);
returnTypeElement.replace(new LightTypeElement(manager, substitutedReturnType instanceof PsiWildcardType ? TypeConversionUtil.erasure(substitutedReturnType) : substitutedReturnType));
}