| Index: compiler/java/com/google/dart/compiler/ast/DartTypedLiteral.java
|
| diff --git a/compiler/java/com/google/dart/compiler/ast/DartTypedLiteral.java b/compiler/java/com/google/dart/compiler/ast/DartTypedLiteral.java
|
| index b62f02100af9e9c650f002095c685adccf0a701a..51ccde285eb8e5fe8bf6dbc01014cc93a2c84334 100644
|
| --- a/compiler/java/com/google/dart/compiler/ast/DartTypedLiteral.java
|
| +++ b/compiler/java/com/google/dart/compiler/ast/DartTypedLiteral.java
|
| @@ -4,36 +4,25 @@
|
|
|
| package com.google.dart.compiler.ast;
|
|
|
| -import com.google.common.collect.Lists;
|
| import com.google.dart.compiler.type.InterfaceType;
|
| import com.google.dart.compiler.type.Type;
|
|
|
| import java.util.List;
|
|
|
| public abstract class DartTypedLiteral extends DartExpression {
|
| - private List<DartTypeNode> typeArguments;
|
| private final boolean isConst;
|
| + private final NodeList<DartTypeNode> typeArguments = NodeList.create(this);
|
| private InterfaceType type;
|
|
|
| DartTypedLiteral(boolean isConst, List<DartTypeNode> typeArguments) {
|
| this.isConst = isConst;
|
| - setTypeArguments(typeArguments);
|
| + this.typeArguments.addAll(typeArguments);
|
| }
|
|
|
| public boolean isConst() {
|
| return isConst;
|
| }
|
|
|
| - public void setTypeArguments(List<DartTypeNode> typeArguments) {
|
| - if (typeArguments == null) {
|
| - typeArguments = Lists.newArrayList();
|
| - }
|
| - this.typeArguments = becomeParentOf(typeArguments);
|
| - }
|
| -
|
| - /**
|
| - * @return a non-null list
|
| - */
|
| public List<DartTypeNode> getTypeArguments() {
|
| return typeArguments;
|
| }
|
| @@ -50,8 +39,6 @@ public abstract class DartTypedLiteral extends DartExpression {
|
|
|
| @Override
|
| public void visitChildren(ASTVisitor<?> visitor) {
|
| - if (typeArguments.size() > 0) {
|
| - visitor.visit(getTypeArguments());
|
| - }
|
| + typeArguments.accept(visitor);
|
| }
|
| }
|
|
|