|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jetbrains.jet.lang.types.expressions.ExpressionTypingUtils
public class ExpressionTypingUtils
| Field Summary | |
|---|---|
static JetType |
CANT_INFER_LAMBDA_PARAM_TYPE
|
| Method Summary | |
|---|---|
static java.util.List<CallableDescriptor> |
canFindSuitableCall(FqName callableFQN,
com.intellij.openapi.project.Project project,
JetExpression receiverExpression,
JetType receiverType,
JetScope scope,
ModuleDescriptor module)
Check that function or property with the given qualified name can be resolved in given scope and called on given receiver |
static void |
checkCapturingInClosure(JetSimpleNameExpression expression,
BindingTrace trace,
JetScope scope)
|
static boolean |
checkIsExtensionCallable(ReceiverValue receiverArgument,
CallableDescriptor callableDescriptor)
|
static void |
checkVariableShadowing(ExpressionTypingContext context,
VariableDescriptor variableDescriptor,
VariableDescriptor oldDescriptor)
|
static JetExpression |
createFakeExpressionOfType(com.intellij.openapi.project.Project project,
BindingTrace trace,
java.lang.String argumentName,
JetType argumentType)
|
static void |
defineLocalVariablesFromMultiDeclaration(WritableScope writableScope,
JetMultiDeclaration multiDeclaration,
ReceiverValue receiver,
JetExpression reportErrorsOn,
ExpressionTypingContext context)
|
static boolean |
ensureBooleanResult(JetExpression operationSign,
Name name,
JetType resultType,
ExpressionTypingContext context)
|
static boolean |
ensureBooleanResultWithCustomSubject(JetExpression operationSign,
JetType resultType,
java.lang.String subjectName,
ExpressionTypingContext context)
|
static JetType |
getDefaultType(com.intellij.psi.tree.IElementType constantType)
|
protected static ExpressionReceiver |
getExpressionReceiver(ExpressionTypingFacade facade,
JetExpression expression,
ExpressionTypingContext context)
|
protected static ExpressionReceiver |
getExpressionReceiver(JetExpression expression,
JetType type)
|
static JetTypeInfo |
getTypeInfoOrNullType(JetExpression expression,
ExpressionTypingContext context,
org.jetbrains.jet.lang.types.expressions.ExpressionTypingInternals facade)
|
static boolean |
isBoolean(JetType type)
|
static boolean |
isTypeFlexible(JetExpression expression)
|
static boolean |
isVariableIterable(ExpressionTypingServices expressionTypingServices,
com.intellij.openapi.project.Project project,
VariableDescriptor variableDescriptor,
JetScope scope)
|
static com.intellij.openapi.util.Pair<Call,OverloadResolutionResults<FunctionDescriptor>> |
makeAndResolveFakeCall(ReceiverValue receiver,
ExpressionTypingContext context,
java.util.List<JetExpression> valueArguments,
Name name)
|
static ObservableBindingTrace |
makeTraceInterceptingTypeMismatch(BindingTrace trace,
JetElement expressionToWatch,
boolean[] mismatchFound)
|
static WritableScopeImpl |
newWritableScopeImpl(ExpressionTypingContext context,
java.lang.String scopeDebugName)
|
static OverloadResolutionResults<FunctionDescriptor> |
resolveFakeCall(ExpressionTypingContext context,
ReceiverValue receiver,
Name name)
|
static OverloadResolutionResults<FunctionDescriptor> |
resolveFakeCall(ExpressionTypingContext context,
ReceiverValue receiver,
Name name,
JetType... argumentTypes)
|
protected static ExpressionReceiver |
safeGetExpressionReceiver(ExpressionTypingFacade facade,
JetExpression expression,
ExpressionTypingContext context)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final JetType CANT_INFER_LAMBDA_PARAM_TYPE
| Method Detail |
|---|
@Nullable
protected static ExpressionReceiver getExpressionReceiver(@NotNull
JetExpression expression,
@Nullable
JetType type)
@Nullable
protected static ExpressionReceiver getExpressionReceiver(@NotNull
ExpressionTypingFacade facade,
@NotNull
JetExpression expression,
ExpressionTypingContext context)
@NotNull
protected static ExpressionReceiver safeGetExpressionReceiver(@NotNull
ExpressionTypingFacade facade,
@NotNull
JetExpression expression,
ExpressionTypingContext context)
@NotNull
public static WritableScopeImpl newWritableScopeImpl(ExpressionTypingContext context,
@NotNull
java.lang.String scopeDebugName)
public static boolean isBoolean(@NotNull
JetType type)
public static boolean ensureBooleanResult(JetExpression operationSign,
Name name,
JetType resultType,
ExpressionTypingContext context)
public static boolean ensureBooleanResultWithCustomSubject(JetExpression operationSign,
JetType resultType,
java.lang.String subjectName,
ExpressionTypingContext context)
@NotNull public static JetType getDefaultType(com.intellij.psi.tree.IElementType constantType)
public static boolean isTypeFlexible(@Nullable
JetExpression expression)
public static void checkCapturingInClosure(JetSimpleNameExpression expression,
BindingTrace trace,
JetScope scope)
public static boolean isVariableIterable(@NotNull
ExpressionTypingServices expressionTypingServices,
@NotNull
com.intellij.openapi.project.Project project,
@NotNull
VariableDescriptor variableDescriptor,
@NotNull
JetScope scope)
public static java.util.List<CallableDescriptor> canFindSuitableCall(@NotNull
FqName callableFQN,
@NotNull
com.intellij.openapi.project.Project project,
@NotNull
JetExpression receiverExpression,
@NotNull
JetType receiverType,
@NotNull
JetScope scope,
@NotNull
ModuleDescriptor module)
callableFQN - project - scope -
public static boolean checkIsExtensionCallable(@NotNull
ReceiverValue receiverArgument,
@NotNull
CallableDescriptor callableDescriptor)
@NotNull
public static OverloadResolutionResults<FunctionDescriptor> resolveFakeCall(@NotNull
ExpressionTypingContext context,
@NotNull
ReceiverValue receiver,
@NotNull
Name name,
@NotNull
JetType... argumentTypes)
public static JetExpression createFakeExpressionOfType(@NotNull
com.intellij.openapi.project.Project project,
@NotNull
BindingTrace trace,
@NotNull
java.lang.String argumentName,
@NotNull
JetType argumentType)
@NotNull
public static OverloadResolutionResults<FunctionDescriptor> resolveFakeCall(@NotNull
ExpressionTypingContext context,
@NotNull
ReceiverValue receiver,
@NotNull
Name name)
@NotNull
public static com.intellij.openapi.util.Pair<Call,OverloadResolutionResults<FunctionDescriptor>> makeAndResolveFakeCall(@NotNull
ReceiverValue receiver,
@NotNull
ExpressionTypingContext context,
@NotNull
java.util.List<JetExpression> valueArguments,
@NotNull
Name name)
public static void defineLocalVariablesFromMultiDeclaration(@NotNull
WritableScope writableScope,
@NotNull
JetMultiDeclaration multiDeclaration,
@NotNull
ReceiverValue receiver,
@NotNull
JetExpression reportErrorsOn,
@NotNull
ExpressionTypingContext context)
public static void checkVariableShadowing(@NotNull
ExpressionTypingContext context,
@NotNull
VariableDescriptor variableDescriptor,
VariableDescriptor oldDescriptor)
public static ObservableBindingTrace makeTraceInterceptingTypeMismatch(@NotNull
BindingTrace trace,
@NotNull
JetElement expressionToWatch,
@NotNull
boolean[] mismatchFound)
@NotNull
public static JetTypeInfo getTypeInfoOrNullType(@Nullable
JetExpression expression,
@NotNull
ExpressionTypingContext context,
@NotNull
org.jetbrains.jet.lang.types.expressions.ExpressionTypingInternals facade)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||