Added NotNull annotations
This commit is contained in:
+1
@@ -94,6 +94,7 @@ public class BasicCallResolutionContext extends CallResolutionContext<BasicCallR
|
|||||||
dataFlowInfoForArguments, callResolverExtension, isAnnotationContext, collectAllCandidates);
|
dataFlowInfoForArguments, callResolverExtension, isAnnotationContext, collectAllCandidates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public BasicCallResolutionContext replaceCall(@NotNull Call newCall) {
|
public BasicCallResolutionContext replaceCall(@NotNull Call newCall) {
|
||||||
return new BasicCallResolutionContext(
|
return new BasicCallResolutionContext(
|
||||||
trace, scope, newCall, expectedType, dataFlowInfo, contextDependency, checkArguments, resolutionResultsCache,
|
trace, scope, newCall, expectedType, dataFlowInfo, contextDependency, checkArguments, resolutionResultsCache,
|
||||||
|
|||||||
+4
@@ -31,8 +31,11 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
|
|||||||
import org.jetbrains.jet.lang.types.JetType;
|
import org.jetbrains.jet.lang.types.JetType;
|
||||||
|
|
||||||
public final class CallCandidateResolutionContext<D extends CallableDescriptor> extends CallResolutionContext<CallCandidateResolutionContext<D>> {
|
public final class CallCandidateResolutionContext<D extends CallableDescriptor> extends CallResolutionContext<CallCandidateResolutionContext<D>> {
|
||||||
|
@NotNull
|
||||||
public final MutableResolvedCall<D> candidateCall;
|
public final MutableResolvedCall<D> candidateCall;
|
||||||
|
@NotNull
|
||||||
public final TracingStrategy tracing;
|
public final TracingStrategy tracing;
|
||||||
|
@NotNull
|
||||||
public final ReceiverValue explicitExtensionReceiverForInvoke;
|
public final ReceiverValue explicitExtensionReceiverForInvoke;
|
||||||
|
|
||||||
private CallCandidateResolutionContext(
|
private CallCandidateResolutionContext(
|
||||||
@@ -84,6 +87,7 @@ public final class CallCandidateResolutionContext<D extends CallableDescriptor>
|
|||||||
return create(candidateCall, context, trace, tracing, context.call);
|
return create(candidateCall, context, trace, tracing, context.call);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public static <D extends CallableDescriptor> CallCandidateResolutionContext<D> createForCallBeingAnalyzed(
|
public static <D extends CallableDescriptor> CallCandidateResolutionContext<D> createForCallBeingAnalyzed(
|
||||||
@NotNull MutableResolvedCall<D> candidateCall, @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing
|
@NotNull MutableResolvedCall<D> candidateCall, @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing
|
||||||
) {
|
) {
|
||||||
|
|||||||
+2
@@ -28,7 +28,9 @@ import org.jetbrains.jet.lang.resolve.scopes.JetScope;
|
|||||||
import org.jetbrains.jet.lang.types.JetType;
|
import org.jetbrains.jet.lang.types.JetType;
|
||||||
|
|
||||||
public abstract class CallResolutionContext<Context extends CallResolutionContext<Context>> extends ResolutionContext<Context> {
|
public abstract class CallResolutionContext<Context extends CallResolutionContext<Context>> extends ResolutionContext<Context> {
|
||||||
|
@NotNull
|
||||||
public final Call call;
|
public final Call call;
|
||||||
|
@NotNull
|
||||||
public final CheckValueArgumentsMode checkArguments;
|
public final CheckValueArgumentsMode checkArguments;
|
||||||
@NotNull
|
@NotNull
|
||||||
public final MutableDataFlowInfoForArguments dataFlowInfoForArguments;
|
public final MutableDataFlowInfoForArguments dataFlowInfoForArguments;
|
||||||
|
|||||||
+9
@@ -26,14 +26,23 @@ import org.jetbrains.jet.lang.types.JetType;
|
|||||||
import org.jetbrains.jet.lang.types.TypeUtils;
|
import org.jetbrains.jet.lang.types.TypeUtils;
|
||||||
|
|
||||||
public abstract class ResolutionContext<Context extends ResolutionContext<Context>> {
|
public abstract class ResolutionContext<Context extends ResolutionContext<Context>> {
|
||||||
|
@NotNull
|
||||||
public final BindingTrace trace;
|
public final BindingTrace trace;
|
||||||
|
@NotNull
|
||||||
public final JetScope scope;
|
public final JetScope scope;
|
||||||
|
@NotNull
|
||||||
public final JetType expectedType;
|
public final JetType expectedType;
|
||||||
|
@NotNull
|
||||||
public final DataFlowInfo dataFlowInfo;
|
public final DataFlowInfo dataFlowInfo;
|
||||||
|
@NotNull
|
||||||
public final ContextDependency contextDependency;
|
public final ContextDependency contextDependency;
|
||||||
|
@NotNull
|
||||||
public final ResolutionResultsCache resolutionResultsCache;
|
public final ResolutionResultsCache resolutionResultsCache;
|
||||||
|
@NotNull
|
||||||
public final CallResolverExtension callResolverExtension;
|
public final CallResolverExtension callResolverExtension;
|
||||||
|
|
||||||
public final boolean isAnnotationContext;
|
public final boolean isAnnotationContext;
|
||||||
|
|
||||||
public final boolean collectAllCandidates;
|
public final boolean collectAllCandidates;
|
||||||
|
|
||||||
protected ResolutionContext(
|
protected ResolutionContext(
|
||||||
|
|||||||
+1
@@ -47,6 +47,7 @@ public class InferenceErrorData {
|
|||||||
this.expectedType = expectedType;
|
this.expectedType = expectedType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public static InferenceErrorData create(@NotNull CallableDescriptor descriptor, @NotNull ConstraintSystem constraintSystem,
|
public static InferenceErrorData create(@NotNull CallableDescriptor descriptor, @NotNull ConstraintSystem constraintSystem,
|
||||||
@NotNull List<JetType> valueArgumentsTypes, @Nullable JetType receiverArgumentType, @NotNull JetType expectedType) {
|
@NotNull List<JetType> valueArgumentsTypes, @Nullable JetType receiverArgumentType, @NotNull JetType expectedType) {
|
||||||
return new InferenceErrorData(descriptor, constraintSystem, valueArgumentsTypes, receiverArgumentType, expectedType);
|
return new InferenceErrorData(descriptor, constraintSystem, valueArgumentsTypes, receiverArgumentType, expectedType);
|
||||||
|
|||||||
+1
@@ -141,6 +141,7 @@ public class OverloadResolutionResultsImpl<D extends CallableDescriptor> impleme
|
|||||||
return allCandidates;
|
return allCandidates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public OverloadResolutionResultsImpl<D> changeStatusToSuccess() {
|
public OverloadResolutionResultsImpl<D> changeStatusToSuccess() {
|
||||||
if (getResultCode() == Code.SUCCESS) return this;
|
if (getResultCode() == Code.SUCCESS) return this;
|
||||||
|
|
||||||
|
|||||||
+1
@@ -86,5 +86,6 @@ public interface ConstraintSystem {
|
|||||||
@NotNull
|
@NotNull
|
||||||
TypeSubstitutor getCurrentSubstitutor();
|
TypeSubstitutor getCurrentSubstitutor();
|
||||||
|
|
||||||
|
@NotNull
|
||||||
ConstraintSystem copy();
|
ConstraintSystem copy();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user