public class PsiDiamondTypeUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
areTypeArgumentsRedundant(PsiType[] typeArguments,
PsiExpression context,
boolean constructorRef,
PsiMethod method,
PsiTypeParameter[] typeParameters) |
static boolean |
canChangeContextForDiamond(PsiNewExpression expression,
PsiType expectedType) |
static boolean |
canCollapseToDiamond(PsiNewExpression expression,
PsiNewExpression context,
PsiType expectedType) |
static PsiElement |
createExplicitReplacement(PsiElement psiElement) |
static PsiExpression |
expandTopLevelDiamondsInside(PsiExpression expr) |
static java.lang.String |
getCollapsedType(PsiType type,
PsiElement context) |
static PsiElement |
replaceDiamondWithExplicitTypes(PsiElement element) |
static PsiElement |
replaceExplicitWithDiamond(PsiElement psiElement)
Deprecated.
please use
RemoveRedundantTypeArgumentsUtil.replaceExplicitWithDiamond(PsiElement)
To be deleted in 2019.3 |
public static boolean canCollapseToDiamond(PsiNewExpression expression, PsiNewExpression context, PsiType expectedType)
public static boolean canChangeContextForDiamond(PsiNewExpression expression, PsiType expectedType)
@Deprecated public static PsiElement replaceExplicitWithDiamond(PsiElement psiElement)
RemoveRedundantTypeArgumentsUtil.replaceExplicitWithDiamond(PsiElement)
To be deleted in 2019.3public static PsiElement createExplicitReplacement(PsiElement psiElement)
public static PsiElement replaceDiamondWithExplicitTypes(PsiElement element)
public static PsiExpression expandTopLevelDiamondsInside(PsiExpression expr)
public static java.lang.String getCollapsedType(PsiType type, PsiElement context)
public static boolean areTypeArgumentsRedundant(PsiType[] typeArguments, PsiExpression context, boolean constructorRef, PsiMethod method, PsiTypeParameter[] typeParameters)