| 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 '../compiler.dart' show Compiler; | 9 import '../compiler.dart' show Compiler; |
| 10 import '../constants/constructors.dart'; | 10 import '../constants/constructors.dart'; |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1060 /// this parameter is declared. | 1060 /// this parameter is declared. |
| 1061 FunctionTypedElement get functionDeclaration; | 1061 FunctionTypedElement get functionDeclaration; |
| 1062 | 1062 |
| 1063 VariableDefinitions get node; | 1063 VariableDefinitions get node; |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 /// A formal parameter of a function or constructor. | 1066 /// A formal parameter of a function or constructor. |
| 1067 /// | 1067 /// |
| 1068 /// Normal parameter that introduce a local variable are modeled by | 1068 /// Normal parameter that introduce a local variable are modeled by |
| 1069 /// [LocalParameterElement] whereas initializing formals, that is parameter of | 1069 /// [LocalParameterElement] whereas initializing formals, that is parameter of |
| 1070 /// the form `this.x`, are modeled by [InitializingFormalElement]. | 1070 /// the form `this.x`, are modeled by [InitializingFormalParameter]. |
| 1071 abstract class ParameterElement extends Element | 1071 abstract class ParameterElement extends Element |
| 1072 implements VariableElement, FormalElement, LocalElement { | 1072 implements VariableElement, FormalElement, LocalElement { |
| 1073 /// Use [functionDeclaration] instead. | 1073 /// Use [functionDeclaration] instead. |
| 1074 @deprecated | 1074 @deprecated |
| 1075 get enclosingElement; | 1075 get enclosingElement; |
| 1076 | 1076 |
| 1077 /// The function on which this parameter is declared. | 1077 /// The function on which this parameter is declared. |
| 1078 FunctionElement get functionDeclaration; | 1078 FunctionElement get functionDeclaration; |
| 1079 | 1079 |
| 1080 /// `true` if this parameter is named. | 1080 /// `true` if this parameter is named. |
| 1081 bool get isNamed; | 1081 bool get isNamed; |
| 1082 | 1082 |
| 1083 /// `true` if this parameter is optional. | 1083 /// `true` if this parameter is optional. |
| 1084 bool get isOptional; | 1084 bool get isOptional; |
| 1085 } | 1085 } |
| 1086 | 1086 |
| 1087 /// A formal parameter on a function or constructor that introduces a local | 1087 /// A formal parameter on a function or constructor that introduces a local |
| 1088 /// variable in the scope of the function or constructor. | 1088 /// variable in the scope of the function or constructor. |
| 1089 abstract class LocalParameterElement extends ParameterElement | 1089 abstract class LocalParameterElement extends ParameterElement |
| 1090 implements LocalVariableElement {} | 1090 implements LocalVariableElement {} |
| 1091 | 1091 |
| 1092 /// A formal parameter in a constructor that directly initializes a field. | 1092 /// A formal parameter in a constructor that directly initializes a field. |
| 1093 /// | 1093 /// |
| 1094 /// For example: `A(this.field)`. | 1094 /// For example: `A(this.field)`. |
| 1095 abstract class InitializingFormalElement extends LocalParameterElement { | 1095 abstract class InitializingFormalElement extends ParameterElement { |
| 1096 /// The field initialized by this initializing formal. | 1096 /// The field initialized by this initializing formal. |
| 1097 FieldElement get fieldElement; | 1097 FieldElement get fieldElement; |
| 1098 | 1098 |
| 1099 /// The function on which this parameter is declared. | 1099 /// The function on which this parameter is declared. |
| 1100 ConstructorElement get functionDeclaration; | 1100 ConstructorElement get functionDeclaration; |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 /** | 1103 /** |
| 1104 * A synthetic element which holds a getter and/or a setter. | 1104 * A synthetic element which holds a getter and/or a setter. |
| 1105 * | 1105 * |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1830 /// by a field. | 1830 /// by a field. |
| 1831 bool get isDeclaredByField; | 1831 bool get isDeclaredByField; |
| 1832 | 1832 |
| 1833 /// Returns `true` if this member is abstract. | 1833 /// Returns `true` if this member is abstract. |
| 1834 bool get isAbstract; | 1834 bool get isAbstract; |
| 1835 | 1835 |
| 1836 /// If abstract, [implementation] points to the overridden concrete member, | 1836 /// If abstract, [implementation] points to the overridden concrete member, |
| 1837 /// if any. Otherwise [implementation] points to the member itself. | 1837 /// if any. Otherwise [implementation] points to the member itself. |
| 1838 Member get implementation; | 1838 Member get implementation; |
| 1839 } | 1839 } |
| OLD | NEW |