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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 bool get isOrInheritsProxy; | 1024 bool get isOrInheritsProxy; |
1025 | 1025 |
1026 /** | 1026 /** |
1027 * Return `true` if this element has an annotation of the form '@proxy'. | 1027 * Return `true` if this element has an annotation of the form '@proxy'. |
1028 * | 1028 * |
1029 * @return `true` if this element defines a proxy | 1029 * @return `true` if this element defines a proxy |
1030 */ | 1030 */ |
1031 bool get isProxy; | 1031 bool get isProxy; |
1032 | 1032 |
1033 /** | 1033 /** |
| 1034 * Determine whether the given [constructor], which exists in the superclass |
| 1035 * of this class, is accessible to constructors in this class. |
| 1036 */ |
| 1037 bool isSuperConstructorAccessible(ConstructorElement constructor); |
| 1038 |
| 1039 /** |
1034 * Return `true` if this class is defined by a typedef construct. | 1040 * Return `true` if this class is defined by a typedef construct. |
1035 * | 1041 * |
1036 * @return `true` if this class is defined by a typedef construct | 1042 * @return `true` if this class is defined by a typedef construct |
1037 */ | 1043 */ |
1038 bool get isTypedef; | 1044 bool get isTypedef; |
1039 | 1045 |
1040 /** | 1046 /** |
1041 * Return `true` if this class can validly be used as a mixin when defining an
other class. | 1047 * Return `true` if this class can validly be used as a mixin when defining an
other class. |
1042 * The behavior of this method is defined by the Dart Language Specification i
n section 9: | 1048 * The behavior of this method is defined by the Dart Language Specification i
n section 9: |
1043 * <blockquote>It is a compile-time error if a declared or derived mixin refer
s to super. It is a | 1049 * <blockquote>It is a compile-time error if a declared or derived mixin refer
s to super. It is a |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1494 bool get isProxy { | 1500 bool get isProxy { |
1495 for (ElementAnnotation annotation in metadata) { | 1501 for (ElementAnnotation annotation in metadata) { |
1496 if (annotation.isProxy) { | 1502 if (annotation.isProxy) { |
1497 return true; | 1503 return true; |
1498 } | 1504 } |
1499 } | 1505 } |
1500 return false; | 1506 return false; |
1501 } | 1507 } |
1502 | 1508 |
1503 @override | 1509 @override |
| 1510 bool isSuperConstructorAccessible(ConstructorElement constructor) { |
| 1511 // If this class has no mixins, then all superclass constructors are |
| 1512 // accessible. |
| 1513 if (mixins.isEmpty) { |
| 1514 return true; |
| 1515 } |
| 1516 // Otherwise only constructors that lack optional parameters are |
| 1517 // accessible (see dartbug.com/19576). |
| 1518 for (ParameterElement parameter in constructor.parameters) { |
| 1519 if (parameter.parameterKind != ParameterKind.REQUIRED) { |
| 1520 return false; |
| 1521 } |
| 1522 } |
| 1523 return true; |
| 1524 } |
| 1525 |
| 1526 @override |
1504 bool get isTypedef => hasModifier(Modifier.TYPEDEF); | 1527 bool get isTypedef => hasModifier(Modifier.TYPEDEF); |
1505 | 1528 |
1506 @override | 1529 @override |
1507 bool get isValidMixin => hasModifier(Modifier.MIXIN); | 1530 bool get isValidMixin => hasModifier(Modifier.MIXIN); |
1508 | 1531 |
1509 @override | 1532 @override |
1510 MethodElement lookUpConcreteMethod(String methodName, LibraryElement library)
=> _internalLookUpConcreteMethod(methodName, library, true); | 1533 MethodElement lookUpConcreteMethod(String methodName, LibraryElement library)
=> _internalLookUpConcreteMethod(methodName, library, true); |
1511 | 1534 |
1512 @override | 1535 @override |
1513 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library
) => _internalLookUpGetter(getterName, library, true); | 1536 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library
) => _internalLookUpGetter(getterName, library, true); |
(...skipping 10267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11781 if (type is UnionType) { | 11804 if (type is UnionType) { |
11782 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite
dTypePairs); | 11805 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite
dTypePairs); |
11783 } | 11806 } |
11784 // The only subtype relations that pertain to void are therefore: | 11807 // The only subtype relations that pertain to void are therefore: |
11785 // void <: void (by reflexivity) | 11808 // void <: void (by reflexivity) |
11786 // bottom <: void (as bottom is a subtype of all types). | 11809 // bottom <: void (as bottom is a subtype of all types). |
11787 // void <: dynamic (as dynamic is a supertype of all types) | 11810 // void <: dynamic (as dynamic is a supertype of all types) |
11788 return identical(type, this) || type.isDynamic; | 11811 return identical(type, this) || type.isDynamic; |
11789 } | 11812 } |
11790 } | 11813 } |
OLD | NEW |