public class CompletionParameterTypeInferencePolicy extends ProcessCandidateParameterTypeInferencePolicy
| Modifier and Type | Field and Description |
|---|---|
static CompletionParameterTypeInferencePolicy |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
PsiType |
adjustInferredType(PsiManager manager,
PsiType guess,
ConstraintType constraintType) |
PsiType |
getDefaultExpectedType(PsiCallExpression methodCall) |
Pair<PsiType,ConstraintType> |
getInferredTypeWithNoConstraint(PsiManager psiManager,
PsiType superType) |
boolean |
inferLowerBoundForFreshVariables()
For infinite type declarations, like
Foo<T extends Foo<T>>, inference introduces fake fresh "fixed" type parameters. |
boolean |
inferRuntimeExceptionForThrownBoundWithNoConstraints() |
boolean |
isVarargsIgnored() |
boolean |
requestForBoxingExplicitly()
Workaround for inference < 1.8.
|
getExpressions, getResults, getSubstitutor, inferConstraint, inferTypeConstraintFromCallContextpublic static final CompletionParameterTypeInferencePolicy INSTANCE
public PsiType getDefaultExpectedType(PsiCallExpression methodCall)
getDefaultExpectedType in class DefaultParameterTypeInferencePolicypublic Pair<PsiType,ConstraintType> getInferredTypeWithNoConstraint(PsiManager psiManager, PsiType superType)
getInferredTypeWithNoConstraint in class DefaultParameterTypeInferencePolicypublic boolean inferRuntimeExceptionForThrownBoundWithNoConstraints()
inferRuntimeExceptionForThrownBoundWithNoConstraints in class ParameterTypeInferencePolicypublic PsiType adjustInferredType(PsiManager manager, PsiType guess, ConstraintType constraintType)
adjustInferredType in class DefaultParameterTypeInferencePolicypublic boolean isVarargsIgnored()
isVarargsIgnored in class ParameterTypeInferencePolicypublic boolean inferLowerBoundForFreshVariables()
ParameterTypeInferencePolicyFoo<T extends Foo<T>>, inference introduces fake fresh "fixed" type parameters.
These fresh parameters respect constraints, created during inference session. For completion, it makes sense to define lower bounds
even if no appropriate constraints were detected, as probably the corresponding argument is currently completed.inferLowerBoundForFreshVariables in class ParameterTypeInferencePolicypublic boolean requestForBoxingExplicitly()
ParameterTypeInferencePolicyJavaMethodCallElement.setInferenceSubstitutorFromExpectedType(com.intellij.psi.PsiElement, com.intellij.psi.PsiType),
but should not be used for normal inference due to javac bugrequestForBoxingExplicitly in class ParameterTypeInferencePolicy