| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package com.google.dart.compiler.ast; | 5 package com.google.dart.compiler.ast; |
| 6 | 6 |
| 7 import java.util.List; | 7 import java.util.List; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Represents a Dart field definition. | 10 * Represents a Dart field definition. |
| 11 */ | 11 */ |
| 12 public class DartFieldDefinition extends DartNode { | 12 public class DartFieldDefinition extends DartNodeWithMetadata { |
| 13 | 13 |
| 14 private DartTypeNode typeNode; | 14 private DartTypeNode typeNode; |
| 15 private final NodeList<DartField> fields = NodeList.create(this); | 15 private final NodeList<DartField> fields = NodeList.create(this); |
| 16 | 16 |
| 17 public DartFieldDefinition(DartTypeNode typeNode, List<DartField> fields) { | 17 public DartFieldDefinition(DartTypeNode typeNode, List<DartField> fields) { |
| 18 this.setTypeNode(typeNode); | 18 this.setTypeNode(typeNode); |
| 19 this.fields.addAll(fields); | 19 this.fields.addAll(fields); |
| 20 } | 20 } |
| 21 | 21 |
| 22 public DartTypeNode getTypeNode() { | 22 public DartTypeNode getTypeNode() { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 35 public void visitChildren(ASTVisitor<?> visitor) { | 35 public void visitChildren(ASTVisitor<?> visitor) { |
| 36 safelyVisitChild(typeNode, visitor); | 36 safelyVisitChild(typeNode, visitor); |
| 37 fields.accept(visitor); | 37 fields.accept(visitor); |
| 38 } | 38 } |
| 39 | 39 |
| 40 @Override | 40 @Override |
| 41 public <R> R accept(ASTVisitor<R> visitor) { | 41 public <R> R accept(ASTVisitor<R> visitor) { |
| 42 return visitor.visitFieldDefinition(this); | 42 return visitor.visitFieldDefinition(this); |
| 43 } | 43 } |
| 44 } | 44 } |
| OLD | NEW |