| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.element; | 8 library engine.element; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 * annotation from a supertype. | 208 * annotation from a supertype. |
| 209 */ | 209 */ |
| 210 bool get isOrInheritsProxy; | 210 bool get isOrInheritsProxy; |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * Return `true` if this element has an annotation of the form '@proxy'. | 213 * Return `true` if this element has an annotation of the form '@proxy'. |
| 214 */ | 214 */ |
| 215 bool get isProxy; | 215 bool get isProxy; |
| 216 | 216 |
| 217 /** | 217 /** |
| 218 * Return `true` if this class is defined by a typedef construct. | 218 * Return `true` if this class is a mixin application. Deprecated--please |
| 219 * use [isMixinApplication] instead. |
| 219 */ | 220 */ |
| 221 @deprecated |
| 220 bool get isTypedef; | 222 bool get isTypedef; |
| 221 | 223 |
| 222 /** | 224 /** |
| 223 * Return `true` if this class can validly be used as a mixin when defining | 225 * Return `true` if this class can validly be used as a mixin when defining |
| 224 * another class. The behavior of this method is defined by the Dart Language | 226 * another class. The behavior of this method is defined by the Dart Language |
| 225 * Specification in section 9: | 227 * Specification in section 9: |
| 226 * <blockquote> | 228 * <blockquote> |
| 227 * It is a compile-time error if a declared or derived mixin refers to super. | 229 * It is a compile-time error if a declared or derived mixin refers to super. |
| 228 * It is a compile-time error if a declared or derived mixin explicitly | 230 * It is a compile-time error if a declared or derived mixin explicitly |
| 229 * declares a constructor. It is a compile-time error if a mixin is derived | 231 * declares a constructor. It is a compile-time error if a mixin is derived |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 bool get isProxy { | 698 bool get isProxy { |
| 697 for (ElementAnnotation annotation in metadata) { | 699 for (ElementAnnotation annotation in metadata) { |
| 698 if (annotation.isProxy) { | 700 if (annotation.isProxy) { |
| 699 return true; | 701 return true; |
| 700 } | 702 } |
| 701 } | 703 } |
| 702 return false; | 704 return false; |
| 703 } | 705 } |
| 704 | 706 |
| 705 @override | 707 @override |
| 706 bool get isTypedef => hasModifier(Modifier.TYPEDEF); | 708 @deprecated |
| 709 bool get isTypedef => isMixinApplication; |
| 707 | 710 |
| 708 @override | 711 @override |
| 709 bool get isValidMixin => hasModifier(Modifier.MIXIN); | 712 bool get isValidMixin => hasModifier(Modifier.MIXIN); |
| 710 | 713 |
| 711 @override | 714 @override |
| 712 ElementKind get kind => ElementKind.CLASS; | 715 ElementKind get kind => ElementKind.CLASS; |
| 713 | 716 |
| 714 @override | 717 @override |
| 715 List<MethodElement> get methods => _methods; | 718 List<MethodElement> get methods => _methods; |
| 716 | 719 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 734 bool get mixinErrorsReported => hasModifier(Modifier.MIXIN_ERRORS_REPORTED); | 737 bool get mixinErrorsReported => hasModifier(Modifier.MIXIN_ERRORS_REPORTED); |
| 735 | 738 |
| 736 /** | 739 /** |
| 737 * Set whether an error has reported explaining why this class is an | 740 * Set whether an error has reported explaining why this class is an |
| 738 * invalid mixin application. | 741 * invalid mixin application. |
| 739 */ | 742 */ |
| 740 void set mixinErrorsReported(bool value) { | 743 void set mixinErrorsReported(bool value) { |
| 741 setModifier(Modifier.MIXIN_ERRORS_REPORTED, value); | 744 setModifier(Modifier.MIXIN_ERRORS_REPORTED, value); |
| 742 } | 745 } |
| 743 | 746 |
| 744 /** | |
| 745 * Set whether this class is defined by a typedef construct. | |
| 746 */ | |
| 747 void set typedef(bool isTypedef) { | |
| 748 setModifier(Modifier.TYPEDEF, isTypedef); | |
| 749 } | |
| 750 | |
| 751 @override | 747 @override |
| 752 List<TypeParameterElement> get typeParameters => _typeParameters; | 748 List<TypeParameterElement> get typeParameters => _typeParameters; |
| 753 | 749 |
| 754 /** | 750 /** |
| 755 * Set the type parameters defined for this class to the given | 751 * Set the type parameters defined for this class to the given |
| 756 * [typeParameters]. | 752 * [typeParameters]. |
| 757 */ | 753 */ |
| 758 void set typeParameters(List<TypeParameterElement> typeParameters) { | 754 void set typeParameters(List<TypeParameterElement> typeParameters) { |
| 759 for (TypeParameterElement typeParameter in typeParameters) { | 755 for (TypeParameterElement typeParameter in typeParameters) { |
| 760 (typeParameter as TypeParameterElementImpl).enclosingElement = this; | 756 (typeParameter as TypeParameterElementImpl).enclosingElement = this; |
| (...skipping 7287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8048 static const Modifier STATIC = const Modifier('STATIC', 17); | 8044 static const Modifier STATIC = const Modifier('STATIC', 17); |
| 8049 | 8045 |
| 8050 /** | 8046 /** |
| 8051 * Indicates that the element does not appear in the source code but was | 8047 * Indicates that the element does not appear in the source code but was |
| 8052 * implicitly created. For example, if a class does not define any | 8048 * implicitly created. For example, if a class does not define any |
| 8053 * constructors, an implicit zero-argument constructor will be created and it | 8049 * constructors, an implicit zero-argument constructor will be created and it |
| 8054 * will be marked as being synthetic. | 8050 * will be marked as being synthetic. |
| 8055 */ | 8051 */ |
| 8056 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18); | 8052 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18); |
| 8057 | 8053 |
| 8058 /** | |
| 8059 * Indicates that a class was defined using an alias. | |
| 8060 * TODO(brianwilkerson) This should be renamed to 'ALIAS'. | |
| 8061 */ | |
| 8062 static const Modifier TYPEDEF = const Modifier('TYPEDEF', 19); | |
| 8063 | |
| 8064 static const List<Modifier> values = const [ | 8054 static const List<Modifier> values = const [ |
| 8065 ABSTRACT, | 8055 ABSTRACT, |
| 8066 ASYNCHRONOUS, | 8056 ASYNCHRONOUS, |
| 8067 CONST, | 8057 CONST, |
| 8068 DEFERRED, | 8058 DEFERRED, |
| 8069 ENUM, | 8059 ENUM, |
| 8070 FACTORY, | 8060 FACTORY, |
| 8071 FINAL, | 8061 FINAL, |
| 8072 GENERATOR, | 8062 GENERATOR, |
| 8073 GETTER, | 8063 GETTER, |
| 8074 HAS_EXT_URI, | 8064 HAS_EXT_URI, |
| 8075 MIXIN, | 8065 MIXIN, |
| 8076 MIXIN_APPLICATION, | 8066 MIXIN_APPLICATION, |
| 8077 MIXIN_ERRORS_REPORTED, | 8067 MIXIN_ERRORS_REPORTED, |
| 8078 POTENTIALLY_MUTATED_IN_CONTEXT, | 8068 POTENTIALLY_MUTATED_IN_CONTEXT, |
| 8079 POTENTIALLY_MUTATED_IN_SCOPE, | 8069 POTENTIALLY_MUTATED_IN_SCOPE, |
| 8080 REFERENCES_SUPER, | 8070 REFERENCES_SUPER, |
| 8081 SETTER, | 8071 SETTER, |
| 8082 STATIC, | 8072 STATIC, |
| 8083 SYNTHETIC, | 8073 SYNTHETIC |
| 8084 TYPEDEF | |
| 8085 ]; | 8074 ]; |
| 8086 | 8075 |
| 8087 const Modifier(String name, int ordinal) : super(name, ordinal); | 8076 const Modifier(String name, int ordinal) : super(name, ordinal); |
| 8088 } | 8077 } |
| 8089 | 8078 |
| 8090 /** | 8079 /** |
| 8091 * A pseudo-element that represents multiple elements defined within a single | 8080 * A pseudo-element that represents multiple elements defined within a single |
| 8092 * scope that have the same name. This situation is not allowed by the language, | 8081 * scope that have the same name. This situation is not allowed by the language, |
| 8093 * so objects implementing this interface always represent an error. As a | 8082 * so objects implementing this interface always represent an error. As a |
| 8094 * result, most of the normal operations on elements do not make sense and will | 8083 * result, most of the normal operations on elements do not make sense and will |
| (...skipping 2330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10425 | 10414 |
| 10426 @override | 10415 @override |
| 10427 void visitElement(Element element) { | 10416 void visitElement(Element element) { |
| 10428 int offset = element.nameOffset; | 10417 int offset = element.nameOffset; |
| 10429 if (offset != -1) { | 10418 if (offset != -1) { |
| 10430 map[offset] = element; | 10419 map[offset] = element; |
| 10431 } | 10420 } |
| 10432 super.visitElement(element); | 10421 super.visitElement(element); |
| 10433 } | 10422 } |
| 10434 } | 10423 } |
| OLD | NEW |