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 library elements; | 5 library elements; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../common/resolution.dart' show Resolution; | 8 import '../common/resolution.dart' show Resolution; |
9 import '../constants/constructors.dart'; | 9 import '../constants/constructors.dart'; |
10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 /// or otherwise invalid. | 867 /// or otherwise invalid. |
868 /// | 868 /// |
869 /// Accessing any field or calling any method defined on [ErroneousElement] | 869 /// Accessing any field or calling any method defined on [ErroneousElement] |
870 /// except [isError] will currently throw an exception. (This might | 870 /// except [isError] will currently throw an exception. (This might |
871 /// change when we actually want more information on the erroneous element, | 871 /// change when we actually want more information on the erroneous element, |
872 /// e.g., the name of the element we were trying to resolve.) | 872 /// e.g., the name of the element we were trying to resolve.) |
873 /// | 873 /// |
874 /// Code that cannot not handle an [ErroneousElement] should use | 874 /// Code that cannot not handle an [ErroneousElement] should use |
875 /// `Element.isUnresolved(element)` to check for unresolvable elements instead | 875 /// `Element.isUnresolved(element)` to check for unresolvable elements instead |
876 /// of `element == null`. | 876 /// of `element == null`. |
| 877 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE |
877 abstract class ErroneousElement extends Element implements ConstructorElement { | 878 abstract class ErroneousElement extends Element implements ConstructorElement { |
878 MessageKind get messageKind; | 879 MessageKind get messageKind; |
879 Map get messageArguments; | 880 Map get messageArguments; |
880 String get message; | 881 String get message; |
881 } | 882 } |
882 | 883 |
883 /// An [Element] whose usage should cause one or more warnings. | 884 /// An [Element] whose usage should cause one or more warnings. |
884 abstract class WarnOnUseElement extends Element { | 885 abstract class WarnOnUseElement extends Element { |
885 /// The element whose usage cause a warning. | 886 /// The element whose usage cause a warning. |
886 Element get wrappedElement; | 887 Element get wrappedElement; |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 /// - it is part of a redirection cycle, | 1333 /// - it is part of a redirection cycle, |
1333 /// - the effective target is a generative constructor on an abstract | 1334 /// - the effective target is a generative constructor on an abstract |
1334 /// class, or | 1335 /// class, or |
1335 /// - this constructor is constant but the effective target is not, | 1336 /// - this constructor is constant but the effective target is not, |
1336 /// - the arguments to this constructor are incompatible with the | 1337 /// - the arguments to this constructor are incompatible with the |
1337 /// parameters of the effective target. | 1338 /// parameters of the effective target. |
1338 bool get isEffectiveTargetMalformed; | 1339 bool get isEffectiveTargetMalformed; |
1339 | 1340 |
1340 /// Compute the type of the effective target of this constructor for an | 1341 /// Compute the type of the effective target of this constructor for an |
1341 /// instantiation site with type [:newType:]. | 1342 /// instantiation site with type [:newType:]. |
1342 ResolutionInterfaceType computeEffectiveTargetType( | 1343 /// May return a malformed type. |
| 1344 ResolutionDartType computeEffectiveTargetType( |
1343 ResolutionInterfaceType newType); | 1345 ResolutionInterfaceType newType); |
1344 | 1346 |
1345 /// If this is a synthesized constructor [definingConstructor] points to | 1347 /// If this is a synthesized constructor [definingConstructor] points to |
1346 /// the generative constructor from which this constructor was created. | 1348 /// the generative constructor from which this constructor was created. |
1347 /// Otherwise [definingConstructor] is `null`. | 1349 /// Otherwise [definingConstructor] is `null`. |
1348 /// | 1350 /// |
1349 /// Consider for instance this hierarchy: | 1351 /// Consider for instance this hierarchy: |
1350 /// | 1352 /// |
1351 /// class C { C.c(a, {b}); | 1353 /// class C { C.c(a, {b}); |
1352 /// class D {} | 1354 /// class D {} |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1870 /// by a field. | 1872 /// by a field. |
1871 bool get isDeclaredByField; | 1873 bool get isDeclaredByField; |
1872 | 1874 |
1873 /// Returns `true` if this member is abstract. | 1875 /// Returns `true` if this member is abstract. |
1874 bool get isAbstract; | 1876 bool get isAbstract; |
1875 | 1877 |
1876 /// If abstract, [implementation] points to the overridden concrete member, | 1878 /// If abstract, [implementation] points to the overridden concrete member, |
1877 /// if any. Otherwise [implementation] points to the member itself. | 1879 /// if any. Otherwise [implementation] points to the member itself. |
1878 Member get implementation; | 1880 Member get implementation; |
1879 } | 1881 } |
OLD | NEW |