JS backend: Minor changes -- added @NotNull to some methods of InnerDeclarationTranslator.
This commit is contained in:
+3
@@ -39,6 +39,7 @@ abstract class InnerDeclarationTranslator {
|
|||||||
this.fun = fun;
|
this.fun = fun;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
public JsExpression translate(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
public JsExpression translate(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||||
UsageTracker usageTracker = context.usageTracker();
|
UsageTracker usageTracker = context.usageTracker();
|
||||||
assert usageTracker != null : "Usage tracker should not be null for InnerDeclarationTranslator";
|
assert usageTracker != null : "Usage tracker should not be null for InnerDeclarationTranslator";
|
||||||
@@ -72,7 +73,9 @@ abstract class InnerDeclarationTranslator {
|
|||||||
return invocation;
|
return invocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
protected abstract JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
protected abstract JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
||||||
|
|
||||||
|
@NotNull
|
||||||
protected abstract JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
protected abstract JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -43,11 +43,13 @@ class InnerFunctionTranslator extends InnerDeclarationTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||||
return nameRef;
|
return nameRef;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||||
return new JsInvocation(new JsNameRef("bind", nameRef), new SmartList<JsExpression>(self));
|
return new JsInvocation(new JsNameRef("bind", nameRef), new SmartList<JsExpression>(self));
|
||||||
}
|
}
|
||||||
|
|||||||
+2
@@ -30,11 +30,13 @@ class InnerObjectTranslator extends InnerDeclarationTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
protected JsExpression createExpression(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||||
return createInvocation(nameRef, self);
|
return createInvocation(nameRef, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@NotNull
|
||||||
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
protected JsInvocation createInvocation(@NotNull JsNameRef nameRef, @Nullable JsExpression self) {
|
||||||
JsInvocation invocation = new JsInvocation(nameRef);
|
JsInvocation invocation = new JsInvocation(nameRef);
|
||||||
if (self != null) {
|
if (self != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user