| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.testing.element_factory; | 8 library engine.testing.element_factory; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 DartObjectImpl value = | 157 DartObjectImpl value = |
| 158 new DartObjectImpl(enumType, new GenericState(fieldMap)); | 158 new DartObjectImpl(enumType, new GenericState(fieldMap)); |
| 159 constantElement.evaluationResult = new EvaluationResultImpl.con1(value); | 159 constantElement.evaluationResult = new EvaluationResultImpl.con1(value); |
| 160 fields.add(constantElement); | 160 fields.add(constantElement); |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 // | 163 // |
| 164 // Finish building the enum. | 164 // Finish building the enum. |
| 165 // | 165 // |
| 166 enumElement.fields = fields; | 166 enumElement.fields = fields; |
| 167 | 167 // Client code isn't allowed to invoke the constructor, so we do not model i
t. |
| 168 | |
| 169 // Client code isn't allowed to invoke the constructor, so we do not mod
el it. | |
| 170 return enumElement; | 168 return enumElement; |
| 171 } | 169 } |
| 172 | 170 |
| 173 static ExportElementImpl exportFor(LibraryElement exportedLibrary, | 171 static ExportElementImpl exportFor(LibraryElement exportedLibrary, |
| 174 [List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY])
{ | 172 [List<NamespaceCombinator> combinators = NamespaceCombinator.EMPTY_ARRAY])
{ |
| 175 ExportElementImpl spec = new ExportElementImpl(); | 173 ExportElementImpl spec = new ExportElementImpl(); |
| 176 spec.exportedLibrary = exportedLibrary; | 174 spec.exportedLibrary = exportedLibrary; |
| 177 spec.combinators = combinators; | 175 spec.combinators = combinators; |
| 178 return spec; | 176 return spec; |
| 179 } | 177 } |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 variable.synthetic = true; | 488 variable.synthetic = true; |
| 491 PropertyAccessorElementImpl getter = | 489 PropertyAccessorElementImpl getter = |
| 492 new PropertyAccessorElementImpl.forVariable(variable); | 490 new PropertyAccessorElementImpl.forVariable(variable); |
| 493 getter.getter = true; | 491 getter.getter = true; |
| 494 getter.synthetic = true; | 492 getter.synthetic = true; |
| 495 getter.variable = variable; | 493 getter.variable = variable; |
| 496 getter.returnType = type; | 494 getter.returnType = type; |
| 497 variable.getter = getter; | 495 variable.getter = getter; |
| 498 FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter); | 496 FunctionTypeImpl getterType = new FunctionTypeImpl.con1(getter); |
| 499 getter.type = getterType; | 497 getter.type = getterType; |
| 500 if (!isFinal) { | 498 if (!isConst && !isFinal) { |
| 501 PropertyAccessorElementImpl setter = | 499 PropertyAccessorElementImpl setter = |
| 502 new PropertyAccessorElementImpl.forVariable(variable); | 500 new PropertyAccessorElementImpl.forVariable(variable); |
| 503 setter.setter = true; | 501 setter.setter = true; |
| 504 setter.static = true; | 502 setter.static = true; |
| 505 setter.synthetic = true; | 503 setter.synthetic = true; |
| 506 setter.variable = variable; | 504 setter.variable = variable; |
| 507 setter.parameters = | 505 setter.parameters = |
| 508 <ParameterElement>[requiredParameter2("_$name", type)]; | 506 <ParameterElement>[requiredParameter2("_$name", type)]; |
| 509 setter.returnType = VoidTypeImpl.instance; | 507 setter.returnType = VoidTypeImpl.instance; |
| 510 setter.type = new FunctionTypeImpl.con1(setter); | 508 setter.type = new FunctionTypeImpl.con1(setter); |
| 511 variable.setter = setter; | 509 variable.setter = setter; |
| 512 } | 510 } |
| 513 return variable; | 511 return variable; |
| 514 } | 512 } |
| 515 } | 513 } |
| OLD | NEW |