本文整理匯總了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));
}