Chromium Code Reviews| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 type.typeArguments = typeParameterTypes; | 63 type.typeArguments = typeParameterTypes; |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 return element; | 66 return element; |
| 67 } | 67 } |
| 68 | 68 |
| 69 static ClassElementImpl classElement2(String typeName, | 69 static ClassElementImpl classElement2(String typeName, |
| 70 [List<String> parameterNames]) => | 70 [List<String> parameterNames]) => |
| 71 classElement(typeName, objectType, parameterNames); | 71 classElement(typeName, objectType, parameterNames); |
| 72 | 72 |
| 73 static ClassElementImpl classTypeAlias2(String typeName, | |
| 74 [List<String> parameterNames]) => | |
| 75 classTypeAlias(typeName, objectType, parameterNames); | |
| 76 | |
| 77 static classTypeAlias(String typeName, InterfaceType superclassType, | 73 static classTypeAlias(String typeName, InterfaceType superclassType, |
| 78 [List<String> parameterNames]) { | 74 [List<String> parameterNames]) { |
| 79 ClassElementImpl element = | 75 ClassElementImpl element = |
| 80 classElement(typeName, superclassType, parameterNames); | 76 classElement(typeName, superclassType, parameterNames); |
| 81 element.typedef = true; | 77 element.typedef = true; |
| 82 return element; | 78 return element; |
| 83 } | 79 } |
| 84 | 80 |
| 81 static ClassElementImpl classTypeAlias2(String typeName, | |
| 82 [List<String> parameterNames]) => | |
| 83 classTypeAlias(typeName, objectType, parameterNames); | |
| 84 | |
| 85 static CompilationUnitElementImpl compilationUnit(String fileName) { | 85 static CompilationUnitElementImpl compilationUnit(String fileName) { |
| 86 Source source = new NonExistingSource(fileName, UriKind.FILE_URI); | 86 Source source = new NonExistingSource(fileName, UriKind.FILE_URI); |
| 87 CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName); | 87 CompilationUnitElementImpl unit = new CompilationUnitElementImpl(fileName); |
| 88 unit.source = source; | 88 unit.source = source; |
| 89 return unit; | 89 return unit; |
| 90 } | 90 } |
| 91 | 91 |
| 92 static ConstLocalVariableElementImpl constLocalVariableElement2( | |
|
Brian Wilkerson
2015/04/01 20:31:54
Is the '2' in the name needed?
Paul Berry
2015/04/02 15:18:49
No. Removed.
| |
| 93 String name) => new ConstLocalVariableElementImpl(name, 0); | |
| 94 | |
| 92 static ConstructorElementImpl constructorElement( | 95 static ConstructorElementImpl constructorElement( |
| 93 ClassElement definingClass, String name, bool isConst, | 96 ClassElement definingClass, String name, bool isConst, |
| 94 [List<DartType> argumentTypes]) { | 97 [List<DartType> argumentTypes]) { |
| 95 DartType type = definingClass.type; | 98 DartType type = definingClass.type; |
| 96 ConstructorElementImpl constructor = name == null | 99 ConstructorElementImpl constructor = name == null |
| 97 ? new ConstructorElementImpl("", -1) | 100 ? new ConstructorElementImpl("", -1) |
| 98 : new ConstructorElementImpl(name, 0); | 101 : new ConstructorElementImpl(name, 0); |
| 99 constructor.const2 = isConst; | 102 constructor.const2 = isConst; |
| 100 if (argumentTypes != null) { | 103 if (argumentTypes != null) { |
| 101 int count = argumentTypes.length; | 104 int count = argumentTypes.length; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 setter.variable = variable; | 523 setter.variable = variable; |
| 521 setter.parameters = | 524 setter.parameters = |
| 522 <ParameterElement>[requiredParameter2("_$name", type)]; | 525 <ParameterElement>[requiredParameter2("_$name", type)]; |
| 523 setter.returnType = VoidTypeImpl.instance; | 526 setter.returnType = VoidTypeImpl.instance; |
| 524 setter.type = new FunctionTypeImpl.con1(setter); | 527 setter.type = new FunctionTypeImpl.con1(setter); |
| 525 variable.setter = setter; | 528 variable.setter = setter; |
| 526 } | 529 } |
| 527 return variable; | 530 return variable; |
| 528 } | 531 } |
| 529 } | 532 } |
| OLD | NEW |