JS backend: add NotNull annotations

This commit is contained in:
Michael Nedzelsky
2014-08-22 17:18:50 +04:00
parent ab0df532bc
commit 2fd13a0fb4
4 changed files with 11 additions and 0 deletions
@@ -1,5 +1,7 @@
package com.google.dart.compiler.backend.js.ast;
import org.jetbrains.annotations.NotNull;
public class ChameleonJsExpression implements JsExpression {
private JsExpression expression;
@@ -20,6 +22,7 @@ public class ChameleonJsExpression implements JsExpression {
}
@Override
@NotNull
public JsStatement makeStmt() {
return expression.makeStmt();
}
@@ -1,8 +1,11 @@
package com.google.dart.compiler.backend.js.ast;
import org.jetbrains.annotations.NotNull;
public interface JsExpression extends JsNode {
boolean isLeaf();
@NotNull
JsStatement makeStmt();
@Override
@@ -4,6 +4,8 @@
package com.google.dart.compiler.backend.js.ast;
import org.jetbrains.annotations.NotNull;
import java.util.List;
abstract class JsExpressionImpl extends SourceInfoAwareJsNode implements JsExpression {
@@ -20,6 +22,7 @@ abstract class JsExpressionImpl extends SourceInfoAwareJsNode implements JsExpre
}
@Override
@NotNull
public JsStatement makeStmt() {
return new JsExpressionStatement(this);
}
@@ -18,6 +18,7 @@ import static com.google.dart.compiler.backend.js.ast.JsNumberLiteral.JsIntLiter
* A JavaScript program.
*/
public final class JsProgram extends SourceInfoAwareJsNode {
@NotNull
private final JsEmpty emptyStatement;
private JsProgramFragment[] fragments;
@@ -37,6 +38,7 @@ public final class JsProgram extends SourceInfoAwareJsNode {
emptyStatement = new JsEmpty();
}
@NotNull
public JsEmpty getEmptyStatement() {
return emptyStatement;
}