| 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.element; | 8 library engine.element; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 3622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3633 */ | 3633 */ |
| 3634 const ElementKind(String name, int ordinal, this.displayName) : super(name, or
dinal); | 3634 const ElementKind(String name, int ordinal, this.displayName) : super(name, or
dinal); |
| 3635 } | 3635 } |
| 3636 | 3636 |
| 3637 /** | 3637 /** |
| 3638 * The interface `ElementLocation` defines the behavior of objects that represen
t the location | 3638 * The interface `ElementLocation` defines the behavior of objects that represen
t the location |
| 3639 * of an element within the element model. | 3639 * of an element within the element model. |
| 3640 */ | 3640 */ |
| 3641 abstract class ElementLocation { | 3641 abstract class ElementLocation { |
| 3642 /** | 3642 /** |
| 3643 * Return the path to the element whose location is represented by this object
. Clients must not |
| 3644 * modify the returned array. |
| 3645 * |
| 3646 * @return the path to the element whose location is represented by this objec
t |
| 3647 */ |
| 3648 List<String> get components; |
| 3649 |
| 3650 /** |
| 3643 * Return an encoded representation of this location that can be used to creat
e a location that is | 3651 * Return an encoded representation of this location that can be used to creat
e a location that is |
| 3644 * equal to this location. | 3652 * equal to this location. |
| 3645 * | 3653 * |
| 3646 * @return an encoded representation of this location | 3654 * @return an encoded representation of this location |
| 3647 */ | 3655 */ |
| 3648 String get encoding; | 3656 String get encoding; |
| 3649 } | 3657 } |
| 3650 | 3658 |
| 3651 /** | 3659 /** |
| 3652 * Instances of the class `ElementLocationImpl` implement an [ElementLocation]. | 3660 * Instances of the class `ElementLocationImpl` implement an [ElementLocation]. |
| (...skipping 26 matching lines...) Expand all Loading... |
| 3679 | 3687 |
| 3680 /** | 3688 /** |
| 3681 * Initialize a newly created location from the given encoded form. | 3689 * Initialize a newly created location from the given encoded form. |
| 3682 * | 3690 * |
| 3683 * @param encoding the encoded form of a location | 3691 * @param encoding the encoded form of a location |
| 3684 */ | 3692 */ |
| 3685 ElementLocationImpl.con2(String encoding) { | 3693 ElementLocationImpl.con2(String encoding) { |
| 3686 this._components = _decode(encoding); | 3694 this._components = _decode(encoding); |
| 3687 } | 3695 } |
| 3688 | 3696 |
| 3697 /** |
| 3698 * Initialize a newly created location from the given components. |
| 3699 * |
| 3700 * @param components the components of a location |
| 3701 */ |
| 3702 ElementLocationImpl.con3(List<String> components) { |
| 3703 this._components = components; |
| 3704 } |
| 3705 |
| 3689 @override | 3706 @override |
| 3690 bool operator ==(Object object) { | 3707 bool operator ==(Object object) { |
| 3691 if (identical(this, object)) { | 3708 if (identical(this, object)) { |
| 3692 return true; | 3709 return true; |
| 3693 } | 3710 } |
| 3694 if (object is! ElementLocationImpl) { | 3711 if (object is! ElementLocationImpl) { |
| 3695 return false; | 3712 return false; |
| 3696 } | 3713 } |
| 3697 ElementLocationImpl location = object as ElementLocationImpl; | 3714 ElementLocationImpl location = object as ElementLocationImpl; |
| 3698 List<String> otherComponents = location._components; | 3715 List<String> otherComponents = location._components; |
| 3699 int length = _components.length; | 3716 int length = _components.length; |
| 3700 if (otherComponents.length != length) { | 3717 if (otherComponents.length != length) { |
| 3701 return false; | 3718 return false; |
| 3702 } | 3719 } |
| 3703 for (int i = length - 1; i >= 2; i--) { | 3720 for (int i = length - 1; i >= 2; i--) { |
| 3704 if (_components[i] != otherComponents[i]) { | 3721 if (_components[i] != otherComponents[i]) { |
| 3705 return false; | 3722 return false; |
| 3706 } | 3723 } |
| 3707 } | 3724 } |
| 3708 if (length > 1 && !_equalSourceComponents(_components[1], otherComponents[1]
)) { | 3725 if (length > 1 && !_equalSourceComponents(_components[1], otherComponents[1]
)) { |
| 3709 return false; | 3726 return false; |
| 3710 } | 3727 } |
| 3711 if (length > 0 && !_equalSourceComponents(_components[0], otherComponents[0]
)) { | 3728 if (length > 0 && !_equalSourceComponents(_components[0], otherComponents[0]
)) { |
| 3712 return false; | 3729 return false; |
| 3713 } | 3730 } |
| 3714 return true; | 3731 return true; |
| 3715 } | 3732 } |
| 3716 | 3733 |
| 3717 /** | 3734 @override |
| 3718 * Return the path to the element whose location is represented by this object
. | |
| 3719 * | |
| 3720 * @return the path to the element whose location is represented by this objec
t | |
| 3721 */ | |
| 3722 List<String> get components => _components; | 3735 List<String> get components => _components; |
| 3723 | 3736 |
| 3724 @override | 3737 @override |
| 3725 String get encoding { | 3738 String get encoding { |
| 3726 JavaStringBuilder builder = new JavaStringBuilder(); | 3739 JavaStringBuilder builder = new JavaStringBuilder(); |
| 3727 int length = _components.length; | 3740 int length = _components.length; |
| 3728 for (int i = 0; i < length; i++) { | 3741 for (int i = 0; i < length; i++) { |
| 3729 if (i > 0) { | 3742 if (i > 0) { |
| 3730 builder.appendChar(_SEPARATOR_CHAR); | 3743 builder.appendChar(_SEPARATOR_CHAR); |
| 3731 } | 3744 } |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5150 */ | 5163 */ |
| 5151 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name); | 5164 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme
nt == null ? null : element.name); |
| 5152 | 5165 |
| 5153 @override | 5166 @override |
| 5154 bool operator ==(Object object) => internalEquals(object, new HashSet<ElementP
air>()); | 5167 bool operator ==(Object object) => internalEquals(object, new HashSet<ElementP
air>()); |
| 5155 | 5168 |
| 5156 @override | 5169 @override |
| 5157 String get displayName { | 5170 String get displayName { |
| 5158 String name = this.name; | 5171 String name = this.name; |
| 5159 if (name == null || name.length == 0) { | 5172 if (name == null || name.length == 0) { |
| 5160 // TODO(brianwilkerson) Determine whether function types should ever have
an empty name. | 5173 // Function types have an empty name when they are defined implicitly by e
ither a closure or |
| 5174 // as part of a parameter declaration. |
| 5161 List<DartType> normalParameterTypes = this.normalParameterTypes; | 5175 List<DartType> normalParameterTypes = this.normalParameterTypes; |
| 5162 List<DartType> optionalParameterTypes = this.optionalParameterTypes; | 5176 List<DartType> optionalParameterTypes = this.optionalParameterTypes; |
| 5163 Map<String, DartType> namedParameterTypes = this.namedParameterTypes; | 5177 Map<String, DartType> namedParameterTypes = this.namedParameterTypes; |
| 5164 DartType returnType = this.returnType; | 5178 DartType returnType = this.returnType; |
| 5165 JavaStringBuilder builder = new JavaStringBuilder(); | 5179 JavaStringBuilder builder = new JavaStringBuilder(); |
| 5166 builder.append("("); | 5180 builder.append("("); |
| 5167 bool needsComma = false; | 5181 bool needsComma = false; |
| 5168 if (normalParameterTypes.length > 0) { | 5182 if (normalParameterTypes.length > 0) { |
| 5169 for (DartType type in normalParameterTypes) { | 5183 for (DartType type in normalParameterTypes) { |
| 5170 if (needsComma) { | 5184 if (needsComma) { |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6067 } | 6081 } |
| 6068 | 6082 |
| 6069 @override | 6083 @override |
| 6070 void appendTo(JavaStringBuilder builder) { | 6084 void appendTo(JavaStringBuilder builder) { |
| 6071 if (source == null) { | 6085 if (source == null) { |
| 6072 builder.append("{HTML file}"); | 6086 builder.append("{HTML file}"); |
| 6073 } else { | 6087 } else { |
| 6074 builder.append(source.fullName); | 6088 builder.append(source.fullName); |
| 6075 } | 6089 } |
| 6076 } | 6090 } |
| 6091 |
| 6092 @override |
| 6093 String get identifier => source.encoding; |
| 6077 } | 6094 } |
| 6078 | 6095 |
| 6079 /** | 6096 /** |
| 6080 * The interface `HtmlScriptElement` defines the behavior of elements representi
ng a script | 6097 * The interface `HtmlScriptElement` defines the behavior of elements representi
ng a script |
| 6081 * tag in an HTML file. | 6098 * tag in an HTML file. |
| 6082 * | 6099 * |
| 6083 * @see EmbeddedHtmlScriptElement | 6100 * @see EmbeddedHtmlScriptElement |
| 6084 * @see ExternalHtmlScriptElement | 6101 * @see ExternalHtmlScriptElement |
| 6085 */ | 6102 */ |
| 6086 abstract class HtmlScriptElement implements Element { | 6103 abstract class HtmlScriptElement implements Element { |
| (...skipping 5022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11109 | 11126 |
| 11110 @override | 11127 @override |
| 11111 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id
entical(object, this); | 11128 bool internalEquals(Object object, Set<ElementPair> visitedElementPairs) => id
entical(object, this); |
| 11112 | 11129 |
| 11113 @override | 11130 @override |
| 11114 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_
TypePair> visitedTypePairs) => isSubtypeOf(type); | 11131 bool internalIsMoreSpecificThan(DartType type, bool withDynamic, Set<TypeImpl_
TypePair> visitedTypePairs) => isSubtypeOf(type); |
| 11115 | 11132 |
| 11116 @override | 11133 @override |
| 11117 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair
s) => identical(type, this) || identical(type, DynamicTypeImpl.instance); | 11134 bool internalIsSubtypeOf(DartType type, Set<TypeImpl_TypePair> visitedTypePair
s) => identical(type, this) || identical(type, DynamicTypeImpl.instance); |
| 11118 } | 11135 } |
| OLD | NEW |