| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.task.model; | 5 library analyzer.task.model; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:developer'; | 8 import 'dart:developer'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; | 10 import 'package:analyzer/src/generated/engine.dart' hide AnalysisTask; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 /** | 165 /** |
| 166 * Indicates whether the task is capable of handling dependency cycles. A | 166 * Indicates whether the task is capable of handling dependency cycles. A |
| 167 * task that overrides this getter to return `true` must be prepared for the | 167 * task that overrides this getter to return `true` must be prepared for the |
| 168 * possibility that it will be invoked with a non-`null` value of | 168 * possibility that it will be invoked with a non-`null` value of |
| 169 * [dependencyCycle], and with not all of its inputs computed. | 169 * [dependencyCycle], and with not all of its inputs computed. |
| 170 */ | 170 */ |
| 171 bool get handlesDependencyCycles => false; | 171 bool get handlesDependencyCycles => false; |
| 172 | 172 |
| 173 /** | 173 /** |
| 174 * Return the value of the input with the given [name], or `null` if the input |
| 175 * value is not defined. |
| 176 */ |
| 177 Object getOptionalInput(String name) { |
| 178 if (inputs == null || !inputs.containsKey(name)) { |
| 179 return null; |
| 180 } |
| 181 return inputs[name]; |
| 182 } |
| 183 |
| 184 /** |
| 174 * Return the value of the input with the given [name]. Throw an exception if | 185 * Return the value of the input with the given [name]. Throw an exception if |
| 175 * the input value is not defined. | 186 * the input value is not defined. |
| 176 */ | 187 */ |
| 177 Object getRequiredInput(String name) { | 188 Object getRequiredInput(String name) { |
| 178 if (inputs == null || !inputs.containsKey(name)) { | 189 if (inputs == null || !inputs.containsKey(name)) { |
| 179 throw new AnalysisException("Could not $description: missing $name"); | 190 throw new AnalysisException("Could not $description: missing $name"); |
| 180 } | 191 } |
| 181 return inputs[name]; | 192 return inputs[name]; |
| 182 } | 193 } |
| 183 | 194 |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 /** | 764 /** |
| 754 * A work should be done, but without any special urgency. | 765 * A work should be done, but without any special urgency. |
| 755 */ | 766 */ |
| 756 NORMAL, | 767 NORMAL, |
| 757 | 768 |
| 758 /** | 769 /** |
| 759 * Nothing to do. | 770 * Nothing to do. |
| 760 */ | 771 */ |
| 761 NONE | 772 NONE |
| 762 } | 773 } |
| OLD | NEW |