Added NotNull annotations

This commit is contained in:
Svetlana Isakova
2014-05-04 15:29:06 +04:00
parent 02f5293b3d
commit 06a257025f
7 changed files with 19 additions and 0 deletions
@@ -94,6 +94,7 @@ public class BasicCallResolutionContext extends CallResolutionContext<BasicCallR
dataFlowInfoForArguments, callResolverExtension, isAnnotationContext, collectAllCandidates);
}
@NotNull
public BasicCallResolutionContext replaceCall(@NotNull Call newCall) {
return new BasicCallResolutionContext(
trace, scope, newCall, expectedType, dataFlowInfo, contextDependency, checkArguments, resolutionResultsCache,
@@ -31,8 +31,11 @@ import org.jetbrains.jet.lang.resolve.scopes.receivers.ReceiverValue;
import org.jetbrains.jet.lang.types.JetType;
public final class CallCandidateResolutionContext<D extends CallableDescriptor> extends CallResolutionContext<CallCandidateResolutionContext<D>> {
@NotNull
public final MutableResolvedCall<D> candidateCall;
@NotNull
public final TracingStrategy tracing;
@NotNull
public final ReceiverValue explicitExtensionReceiverForInvoke;
private CallCandidateResolutionContext(
@@ -84,6 +87,7 @@ public final class CallCandidateResolutionContext<D extends CallableDescriptor>
return create(candidateCall, context, trace, tracing, context.call);
}
@NotNull
public static <D extends CallableDescriptor> CallCandidateResolutionContext<D> createForCallBeingAnalyzed(
@NotNull MutableResolvedCall<D> candidateCall, @NotNull BasicCallResolutionContext context, @NotNull TracingStrategy tracing
) {
@@ -28,7 +28,9 @@ import org.jetbrains.jet.lang.resolve.scopes.JetScope;
import org.jetbrains.jet.lang.types.JetType;
public abstract class CallResolutionContext<Context extends CallResolutionContext<Context>> extends ResolutionContext<Context> {
@NotNull
public final Call call;
@NotNull
public final CheckValueArgumentsMode checkArguments;
@NotNull
public final MutableDataFlowInfoForArguments dataFlowInfoForArguments;
@@ -26,14 +26,23 @@ import org.jetbrains.jet.lang.types.JetType;
import org.jetbrains.jet.lang.types.TypeUtils;
public abstract class ResolutionContext<Context extends ResolutionContext<Context>> {
@NotNull
public final BindingTrace trace;
@NotNull
public final JetScope scope;
@NotNull
public final JetType expectedType;
@NotNull
public final DataFlowInfo dataFlowInfo;
@NotNull
public final ContextDependency contextDependency;
@NotNull
public final ResolutionResultsCache resolutionResultsCache;
@NotNull
public final CallResolverExtension callResolverExtension;
public final boolean isAnnotationContext;
public final boolean collectAllCandidates;
protected ResolutionContext(
@@ -47,6 +47,7 @@ public class InferenceErrorData {
this.expectedType = expectedType;
}
@NotNull
public static InferenceErrorData create(@NotNull CallableDescriptor descriptor, @NotNull ConstraintSystem constraintSystem,
@NotNull List<JetType> valueArgumentsTypes, @Nullable JetType receiverArgumentType, @NotNull JetType expectedType) {
return new InferenceErrorData(descriptor, constraintSystem, valueArgumentsTypes, receiverArgumentType, expectedType);
@@ -141,6 +141,7 @@ public class OverloadResolutionResultsImpl<D extends CallableDescriptor> impleme
return allCandidates;
}
@NotNull
public OverloadResolutionResultsImpl<D> changeStatusToSuccess() {
if (getResultCode() == Code.SUCCESS) return this;
@@ -86,5 +86,6 @@ public interface ConstraintSystem {
@NotNull
TypeSubstitutor getCurrentSubstitutor();
@NotNull
ConstraintSystem copy();
}