| 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 com.google.common.collect.ImmutableList; | 7 import com.google.common.collect.ImmutableList; |
| 8 import com.google.dart.compiler.common.AbstractNode; | 8 import com.google.dart.compiler.common.AbstractNode; |
| 9 | 9 |
| 10 import java.util.List; | 10 import java.util.List; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * @param text the text comprising the node (not <code>null</code>) | 26 * @param text the text comprising the node (not <code>null</code>) |
| 27 */ | 27 */ |
| 28 public LibraryNode(String text) { | 28 public LibraryNode(String text) { |
| 29 this.text = text; | 29 this.text = text; |
| 30 this.prefix = null; | 30 this.prefix = null; |
| 31 this.combinators = ImmutableList.<ImportCombinator>of(); | 31 this.combinators = ImmutableList.<ImportCombinator>of(); |
| 32 this.exported = false; | 32 this.exported = false; |
| 33 } | 33 } |
| 34 | 34 |
| 35 public LibraryNode(DartImportDirective importDirective) { | 35 public LibraryNode(DartImportDirective importDirective) { |
| 36 setSourceInfo(importDirective.getSourceInfo()); |
| 36 this.text = importDirective.getLibraryUri().getValue(); | 37 this.text = importDirective.getLibraryUri().getValue(); |
| 37 this.prefix = importDirective.getPrefixValue(); | 38 this.prefix = importDirective.getPrefixValue(); |
| 38 this.combinators = importDirective.getCombinators(); | 39 this.combinators = importDirective.getCombinators(); |
| 39 this.exported = importDirective.isExported(); | 40 this.exported = importDirective.isExported(); |
| 40 } | 41 } |
| 41 | 42 |
| 42 public LibraryNode(DartExportDirective exportDirective) { | 43 public LibraryNode(DartExportDirective exportDirective) { |
| 44 setSourceInfo(exportDirective.getSourceInfo()); |
| 43 this.text = exportDirective.getLibraryUri().getValue(); | 45 this.text = exportDirective.getLibraryUri().getValue(); |
| 44 this.prefix = null; | 46 this.prefix = null; |
| 45 this.combinators = exportDirective.getCombinators(); | 47 this.combinators = exportDirective.getCombinators(); |
| 46 this.exported = false; | 48 this.exported = false; |
| 47 } | 49 } |
| 48 | 50 |
| 49 public String getText() { | 51 public String getText() { |
| 50 return text; | 52 return text; |
| 51 } | 53 } |
| 52 | 54 |
| 53 public String getPrefix() { | 55 public String getPrefix() { |
| 54 return prefix; | 56 return prefix; |
| 55 } | 57 } |
| 56 | 58 |
| 57 public List<ImportCombinator> getCombinators() { | 59 public List<ImportCombinator> getCombinators() { |
| 58 return combinators; | 60 return combinators; |
| 59 } | 61 } |
| 60 | 62 |
| 61 public boolean isExported() { | 63 public boolean isExported() { |
| 62 return exported; | 64 return exported; |
| 63 } | 65 } |
| 64 } | 66 } |
| OLD | NEW |