| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.element; | 3 library engine.element; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'source.dart'; | 7 import 'source.dart'; |
| 8 import 'scanner.dart' show Keyword; | 8 import 'scanner.dart' show Keyword; |
| 9 import 'ast.dart' show Identifier, LibraryIdentifier; | 9 import 'ast.dart' show Identifier, LibraryIdentifier; |
| 10 import 'sdk.dart' show DartSdk; | 10 import 'sdk.dart' show DartSdk; |
| (...skipping 5701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5712 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name); | 5712 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name); |
| 5713 bool operator ==(Object object) { | 5713 bool operator ==(Object object) { |
| 5714 if (object is! FunctionTypeImpl) { | 5714 if (object is! FunctionTypeImpl) { |
| 5715 return false; | 5715 return false; |
| 5716 } | 5716 } |
| 5717 FunctionTypeImpl otherType = object as FunctionTypeImpl; | 5717 FunctionTypeImpl otherType = object as FunctionTypeImpl; |
| 5718 return element == otherType.element && JavaArrays.equals(normalParameterType
s, otherType.normalParameterTypes) && JavaArrays.equals(optionalParameterTypes,
otherType.optionalParameterTypes) && equals2(namedParameterTypes, otherType.name
dParameterTypes) && returnType == otherType.returnType; | 5718 return element == otherType.element && JavaArrays.equals(normalParameterType
s, otherType.normalParameterTypes) && JavaArrays.equals(optionalParameterTypes,
otherType.optionalParameterTypes) && equals2(namedParameterTypes, otherType.name
dParameterTypes) && returnType == otherType.returnType; |
| 5719 } | 5719 } |
| 5720 String get displayName { | 5720 String get displayName { |
| 5721 String name = this.name; | 5721 String name = this.name; |
| 5722 if (name == null) { | 5722 if (name == null || name.length == 0) { |
| 5723 List<Type2> normalParameterTypes = this.normalParameterTypes; | 5723 List<Type2> normalParameterTypes = this.normalParameterTypes; |
| 5724 List<Type2> optionalParameterTypes = this.optionalParameterTypes; | 5724 List<Type2> optionalParameterTypes = this.optionalParameterTypes; |
| 5725 Map<String, Type2> namedParameterTypes = this.namedParameterTypes; | 5725 Map<String, Type2> namedParameterTypes = this.namedParameterTypes; |
| 5726 Type2 returnType = this.returnType; | 5726 Type2 returnType = this.returnType; |
| 5727 JavaStringBuilder builder = new JavaStringBuilder(); | 5727 JavaStringBuilder builder = new JavaStringBuilder(); |
| 5728 builder.append("("); | 5728 builder.append("("); |
| 5729 bool needsComma = false; | 5729 bool needsComma = false; |
| 5730 if (normalParameterTypes.length > 0) { | 5730 if (normalParameterTypes.length > 0) { |
| 5731 for (Type2 type in normalParameterTypes) { | 5731 for (Type2 type in normalParameterTypes) { |
| 5732 if (needsComma) { | 5732 if (needsComma) { |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6556 * @param typeArguments the actual types of the type arguments | 6556 * @param typeArguments the actual types of the type arguments |
| 6557 */ | 6557 */ |
| 6558 void set typeArguments(List<Type2> typeArguments2) { | 6558 void set typeArguments(List<Type2> typeArguments2) { |
| 6559 this._typeArguments = typeArguments2; | 6559 this._typeArguments = typeArguments2; |
| 6560 } | 6560 } |
| 6561 InterfaceTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argume
ntTypes, typeArguments); | 6561 InterfaceTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argume
ntTypes, typeArguments); |
| 6562 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter
Types) { | 6562 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter
Types) { |
| 6563 if (argumentTypes.length != parameterTypes.length) { | 6563 if (argumentTypes.length != parameterTypes.length) { |
| 6564 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); | 6564 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); |
| 6565 } | 6565 } |
| 6566 if (argumentTypes.length == 0) { | 6566 if (argumentTypes.length == 0 || _typeArguments.length == 0) { |
| 6567 return this; |
| 6568 } |
| 6569 List<Type2> newTypeArguments = TypeImpl.substitute(_typeArguments, argumentT
ypes, parameterTypes); |
| 6570 if (JavaArrays.equals(newTypeArguments, _typeArguments)) { |
| 6567 return this; | 6571 return this; |
| 6568 } | 6572 } |
| 6569 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element); | 6573 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element); |
| 6570 newType.typeArguments = TypeImpl.substitute(_typeArguments, argumentTypes, p
arameterTypes); | 6574 newType.typeArguments = newTypeArguments; |
| 6571 return newType; | 6575 return newType; |
| 6572 } | 6576 } |
| 6573 void appendTo(JavaStringBuilder builder) { | 6577 void appendTo(JavaStringBuilder builder) { |
| 6574 builder.append(name); | 6578 builder.append(name); |
| 6575 int argumentCount = _typeArguments.length; | 6579 int argumentCount = _typeArguments.length; |
| 6576 if (argumentCount > 0) { | 6580 if (argumentCount > 0) { |
| 6577 builder.append("<"); | 6581 builder.append("<"); |
| 6578 for (int i = 0; i < argumentCount; i++) { | 6582 for (int i = 0; i < argumentCount; i++) { |
| 6579 if (i > 0) { | 6583 if (i > 0) { |
| 6580 builder.append(", "); | 6584 builder.append(", "); |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7440 } | 7444 } |
| 7441 /** | 7445 /** |
| 7442 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 7446 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
| 7443 * `void`. | 7447 * `void`. |
| 7444 * | 7448 * |
| 7445 * @coverage dart.engine.type | 7449 * @coverage dart.engine.type |
| 7446 */ | 7450 */ |
| 7447 abstract class VoidType implements Type2 { | 7451 abstract class VoidType implements Type2 { |
| 7448 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 7452 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 7449 } | 7453 } |
| OLD | NEW |