OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 elements.modelx; | 5 library elements.modelx; |
6 | 6 |
7 import 'dart:uri'; | 7 import 'dart:uri'; |
8 import 'dart:collection' show LinkedHashMap; | 8 import 'dart:collection' show LinkedHashMap; |
9 | 9 |
10 import 'elements.dart'; | 10 import 'elements.dart'; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY); | 77 identical(kind, ElementKind.GENERATIVE_CONSTRUCTOR_BODY); |
78 bool isCompilationUnit() => identical(kind, ElementKind.COMPILATION_UNIT); | 78 bool isCompilationUnit() => identical(kind, ElementKind.COMPILATION_UNIT); |
79 bool isClass() => identical(kind, ElementKind.CLASS); | 79 bool isClass() => identical(kind, ElementKind.CLASS); |
80 bool isPrefix() => identical(kind, ElementKind.PREFIX); | 80 bool isPrefix() => identical(kind, ElementKind.PREFIX); |
81 bool isVariable() => identical(kind, ElementKind.VARIABLE); | 81 bool isVariable() => identical(kind, ElementKind.VARIABLE); |
82 bool isParameter() => identical(kind, ElementKind.PARAMETER); | 82 bool isParameter() => identical(kind, ElementKind.PARAMETER); |
83 bool isStatement() => identical(kind, ElementKind.STATEMENT); | 83 bool isStatement() => identical(kind, ElementKind.STATEMENT); |
84 bool isTypedef() => identical(kind, ElementKind.TYPEDEF); | 84 bool isTypedef() => identical(kind, ElementKind.TYPEDEF); |
85 bool isTypeVariable() => identical(kind, ElementKind.TYPE_VARIABLE); | 85 bool isTypeVariable() => identical(kind, ElementKind.TYPE_VARIABLE); |
86 bool isField() => identical(kind, ElementKind.FIELD); | 86 bool isField() => identical(kind, ElementKind.FIELD); |
| 87 bool isFieldParameter() => identical(kind, ElementKind.FIELD_PARAMETER); |
87 bool isAbstractField() => identical(kind, ElementKind.ABSTRACT_FIELD); | 88 bool isAbstractField() => identical(kind, ElementKind.ABSTRACT_FIELD); |
88 bool isGetter() => identical(kind, ElementKind.GETTER); | 89 bool isGetter() => identical(kind, ElementKind.GETTER); |
89 bool isSetter() => identical(kind, ElementKind.SETTER); | 90 bool isSetter() => identical(kind, ElementKind.SETTER); |
90 bool isAccessor() => isGetter() || isSetter(); | 91 bool isAccessor() => isGetter() || isSetter(); |
91 bool isLibrary() => identical(kind, ElementKind.LIBRARY); | 92 bool isLibrary() => identical(kind, ElementKind.LIBRARY); |
92 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; | 93 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; |
93 | 94 |
94 /** See [ErroneousElement] for documentation. */ | 95 /** See [ErroneousElement] for documentation. */ |
95 bool isErroneous() => false; | 96 bool isErroneous() => false; |
96 | 97 |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2089 | 2090 |
2090 MetadataAnnotation ensureResolved(Compiler compiler) { | 2091 MetadataAnnotation ensureResolved(Compiler compiler) { |
2091 if (resolutionState == STATE_NOT_STARTED) { | 2092 if (resolutionState == STATE_NOT_STARTED) { |
2092 compiler.resolver.resolveMetadataAnnotation(this); | 2093 compiler.resolver.resolveMetadataAnnotation(this); |
2093 } | 2094 } |
2094 return this; | 2095 return this; |
2095 } | 2096 } |
2096 | 2097 |
2097 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 2098 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
2098 } | 2099 } |
OLD | NEW |