| 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.generated.testing.element_factory; | 5 library analyzer.src.generated.testing.element_factory; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/dart/element/type.dart'; | 10 import 'package:analyzer/dart/element/type.dart'; |
| (...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 new FunctionTypeImpl.forTypedef(functionTypeAliasElement); | 394 new FunctionTypeImpl.forTypedef(functionTypeAliasElement); |
| 395 return functionTypeAliasElement; | 395 return functionTypeAliasElement; |
| 396 } | 396 } |
| 397 | 397 |
| 398 static PropertyAccessorElementImpl getterElement( | 398 static PropertyAccessorElementImpl getterElement( |
| 399 String name, bool isStatic, DartType type) { | 399 String name, bool isStatic, DartType type) { |
| 400 FieldElementImpl field = new FieldElementImpl(name, -1); | 400 FieldElementImpl field = new FieldElementImpl(name, -1); |
| 401 field.static = isStatic; | 401 field.static = isStatic; |
| 402 field.synthetic = true; | 402 field.synthetic = true; |
| 403 field.type = type; | 403 field.type = type; |
| 404 field.final2 = true; |
| 404 PropertyAccessorElementImpl getter = | 405 PropertyAccessorElementImpl getter = |
| 405 new PropertyAccessorElementImpl.forVariable(field); | 406 new PropertyAccessorElementImpl.forVariable(field); |
| 407 getter.synthetic = false; |
| 406 getter.getter = true; | 408 getter.getter = true; |
| 407 getter.variable = field; | 409 getter.variable = field; |
| 408 getter.returnType = type; | 410 getter.returnType = type; |
| 409 field.getter = getter; | 411 field.getter = getter; |
| 410 FunctionTypeImpl getterType = new FunctionTypeImpl(getter); | 412 FunctionTypeImpl getterType = new FunctionTypeImpl(getter); |
| 411 getter.type = getterType; | 413 getter.type = getterType; |
| 412 return getter; | 414 return getter; |
| 413 } | 415 } |
| 414 | 416 |
| 415 static ImportElementImpl importFor( | 417 static ImportElementImpl importFor( |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 } | 613 } |
| 612 | 614 |
| 613 static TypeParameterElementImpl typeParameterWithType(String name, | 615 static TypeParameterElementImpl typeParameterWithType(String name, |
| 614 [DartType bound]) { | 616 [DartType bound]) { |
| 615 TypeParameterElementImpl typeParameter = typeParameterElement(name); | 617 TypeParameterElementImpl typeParameter = typeParameterElement(name); |
| 616 typeParameter.type = new TypeParameterTypeImpl(typeParameter); | 618 typeParameter.type = new TypeParameterTypeImpl(typeParameter); |
| 617 typeParameter.bound = bound; | 619 typeParameter.bound = bound; |
| 618 return typeParameter; | 620 return typeParameter; |
| 619 } | 621 } |
| 620 } | 622 } |
| OLD | NEW |