| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:collection'; | 5 import 'dart:collection'; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | |
| 9 import 'package:analyzer/dart/ast/token.dart'; | 8 import 'package:analyzer/dart/ast/token.dart'; |
| 10 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 11 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| 12 import 'package:analyzer/error/error.dart'; | 11 import 'package:analyzer/error/error.dart'; |
| 13 import 'package:analyzer/exception/exception.dart'; | 12 import 'package:analyzer/exception/exception.dart'; |
| 14 import 'package:analyzer/src/dart/ast/token.dart'; | 13 import 'package:analyzer/src/dart/ast/token.dart'; |
| 15 import 'package:analyzer/src/dart/element/element.dart'; | 14 import 'package:analyzer/src/dart/element/element.dart'; |
| 16 import 'package:analyzer/src/dart/element/member.dart'; | 15 import 'package:analyzer/src/dart/element/member.dart'; |
| 17 import 'package:analyzer/src/dart/element/type.dart'; | 16 import 'package:analyzer/src/dart/element/type.dart'; |
| 18 import 'package:analyzer/src/error/codes.dart'; | 17 import 'package:analyzer/src/error/codes.dart'; |
| (...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 * @param namedParameters the list of [String]s that are the named parameters | 955 * @param namedParameters the list of [String]s that are the named parameters |
| 957 * @return the created synthetic element | 956 * @return the created synthetic element |
| 958 */ | 957 */ |
| 959 static ExecutableElement _createSyntheticExecutableElement( | 958 static ExecutableElement _createSyntheticExecutableElement( |
| 960 List<ExecutableElement> elementArrayToMerge, | 959 List<ExecutableElement> elementArrayToMerge, |
| 961 String name, | 960 String name, |
| 962 int numOfRequiredParameters, | 961 int numOfRequiredParameters, |
| 963 int numOfPositionalParameters, | 962 int numOfPositionalParameters, |
| 964 List<String> namedParameters) { | 963 List<String> namedParameters) { |
| 965 DynamicTypeImpl dynamicType = DynamicTypeImpl.instance; | 964 DynamicTypeImpl dynamicType = DynamicTypeImpl.instance; |
| 966 SimpleIdentifier nameIdentifier = astFactory | 965 SimpleIdentifier nameIdentifier = |
| 967 .simpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, 0)); | 966 new SimpleIdentifier(new StringToken(TokenType.IDENTIFIER, name, 0)); |
| 968 ExecutableElementImpl executable; | 967 ExecutableElementImpl executable; |
| 969 ExecutableElement elementToMerge = elementArrayToMerge[0]; | 968 ExecutableElement elementToMerge = elementArrayToMerge[0]; |
| 970 if (elementToMerge is MethodElement) { | 969 if (elementToMerge is MethodElement) { |
| 971 MultiplyInheritedMethodElementImpl unionedMethod = | 970 MultiplyInheritedMethodElementImpl unionedMethod = |
| 972 new MultiplyInheritedMethodElementImpl(nameIdentifier); | 971 new MultiplyInheritedMethodElementImpl(nameIdentifier); |
| 973 unionedMethod.inheritedElements = elementArrayToMerge; | 972 unionedMethod.inheritedElements = elementArrayToMerge; |
| 974 executable = unionedMethod; | 973 executable = unionedMethod; |
| 975 } else if (elementToMerge is PropertyAccessorElement) { | 974 } else if (elementToMerge is PropertyAccessorElement) { |
| 976 MultiplyInheritedPropertyAccessorElementImpl unionedPropertyAccessor = | 975 MultiplyInheritedPropertyAccessorElementImpl unionedPropertyAccessor = |
| 977 new MultiplyInheritedPropertyAccessorElementImpl(nameIdentifier); | 976 new MultiplyInheritedPropertyAccessorElementImpl(nameIdentifier); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1248 } | 1247 } |
| 1249 | 1248 |
| 1250 /** | 1249 /** |
| 1251 * Initializes [keys] and [values]. | 1250 * Initializes [keys] and [values]. |
| 1252 */ | 1251 */ |
| 1253 void _initArrays(int initialCapacity) { | 1252 void _initArrays(int initialCapacity) { |
| 1254 _keys = new List<String>(initialCapacity); | 1253 _keys = new List<String>(initialCapacity); |
| 1255 _values = new List<ExecutableElement>(initialCapacity); | 1254 _values = new List<ExecutableElement>(initialCapacity); |
| 1256 } | 1255 } |
| 1257 } | 1256 } |
| OLD | NEW |