| 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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 */ | 761 */ |
| 762 FunctionType get type; | 762 FunctionType get type; |
| 763 | 763 |
| 764 /** | 764 /** |
| 765 * Return an array containing all of the type variables defined for this type. | 765 * Return an array containing all of the type variables defined for this type. |
| 766 * @return the type variables defined for this type | 766 * @return the type variables defined for this type |
| 767 */ | 767 */ |
| 768 List<TypeVariableElement> get typeVariables; | 768 List<TypeVariableElement> get typeVariables; |
| 769 } | 769 } |
| 770 /** | 770 /** |
| 771 * The interface {@code HideCombinator} defines the behavior of combinators that
cause some of the | 771 * The interface {@code HideElementCombinator} defines the behavior of combinato
rs that cause some |
| 772 * names in a namespace to be hidden when being imported. | 772 * of the names in a namespace to be hidden when being imported. |
| 773 * @coverage dart.engine.element | 773 * @coverage dart.engine.element |
| 774 */ | 774 */ |
| 775 abstract class HideCombinator implements NamespaceCombinator { | 775 abstract class HideElementCombinator implements NamespaceCombinator { |
| 776 | 776 |
| 777 /** | 777 /** |
| 778 * Return an array containing the names that are not to be made visible in the
importing library | 778 * Return an array containing the names that are not to be made visible in the
importing library |
| 779 * even if they are defined in the imported library. | 779 * even if they are defined in the imported library. |
| 780 * @return the names from the imported library that are hidden from the import
ing library | 780 * @return the names from the imported library that are hidden from the import
ing library |
| 781 */ | 781 */ |
| 782 List<String> get hiddenNames; | 782 List<String> get hiddenNames; |
| 783 } | 783 } |
| 784 /** | 784 /** |
| 785 * The interface {@code HtmlElement} defines the behavior of elements representi
ng an HTML file. | 785 * The interface {@code HtmlElement} defines the behavior of elements representi
ng an HTML file. |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1157 PropertyAccessorElement get setter; | 1157 PropertyAccessorElement get setter; |
| 1158 | 1158 |
| 1159 /** | 1159 /** |
| 1160 * Return {@code true} if this element is a static element. A static element i
s an element that is | 1160 * Return {@code true} if this element is a static element. A static element i
s an element that is |
| 1161 * not associated with a particular instance, but rather with an entire librar
y or class. | 1161 * not associated with a particular instance, but rather with an entire librar
y or class. |
| 1162 * @return {@code true} if this executable element is a static element | 1162 * @return {@code true} if this executable element is a static element |
| 1163 */ | 1163 */ |
| 1164 bool isStatic(); | 1164 bool isStatic(); |
| 1165 } | 1165 } |
| 1166 /** | 1166 /** |
| 1167 * The interface {@code ShowCombinator} defines the behavior of combinators that
cause some of the | 1167 * The interface {@code ShowElementCombinator} defines the behavior of combinato
rs that cause some |
| 1168 * names in a namespace to be visible (and the rest hidden) when being imported. | 1168 * of the names in a namespace to be visible (and the rest hidden) when being im
ported. |
| 1169 * @coverage dart.engine.element | 1169 * @coverage dart.engine.element |
| 1170 */ | 1170 */ |
| 1171 abstract class ShowCombinator implements NamespaceCombinator { | 1171 abstract class ShowElementCombinator implements NamespaceCombinator { |
| 1172 | 1172 |
| 1173 /** | 1173 /** |
| 1174 * Return an array containing the names that are to be made visible in the imp
orting library if | 1174 * Return an array containing the names that are to be made visible in the imp
orting library if |
| 1175 * they are defined in the imported library. | 1175 * they are defined in the imported library. |
| 1176 * @return the names from the imported library that are visible in the importi
ng library | 1176 * @return the names from the imported library that are visible in the importi
ng library |
| 1177 */ | 1177 */ |
| 1178 List<String> get shownNames; | 1178 List<String> get shownNames; |
| 1179 } | 1179 } |
| 1180 /** | 1180 /** |
| 1181 * The interface {@code TopLevelVariableElement} defines the behavior of element
s representing a | 1181 * The interface {@code TopLevelVariableElement} defines the behavior of element
s representing a |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2625 _jtd_constructor_197_impl(encoding); | 2625 _jtd_constructor_197_impl(encoding); |
| 2626 } | 2626 } |
| 2627 _jtd_constructor_197_impl(String encoding) { | 2627 _jtd_constructor_197_impl(String encoding) { |
| 2628 this._components = decode(encoding); | 2628 this._components = decode(encoding); |
| 2629 } | 2629 } |
| 2630 bool operator ==(Object object) { | 2630 bool operator ==(Object object) { |
| 2631 if (object is! ElementLocationImpl) { | 2631 if (object is! ElementLocationImpl) { |
| 2632 return false; | 2632 return false; |
| 2633 } | 2633 } |
| 2634 ElementLocationImpl location = object as ElementLocationImpl; | 2634 ElementLocationImpl location = object as ElementLocationImpl; |
| 2635 return JavaArrays.equals(_components, location._components); | 2635 List<String> otherComponents = location._components; |
| 2636 int length = _components.length; |
| 2637 if (otherComponents.length != length) { |
| 2638 return false; |
| 2639 } |
| 2640 if (length > 0 && !equalSourceComponents(_components[0], otherComponents[0])
) { |
| 2641 return false; |
| 2642 } |
| 2643 if (length > 1 && !equalSourceComponents(_components[1], otherComponents[1])
) { |
| 2644 return false; |
| 2645 } |
| 2646 for (int i = 2; i < length; i++) { |
| 2647 if (_components[i] != otherComponents[i]) { |
| 2648 return false; |
| 2649 } |
| 2650 } |
| 2651 return true; |
| 2636 } | 2652 } |
| 2637 | 2653 |
| 2638 /** | 2654 /** |
| 2639 * Return the path to the element whose location is represented by this object
. | 2655 * Return the path to the element whose location is represented by this object
. |
| 2640 * @return the path to the element whose location is represented by this objec
t | 2656 * @return the path to the element whose location is represented by this objec
t |
| 2641 */ | 2657 */ |
| 2642 List<String> get components => _components; | 2658 List<String> get components => _components; |
| 2643 String get encoding { | 2659 String get encoding { |
| 2644 JavaStringBuilder builder = new JavaStringBuilder(); | 2660 JavaStringBuilder builder = new JavaStringBuilder(); |
| 2645 int length = _components.length; | 2661 int length = _components.length; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2694 void encode(JavaStringBuilder builder, String component) { | 2710 void encode(JavaStringBuilder builder, String component) { |
| 2695 int length = component.length; | 2711 int length = component.length; |
| 2696 for (int i = 0; i < length; i++) { | 2712 for (int i = 0; i < length; i++) { |
| 2697 int currentChar = component.codeUnitAt(i); | 2713 int currentChar = component.codeUnitAt(i); |
| 2698 if (currentChar == _SEPARATOR_CHAR) { | 2714 if (currentChar == _SEPARATOR_CHAR) { |
| 2699 builder.appendChar(_SEPARATOR_CHAR); | 2715 builder.appendChar(_SEPARATOR_CHAR); |
| 2700 } | 2716 } |
| 2701 builder.appendChar(currentChar); | 2717 builder.appendChar(currentChar); |
| 2702 } | 2718 } |
| 2703 } | 2719 } |
| 2720 |
| 2721 /** |
| 2722 * Return {@code true} if the given components, when interpreted to be encoded
sources with a |
| 2723 * leading source type indicator, are equal when the source type's are ignored
. |
| 2724 * @param left the left component being compared |
| 2725 * @param right the right component being compared |
| 2726 * @return {@code true} if the given components are equal when the source type
's are ignored |
| 2727 */ |
| 2728 bool equalSourceComponents(String left, String right) { |
| 2729 if (left == null) { |
| 2730 return right == null; |
| 2731 } else if (right == null) { |
| 2732 return false; |
| 2733 } |
| 2734 if (left.length <= 1 || right.length <= 1) { |
| 2735 return left == right; |
| 2736 } |
| 2737 return left.substring(1) == right.substring(1); |
| 2738 } |
| 2704 } | 2739 } |
| 2705 /** | 2740 /** |
| 2706 * Instances of the class {@code EmbeddedHtmlScriptElementImpl} implement an{@li
nk EmbeddedHtmlScriptElement}. | 2741 * Instances of the class {@code EmbeddedHtmlScriptElementImpl} implement an{@li
nk EmbeddedHtmlScriptElement}. |
| 2707 * @coverage dart.engine.element | 2742 * @coverage dart.engine.element |
| 2708 */ | 2743 */ |
| 2709 class EmbeddedHtmlScriptElementImpl extends HtmlScriptElementImpl implements Emb
eddedHtmlScriptElement { | 2744 class EmbeddedHtmlScriptElementImpl extends HtmlScriptElementImpl implements Emb
eddedHtmlScriptElement { |
| 2710 | 2745 |
| 2711 /** | 2746 /** |
| 2712 * The library defined by the script tag's content. | 2747 * The library defined by the script tag's content. |
| 2713 */ | 2748 */ |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 * for function expressions, which have no name. | 3143 * for function expressions, which have no name. |
| 3109 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 3144 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3110 * declaration of this element | 3145 * declaration of this element |
| 3111 */ | 3146 */ |
| 3112 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset) { | 3147 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset) { |
| 3113 _jtd_constructor_208_impl(nameOffset); | 3148 _jtd_constructor_208_impl(nameOffset); |
| 3114 } | 3149 } |
| 3115 _jtd_constructor_208_impl(int nameOffset) { | 3150 _jtd_constructor_208_impl(int nameOffset) { |
| 3116 } | 3151 } |
| 3117 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); | 3152 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); |
| 3118 String get identifier => name; | 3153 String get identifier => "${name}@${nameOffset}"; |
| 3119 ElementKind get kind => ElementKind.FUNCTION; | 3154 ElementKind get kind => ElementKind.FUNCTION; |
| 3120 SourceRange get visibleRange { | 3155 SourceRange get visibleRange { |
| 3121 if (_visibleRangeLength < 0) { | 3156 if (_visibleRangeLength < 0) { |
| 3122 return null; | 3157 return null; |
| 3123 } | 3158 } |
| 3124 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); | 3159 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); |
| 3125 } | 3160 } |
| 3126 bool isStatic() => enclosingElement is CompilationUnitElement; | 3161 bool isStatic() => enclosingElement is CompilationUnitElement; |
| 3127 | 3162 |
| 3128 /** | 3163 /** |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3255 ((_parameters[i] as ParameterElementImpl)).appendTo(builder); | 3290 ((_parameters[i] as ParameterElementImpl)).appendTo(builder); |
| 3256 } | 3291 } |
| 3257 builder.append(")"); | 3292 builder.append(")"); |
| 3258 if (_type != null) { | 3293 if (_type != null) { |
| 3259 builder.append(" -> "); | 3294 builder.append(" -> "); |
| 3260 builder.append(_type.returnType); | 3295 builder.append(_type.returnType); |
| 3261 } | 3296 } |
| 3262 } | 3297 } |
| 3263 } | 3298 } |
| 3264 /** | 3299 /** |
| 3265 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. | 3300 * Instances of the class {@code HideElementCombinatorImpl} implement a{@link Hi
deElementCombinator}. |
| 3266 * @coverage dart.engine.element | 3301 * @coverage dart.engine.element |
| 3267 */ | 3302 */ |
| 3268 class HideCombinatorImpl implements HideCombinator { | 3303 class HideElementCombinatorImpl implements HideElementCombinator { |
| 3269 | 3304 |
| 3270 /** | 3305 /** |
| 3271 * The names that are not to be made visible in the importing library even if
they are defined in | 3306 * The names that are not to be made visible in the importing library even if
they are defined in |
| 3272 * the imported library. | 3307 * the imported library. |
| 3273 */ | 3308 */ |
| 3274 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; | 3309 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; |
| 3275 List<String> get hiddenNames => _hiddenNames; | 3310 List<String> get hiddenNames => _hiddenNames; |
| 3276 | 3311 |
| 3277 /** | 3312 /** |
| 3278 * Set the names that are not to be made visible in the importing library even
if they are defined | 3313 * Set the names that are not to be made visible in the importing library even
if they are defined |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3822 */ | 3857 */ |
| 3823 void setVisibleRange(int offset, int length) { | 3858 void setVisibleRange(int offset, int length) { |
| 3824 _visibleRangeOffset = offset; | 3859 _visibleRangeOffset = offset; |
| 3825 _visibleRangeLength = length; | 3860 _visibleRangeLength = length; |
| 3826 } | 3861 } |
| 3827 void appendTo(JavaStringBuilder builder) { | 3862 void appendTo(JavaStringBuilder builder) { |
| 3828 builder.append(type); | 3863 builder.append(type); |
| 3829 builder.append(" "); | 3864 builder.append(" "); |
| 3830 builder.append(displayName); | 3865 builder.append(displayName); |
| 3831 } | 3866 } |
| 3867 String get identifier => "${super.identifier}@${nameOffset}"; |
| 3832 } | 3868 } |
| 3833 /** | 3869 /** |
| 3834 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. | 3870 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. |
| 3835 * @coverage dart.engine.element | 3871 * @coverage dart.engine.element |
| 3836 */ | 3872 */ |
| 3837 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { | 3873 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { |
| 3838 | 3874 |
| 3839 /** | 3875 /** |
| 3840 * An empty array of method elements. | 3876 * An empty array of method elements. |
| 3841 */ | 3877 */ |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4384 | 4420 |
| 4385 /** | 4421 /** |
| 4386 * Set the setter associated with this element to the given accessor. | 4422 * Set the setter associated with this element to the given accessor. |
| 4387 * @param setter the setter associated with this element | 4423 * @param setter the setter associated with this element |
| 4388 */ | 4424 */ |
| 4389 void set setter(PropertyAccessorElement setter2) { | 4425 void set setter(PropertyAccessorElement setter2) { |
| 4390 this._setter = setter2; | 4426 this._setter = setter2; |
| 4391 } | 4427 } |
| 4392 } | 4428 } |
| 4393 /** | 4429 /** |
| 4394 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. | 4430 * Instances of the class {@code ShowElementCombinatorImpl} implement a{@link Sh
owElementCombinator}. |
| 4395 * @coverage dart.engine.element | 4431 * @coverage dart.engine.element |
| 4396 */ | 4432 */ |
| 4397 class ShowCombinatorImpl implements ShowCombinator { | 4433 class ShowElementCombinatorImpl implements ShowElementCombinator { |
| 4398 | 4434 |
| 4399 /** | 4435 /** |
| 4400 * The names that are to be made visible in the importing library if they are
defined in the | 4436 * The names that are to be made visible in the importing library if they are
defined in the |
| 4401 * imported library. | 4437 * imported library. |
| 4402 */ | 4438 */ |
| 4403 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; | 4439 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; |
| 4404 List<String> get shownNames => _shownNames; | 4440 List<String> get shownNames => _shownNames; |
| 4405 | 4441 |
| 4406 /** | 4442 /** |
| 4407 * Set the names that are to be made visible in the importing library if they
are defined in the | 4443 * Set the names that are to be made visible in the importing library if they
are defined in the |
| (...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5232 * @param firstTypes the first map of name/type pairs being compared | 5268 * @param firstTypes the first map of name/type pairs being compared |
| 5233 * @param secondTypes the second map of name/type pairs being compared | 5269 * @param secondTypes the second map of name/type pairs being compared |
| 5234 * @return {@code true} if all of the name/type pairs in the first map are equ
al to the | 5270 * @return {@code true} if all of the name/type pairs in the first map are equ
al to the |
| 5235 * corresponding name/type pairs in the second map | 5271 * corresponding name/type pairs in the second map |
| 5236 */ | 5272 */ |
| 5237 static bool equals2(Map<String, Type2> firstTypes, Map<String, Type2> secondTy
pes) { | 5273 static bool equals2(Map<String, Type2> firstTypes, Map<String, Type2> secondTy
pes) { |
| 5238 if (secondTypes.length != firstTypes.length) { | 5274 if (secondTypes.length != firstTypes.length) { |
| 5239 return false; | 5275 return false; |
| 5240 } | 5276 } |
| 5241 JavaIterator<MapEntry<String, Type2>> firstIterator = new JavaIterator(getMa
pEntrySet(firstTypes)); | 5277 JavaIterator<MapEntry<String, Type2>> firstIterator = new JavaIterator(getMa
pEntrySet(firstTypes)); |
| 5242 JavaIterator<MapEntry<String, Type2>> secondIterator = new JavaIterator(getM
apEntrySet(firstTypes)); | 5278 JavaIterator<MapEntry<String, Type2>> secondIterator = new JavaIterator(getM
apEntrySet(secondTypes)); |
| 5243 while (firstIterator.hasNext) { | 5279 while (firstIterator.hasNext) { |
| 5244 MapEntry<String, Type2> firstEntry = firstIterator.next(); | 5280 MapEntry<String, Type2> firstEntry = firstIterator.next(); |
| 5245 MapEntry<String, Type2> secondEntry = secondIterator.next(); | 5281 MapEntry<String, Type2> secondEntry = secondIterator.next(); |
| 5246 if (firstEntry.getKey() != secondEntry.getKey() || firstEntry.getValue() !
= secondEntry.getValue()) { | 5282 if (firstEntry.getKey() != secondEntry.getKey() || firstEntry.getValue() !
= secondEntry.getValue()) { |
| 5247 return false; | 5283 return false; |
| 5248 } | 5284 } |
| 5249 } | 5285 } |
| 5250 return true; | 5286 return true; |
| 5251 } | 5287 } |
| 5252 | 5288 |
| (...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6887 abstract class TypeVariableType implements Type2 { | 6923 abstract class TypeVariableType implements Type2 { |
| 6888 TypeVariableElement get element; | 6924 TypeVariableElement get element; |
| 6889 } | 6925 } |
| 6890 /** | 6926 /** |
| 6891 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. | 6927 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. |
| 6892 * @coverage dart.engine.type | 6928 * @coverage dart.engine.type |
| 6893 */ | 6929 */ |
| 6894 abstract class VoidType implements Type2 { | 6930 abstract class VoidType implements Type2 { |
| 6895 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 6931 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 6896 } | 6932 } |
| OLD | NEW |