| 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 library analyzer.src.dart.element.builder; | 5 library analyzer.src.dart.element.builder; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1293 * Creates the [ConstructorElement]s array with the single default constructor
element. | 1293 * Creates the [ConstructorElement]s array with the single default constructor
element. |
| 1294 * | 1294 * |
| 1295 * @param interfaceType the interface type for which to create a default const
ructor | 1295 * @param interfaceType the interface type for which to create a default const
ructor |
| 1296 * @return the [ConstructorElement]s array with the single default constructor
element | 1296 * @return the [ConstructorElement]s array with the single default constructor
element |
| 1297 */ | 1297 */ |
| 1298 List<ConstructorElement> _createDefaultConstructors( | 1298 List<ConstructorElement> _createDefaultConstructors( |
| 1299 ClassElementImpl definingClass) { | 1299 ClassElementImpl definingClass) { |
| 1300 ConstructorElementImpl constructor = | 1300 ConstructorElementImpl constructor = |
| 1301 new ConstructorElementImpl.forNode(null); | 1301 new ConstructorElementImpl.forNode(null); |
| 1302 constructor.synthetic = true; | 1302 constructor.synthetic = true; |
| 1303 constructor.returnType = definingClass.type; | |
| 1304 constructor.enclosingElement = definingClass; | 1303 constructor.enclosingElement = definingClass; |
| 1305 constructor.type = new FunctionTypeImpl(constructor); | |
| 1306 return <ConstructorElement>[constructor]; | 1304 return <ConstructorElement>[constructor]; |
| 1307 } | 1305 } |
| 1308 | 1306 |
| 1309 /** | 1307 /** |
| 1310 * For each [Annotation] found in [annotations], create a new | 1308 * For each [Annotation] found in [annotations], create a new |
| 1311 * [ElementAnnotation] object and set the [Annotation] to point to it. | 1309 * [ElementAnnotation] object and set the [Annotation] to point to it. |
| 1312 */ | 1310 */ |
| 1313 List<ElementAnnotation> _createElementAnnotations( | 1311 List<ElementAnnotation> _createElementAnnotations( |
| 1314 NodeList<Annotation> annotations) { | 1312 NodeList<Annotation> annotations) { |
| 1315 if (annotations.isEmpty) { | 1313 if (annotations.isEmpty) { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 return null; | 1474 return null; |
| 1477 } | 1475 } |
| 1478 | 1476 |
| 1479 /** | 1477 /** |
| 1480 * Return the lexical identifiers associated with the given [identifiers]. | 1478 * Return the lexical identifiers associated with the given [identifiers]. |
| 1481 */ | 1479 */ |
| 1482 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) { | 1480 static List<String> _getIdentifiers(NodeList<SimpleIdentifier> identifiers) { |
| 1483 return identifiers.map((identifier) => identifier.name).toList(); | 1481 return identifiers.map((identifier) => identifier.name).toList(); |
| 1484 } | 1482 } |
| 1485 } | 1483 } |
| OLD | NEW |