Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: pkg/analyzer_experimental/lib/src/generated/element.dart

Issue 14050010: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 3
4 library engine.element; 4 library engine.element;
5 5
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'java_core.dart'; 7 import 'java_core.dart';
8 import 'java_engine.dart'; 8 import 'java_engine.dart';
9 import 'source.dart'; 9 import 'source.dart';
10 import 'scanner.dart' show Keyword; 10 import 'scanner.dart' show Keyword;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 * Return {@code true} if this class can validly be used as a mixin when defin ing another class. 116 * Return {@code true} if this class can validly be used as a mixin when defin ing another class.
117 * The behavior of this method is defined by the Dart Language Specification i n section 9: 117 * The behavior of this method is defined by the Dart Language Specification i n section 9:
118 * <blockquote>It is a compile-time error if a declared or derived mixin refer s to super. It is a 118 * <blockquote>It is a compile-time error if a declared or derived mixin refer s to super. It is a
119 * compile-time error if a declared or derived mixin explicitly declares a con structor. It is a 119 * compile-time error if a declared or derived mixin explicitly declares a con structor. It is a
120 * compile-time error if a mixin is derived from a class whose superclass is n ot 120 * compile-time error if a mixin is derived from a class whose superclass is n ot
121 * Object.</blockquote> 121 * Object.</blockquote>
122 * @return {@code true} if this class can validly be used as a mixin 122 * @return {@code true} if this class can validly be used as a mixin
123 */ 123 */
124 bool isValidMixin(); 124 bool isValidMixin();
125 /** 125 /**
126 * Return the executable element representing the method, getter or setter tha t results from
127 * looking up the given member in this class with respect to the given library , or {@code null} if
128 * the look up fails. This method is used to determine what member the passed name is inherited
129 * from. The behavior of this method is defined by the Dart Language Specifica tion in section
130 * 8.1.1: Let <i>C</i> be a class declared in library <i>L</i> with superclass <i>S</i> and let
131 * <i>C</i> declare an instance member <i>m</i>, and assume <i>S</i> declares an instance member
132 * </i>m'</i> with the same name as m. Then <i>m</i> overrides m'</i> iff <i>m '</i> is accessible
133 * to <i>L</i>, <i>m</i> has the same name as <i>m'</i> and neither <i>m</i> n or <i>m'</i> are
134 * fields.
135 * @param memberName the name of the member being looked up
136 * @param library the library with respect to which the lookup is being perfor med
137 * @return the result of looking up the given member in this class with respec t to the given
138 * library
139 */
140 ExecutableElement lookUpExecutable(String memberName, LibraryElement library);
141 /**
126 * Return the element representing the getter that results from looking up the given getter in 142 * Return the element representing the getter that results from looking up the given getter in
127 * this class with respect to the given library, or {@code null} if the look u p fails. The 143 * this class with respect to the given library, or {@code null} if the look u p fails. The
128 * behavior of this method is defined by the Dart Language Specification in se ction 12.15.1: 144 * behavior of this method is defined by the Dart Language Specification in se ction 12.15.1:
129 * <blockquote>The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i> 145 * <blockquote>The result of looking up getter (respectively setter) <i>m</i> in class <i>C</i>
130 * with respect to library <i>L</i> is: 146 * with respect to library <i>L</i> is:
131 * <ul> 147 * <ul>
132 * <li>If <i>C</i> declares an instance getter (respectively setter) named <i> m</i> that is 148 * <li>If <i>C</i> declares an instance getter (respectively setter) named <i> m</i> that is
133 * accessible to <i>L</i>, then that getter (respectively setter) is the resul t of the lookup. 149 * accessible to <i>L</i>, then that getter (respectively setter) is the resul t of the lookup.
134 * Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lo okup is the result 150 * Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the lo okup is the result
135 * of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respec t to <i>L</i>. 151 * of looking up getter (respectively setter) <i>m</i> in <i>S</i> with respec t to <i>L</i>.
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 * offset will be sorted to be before elements with a larger name offset. 292 * offset will be sorted to be before elements with a larger name offset.
277 */ 293 */
278 static Comparator<Element> SORT_BY_OFFSET = (Element firstElement, Element sec ondElement) => firstElement.nameOffset - secondElement.nameOffset; 294 static Comparator<Element> SORT_BY_OFFSET = (Element firstElement, Element sec ondElement) => firstElement.nameOffset - secondElement.nameOffset;
279 /** 295 /**
280 * Use the given visitor to visit this element. 296 * Use the given visitor to visit this element.
281 * @param visitor the visitor that will visit this element 297 * @param visitor the visitor that will visit this element
282 * @return the value returned by the visitor as a result of visiting this elem ent 298 * @return the value returned by the visitor as a result of visiting this elem ent
283 */ 299 */
284 accept(ElementVisitor visitor); 300 accept(ElementVisitor visitor);
285 /** 301 /**
302 * Return the documentation comment for this element as it appears in the orig inal source
303 * (complete with the beginning and ending delimiters), or {@code null} if thi s element does not
304 * have a documentation comment associated with it. This can be a long-running operation if the
305 * information needed to access the comment is not cached.
306 * @return this element's documentation comment
307 * @throws AnalysisException if the documentation comment could not be determi ned because the
308 * analysis could not be performed
309 */
310 String computeDocumentationComment();
311 /**
286 * Return the element of the given class that most immediately encloses this e lement, or{@code null} if there is no enclosing element of the given class. 312 * Return the element of the given class that most immediately encloses this e lement, or{@code null} if there is no enclosing element of the given class.
287 * @param elementClass the class of the element to be returned 313 * @param elementClass the class of the element to be returned
288 * @return the element that encloses this element 314 * @return the element that encloses this element
289 */ 315 */
290 Element getAncestor(Type elementClass); 316 Element getAncestor(Type elementClass);
291 /** 317 /**
292 * Return the analysis context in which this element is defined. 318 * Return the analysis context in which this element is defined.
293 * @return the analysis context in which this element is defined 319 * @return the analysis context in which this element is defined
294 */ 320 */
295 AnalysisContext get context; 321 AnalysisContext get context;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix "); 416 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix ");
391 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter"); 417 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter");
392 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 21, "top level variable"); 418 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 21, "top level variable");
393 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 22, "function type alias"); 419 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 22, "function type alias");
394 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23, "type variable"); 420 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23, "type variable");
395 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe >"); 421 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe >");
396 static final List<ElementKind> values = [CLASS, COMPILATION_UNIT, CONSTRUCTOR, DYNAMIC, EMBEDDED_HTML_SCRIPT, ERROR, EXPORT, EXTERNAL_HTML_SCRIPT, FIELD, FUNC TION, GETTER, HTML, IMPORT, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, NAME, PARAME TER, PREFIX, SETTER, TOP_LEVEL_VARIABLE, FUNCTION_TYPE_ALIAS, TYPE_VARIABLE, UNI VERSE]; 422 static final List<ElementKind> values = [CLASS, COMPILATION_UNIT, CONSTRUCTOR, DYNAMIC, EMBEDDED_HTML_SCRIPT, ERROR, EXPORT, EXTERNAL_HTML_SCRIPT, FIELD, FUNC TION, GETTER, HTML, IMPORT, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, NAME, PARAME TER, PREFIX, SETTER, TOP_LEVEL_VARIABLE, FUNCTION_TYPE_ALIAS, TYPE_VARIABLE, UNI VERSE];
397 final String __name; 423 final String __name;
398 final int __ordinal; 424 final int __ordinal;
399 int get ordinal => __ordinal; 425 int get ordinal => __ordinal;
426 /**
427 * Return the kind of the given element, or {@link #ERROR} if the element is { @code null}. This is
428 * a utility method that can reduce the need for null checks in other places.
429 * @param element the element whose kind is to be returned
430 * @return the kind of the given element
431 */
432 static ElementKind of(Element element) {
433 if (element == null) {
434 return ERROR;
435 }
436 return element.kind;
437 }
438 /**
439 * The name displayed in the UI for this kind of element.
440 */
400 String _displayName; 441 String _displayName;
442 /**
443 * Initialize a newly created element kind to have the given display name.
444 * @param displayName the name displayed in the UI for this kind of element
445 */
401 ElementKind(this.__name, this.__ordinal, String displayName) { 446 ElementKind(this.__name, this.__ordinal, String displayName) {
402 this._displayName = displayName; 447 this._displayName = displayName;
403 } 448 }
404 /** 449 /**
450 * Return the name displayed in the UI for this kind of element.
405 * @return the name of this {@link ElementKind} to display in UI. 451 * @return the name of this {@link ElementKind} to display in UI.
406 */ 452 */
407 String get displayName => _displayName; 453 String get displayName => _displayName;
408 int compareTo(ElementKind other) => __ordinal - other.__ordinal; 454 int compareTo(ElementKind other) => __ordinal - other.__ordinal;
409 String toString() => __name; 455 String toString() => __name;
410 } 456 }
411 /** 457 /**
412 * The interface {@code ElementLocation} defines the behavior of objects that re present the location 458 * The interface {@code ElementLocation} defines the behavior of objects that re present the location
413 * of an element within the element model. 459 * of an element within the element model.
414 * @coverage dart.engine.element 460 * @coverage dart.engine.element
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 } 1393 }
1348 for (TypeVariableElement typeVariable in _typeVariables) { 1394 for (TypeVariableElement typeVariable in _typeVariables) {
1349 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) { 1395 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) {
1350 return typeVariable as TypeVariableElementImpl; 1396 return typeVariable as TypeVariableElementImpl;
1351 } 1397 }
1352 } 1398 }
1353 return null; 1399 return null;
1354 } 1400 }
1355 List<ConstructorElement> get constructors => _constructors; 1401 List<ConstructorElement> get constructors => _constructors;
1356 /** 1402 /**
1403 * Return the executable elemement representing the getter, setter or method w ith the given name
1404 * that is declared in this class, or {@code null} if this class does not decl are a member with
1405 * the given name.
1406 * @param memberName the name of the getter to be returned
1407 * @return the member declared in this class with the given name
1408 */
1409 ExecutableElement getExecutable(String memberName) {
1410 for (PropertyAccessorElement accessor in _accessors) {
1411 if (accessor.name == memberName) {
1412 return accessor;
1413 }
1414 }
1415 return getMethod(memberName);
1416 }
1417 /**
1357 * Given some name, this returns the {@link FieldElement} with the matching na me, if there is no 1418 * Given some name, this returns the {@link FieldElement} with the matching na me, if there is no
1358 * such field, then {@code null} is returned. 1419 * such field, then {@code null} is returned.
1359 * @param name some name to lookup a field element with 1420 * @param name some name to lookup a field element with
1360 * @return the matching field element, or {@code null} if no such element was found 1421 * @return the matching field element, or {@code null} if no such element was found
1361 */ 1422 */
1362 FieldElement getField(String name2) { 1423 FieldElement getField(String name2) {
1363 for (FieldElement fieldElement in _fields) { 1424 for (FieldElement fieldElement in _fields) {
1364 if (name2 == fieldElement.name) { 1425 if (name2 == fieldElement.name) {
1365 return fieldElement; 1426 return fieldElement;
1366 } 1427 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1431 String name2 = element.name; 1492 String name2 = element.name;
1432 if (name2 == null || name2.isEmpty) { 1493 if (name2 == null || name2.isEmpty) {
1433 return element; 1494 return element;
1434 } 1495 }
1435 } 1496 }
1436 return null; 1497 return null;
1437 } 1498 }
1438 bool isAbstract() => hasModifier(Modifier.ABSTRACT); 1499 bool isAbstract() => hasModifier(Modifier.ABSTRACT);
1439 bool isTypedef() => hasModifier(Modifier.TYPEDEF); 1500 bool isTypedef() => hasModifier(Modifier.TYPEDEF);
1440 bool isValidMixin() => hasModifier(Modifier.MIXIN); 1501 bool isValidMixin() => hasModifier(Modifier.MIXIN);
1441 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) { 1502 ExecutableElement lookUpExecutable(String memberName, LibraryElement library) {
1442 PropertyAccessorElement element = getGetter(getterName); 1503 ExecutableElement element = getExecutable(memberName);
1443 if (element != null && element.isAccessibleIn(library)) { 1504 if (element != null && element.isAccessibleIn(library)) {
1444 return element; 1505 return element;
1445 } 1506 }
1446 for (InterfaceType mixin in _mixins) { 1507 for (InterfaceType mixin in _mixins) {
1447 ClassElement mixinElement = mixin.element; 1508 ClassElement mixinElement = mixin.element;
1448 if (mixinElement != null) { 1509 if (mixinElement != null) {
1449 element = ((mixinElement as ClassElementImpl)).getGetter(getterName); 1510 ClassElementImpl mixinElementImpl = mixinElement as ClassElementImpl;
1511 element = mixinElementImpl.getExecutable(memberName);
1450 if (element != null && element.isAccessibleIn(library)) { 1512 if (element != null && element.isAccessibleIn(library)) {
1451 return element; 1513 return element;
1452 } 1514 }
1453 } 1515 }
1454 } 1516 }
1455 if (_supertype != null) { 1517 if (_supertype != null) {
1456 ClassElement supertypeElement = _supertype.element; 1518 ClassElement supertypeElement = _supertype.element;
1457 if (supertypeElement != null) { 1519 if (supertypeElement != null) {
1458 element = supertypeElement.lookUpGetter(getterName, library); 1520 return supertypeElement.lookUpExecutable(memberName, library);
1521 }
1522 }
1523 return null;
1524 }
1525 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) {
1526 PropertyAccessorElement element = getGetter(getterName);
1527 if (element != null && element.isAccessibleIn(library)) {
1528 return element;
1529 }
1530 for (InterfaceType mixin in _mixins) {
1531 ClassElement mixinElement = mixin.element;
1532 if (mixinElement != null) {
1533 element = ((mixinElement as ClassElementImpl)).getGetter(getterName);
1459 if (element != null && element.isAccessibleIn(library)) { 1534 if (element != null && element.isAccessibleIn(library)) {
1460 return element; 1535 return element;
1461 } 1536 }
1462 } 1537 }
1463 } 1538 }
1539 if (_supertype != null) {
1540 ClassElement supertypeElement = _supertype.element;
1541 if (supertypeElement != null) {
1542 return supertypeElement.lookUpGetter(getterName, library);
1543 }
1544 }
1464 return null; 1545 return null;
1465 } 1546 }
1466 MethodElement lookUpMethod(String methodName, LibraryElement library) { 1547 MethodElement lookUpMethod(String methodName, LibraryElement library) {
1467 MethodElement element = getMethod(methodName); 1548 MethodElement element = getMethod(methodName);
1468 if (element != null && element.isAccessibleIn(library)) { 1549 if (element != null && element.isAccessibleIn(library)) {
1469 return element; 1550 return element;
1470 } 1551 }
1471 for (InterfaceType mixin in _mixins) { 1552 for (InterfaceType mixin in _mixins) {
1472 ClassElement mixinElement = mixin.element; 1553 ClassElement mixinElement = mixin.element;
1473 if (mixinElement != null) { 1554 if (mixinElement != null) {
1474 element = ((mixinElement as ClassElementImpl)).getMethod(methodName); 1555 element = ((mixinElement as ClassElementImpl)).getMethod(methodName);
1475 if (element != null && element.isAccessibleIn(library)) { 1556 if (element != null && element.isAccessibleIn(library)) {
1476 return element; 1557 return element;
1477 } 1558 }
1478 } 1559 }
1479 } 1560 }
1480 if (_supertype != null) { 1561 if (_supertype != null) {
1481 ClassElement supertypeElement = _supertype.element; 1562 ClassElement supertypeElement = _supertype.element;
1482 if (supertypeElement != null) { 1563 if (supertypeElement != null) {
1483 element = supertypeElement.lookUpMethod(methodName, library); 1564 return supertypeElement.lookUpMethod(methodName, library);
1484 if (element != null && element.isAccessibleIn(library)) {
1485 return element;
1486 }
1487 } 1565 }
1488 } 1566 }
1489 return null; 1567 return null;
1490 } 1568 }
1491 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library ) { 1569 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library ) {
1492 PropertyAccessorElement element = getSetter(setterName); 1570 PropertyAccessorElement element = getSetter(setterName);
1493 if (element != null && element.isAccessibleIn(library)) { 1571 if (element != null && element.isAccessibleIn(library)) {
1494 return element; 1572 return element;
1495 } 1573 }
1496 for (InterfaceType mixin in _mixins) { 1574 for (InterfaceType mixin in _mixins) {
1497 ClassElement mixinElement = mixin.element; 1575 ClassElement mixinElement = mixin.element;
1498 if (mixinElement != null) { 1576 if (mixinElement != null) {
1499 element = ((mixinElement as ClassElementImpl)).getSetter(setterName); 1577 element = ((mixinElement as ClassElementImpl)).getSetter(setterName);
1500 if (element != null && element.isAccessibleIn(library)) { 1578 if (element != null && element.isAccessibleIn(library)) {
1501 return element; 1579 return element;
1502 } 1580 }
1503 } 1581 }
1504 } 1582 }
1505 if (_supertype != null) { 1583 if (_supertype != null) {
1506 ClassElement supertypeElement = _supertype.element; 1584 ClassElement supertypeElement = _supertype.element;
1507 if (supertypeElement != null) { 1585 if (supertypeElement != null) {
1508 element = supertypeElement.lookUpSetter(setterName, library); 1586 return supertypeElement.lookUpSetter(setterName, library);
1509 if (element != null && element.isAccessibleIn(library)) {
1510 return element;
1511 }
1512 } 1587 }
1513 } 1588 }
1514 return null; 1589 return null;
1515 } 1590 }
1516 /** 1591 /**
1517 * Set whether this class is abstract to correspond to the given value. 1592 * Set whether this class is abstract to correspond to the given value.
1518 * @param isAbstract {@code true} if the class is abstract 1593 * @param isAbstract {@code true} if the class is abstract
1519 */ 1594 */
1520 void set abstract(bool isAbstract) { 1595 void set abstract(bool isAbstract) {
1521 setModifier(Modifier.ABSTRACT, isAbstract); 1596 setModifier(Modifier.ABSTRACT, isAbstract);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
2014 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; 2089 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY;
2015 /** 2090 /**
2016 * A cached copy of the calculated hashCode for this element. 2091 * A cached copy of the calculated hashCode for this element.
2017 */ 2092 */
2018 int _cachedHashCode = 0; 2093 int _cachedHashCode = 0;
2019 /** 2094 /**
2020 * Initialize a newly created element to have the given name. 2095 * Initialize a newly created element to have the given name.
2021 * @param name the name of this element 2096 * @param name the name of this element
2022 */ 2097 */
2023 ElementImpl.con1(Identifier name2) { 2098 ElementImpl.con1(Identifier name2) {
2024 _jtd_constructor_188_impl(name2); 2099 _jtd_constructor_189_impl(name2);
2025 } 2100 }
2026 _jtd_constructor_188_impl(Identifier name2) { 2101 _jtd_constructor_189_impl(Identifier name2) {
2027 _jtd_constructor_189_impl(name2 == null ? "" : name2.name, name2 == null ? - 1 : name2.offset); 2102 _jtd_constructor_190_impl(name2 == null ? "" : name2.name, name2 == null ? - 1 : name2.offset);
2028 } 2103 }
2029 /** 2104 /**
2030 * Initialize a newly created element to have the given name. 2105 * Initialize a newly created element to have the given name.
2031 * @param name the name of this element 2106 * @param name the name of this element
2032 * @param nameOffset the offset of the name of this element in the file that c ontains the 2107 * @param nameOffset the offset of the name of this element in the file that c ontains the
2033 * declaration of this element 2108 * declaration of this element
2034 */ 2109 */
2035 ElementImpl.con2(String name2, int nameOffset2) { 2110 ElementImpl.con2(String name2, int nameOffset2) {
2036 _jtd_constructor_189_impl(name2, nameOffset2); 2111 _jtd_constructor_190_impl(name2, nameOffset2);
2037 } 2112 }
2038 _jtd_constructor_189_impl(String name2, int nameOffset2) { 2113 _jtd_constructor_190_impl(String name2, int nameOffset2) {
2039 this._name = StringUtilities.intern(name2); 2114 this._name = StringUtilities.intern(name2);
2040 this._nameOffset = nameOffset2; 2115 this._nameOffset = nameOffset2;
2041 } 2116 }
2117 String computeDocumentationComment() {
2118 AnalysisContext context2 = context;
2119 if (context2 == null) {
2120 return null;
2121 }
2122 return context2.computeDocumentationComment(this);
2123 }
2042 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location; 2124 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location;
2043 Element getAncestor(Type elementClass) { 2125 Element getAncestor(Type elementClass) {
2044 Element ancestor = _enclosingElement; 2126 Element ancestor = _enclosingElement;
2045 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { 2127 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) {
2046 ancestor = ancestor.enclosingElement; 2128 ancestor = ancestor.enclosingElement;
2047 } 2129 }
2048 return ancestor as Element; 2130 return ancestor as Element;
2049 } 2131 }
2050 /** 2132 /**
2051 * Return the child of this element that is uniquely identified by the given i dentifier, or{@code null} if there is no such child. 2133 * Return the child of this element that is uniquely identified by the given i dentifier, or{@code null} if there is no such child.
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 List<String> _components; 2283 List<String> _components;
2202 /** 2284 /**
2203 * The character used to separate components in the encoded form. 2285 * The character used to separate components in the encoded form.
2204 */ 2286 */
2205 static int _SEPARATOR_CHAR = 0x3B; 2287 static int _SEPARATOR_CHAR = 0x3B;
2206 /** 2288 /**
2207 * Initialize a newly created location to represent the given element. 2289 * Initialize a newly created location to represent the given element.
2208 * @param element the element whose location is being represented 2290 * @param element the element whose location is being represented
2209 */ 2291 */
2210 ElementLocationImpl.con1(Element element) { 2292 ElementLocationImpl.con1(Element element) {
2211 _jtd_constructor_190_impl(element); 2293 _jtd_constructor_191_impl(element);
2212 } 2294 }
2213 _jtd_constructor_190_impl(Element element) { 2295 _jtd_constructor_191_impl(Element element) {
2214 List<String> components = new List<String>(); 2296 List<String> components = new List<String>();
2215 Element ancestor = element; 2297 Element ancestor = element;
2216 while (ancestor != null) { 2298 while (ancestor != null) {
2217 components.insert(0, ((ancestor as ElementImpl)).identifier); 2299 components.insert(0, ((ancestor as ElementImpl)).identifier);
2218 ancestor = ancestor.enclosingElement; 2300 ancestor = ancestor.enclosingElement;
2219 } 2301 }
2220 this._components = new List.from(components); 2302 this._components = new List.from(components);
2221 } 2303 }
2222 /** 2304 /**
2223 * Initialize a newly created location from the given encoded form. 2305 * Initialize a newly created location from the given encoded form.
2224 * @param encoding the encoded form of a location 2306 * @param encoding the encoded form of a location
2225 */ 2307 */
2226 ElementLocationImpl.con2(String encoding) { 2308 ElementLocationImpl.con2(String encoding) {
2227 _jtd_constructor_191_impl(encoding); 2309 _jtd_constructor_192_impl(encoding);
2228 } 2310 }
2229 _jtd_constructor_191_impl(String encoding) { 2311 _jtd_constructor_192_impl(String encoding) {
2230 this._components = decode(encoding); 2312 this._components = decode(encoding);
2231 } 2313 }
2232 bool operator ==(Object object) { 2314 bool operator ==(Object object) {
2233 if (object is! ElementLocationImpl) { 2315 if (object is! ElementLocationImpl) {
2234 return false; 2316 return false;
2235 } 2317 }
2236 ElementLocationImpl location = object as ElementLocationImpl; 2318 ElementLocationImpl location = object as ElementLocationImpl;
2237 return JavaArrays.equals(_components, location._components); 2319 return JavaArrays.equals(_components, location._components);
2238 } 2320 }
2239 /** 2321 /**
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2358 FunctionType _type; 2440 FunctionType _type;
2359 /** 2441 /**
2360 * An empty array of executable elements. 2442 * An empty array of executable elements.
2361 */ 2443 */
2362 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); 2444 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0);
2363 /** 2445 /**
2364 * Initialize a newly created executable element to have the given name. 2446 * Initialize a newly created executable element to have the given name.
2365 * @param name the name of this element 2447 * @param name the name of this element
2366 */ 2448 */
2367 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { 2449 ExecutableElementImpl.con1(Identifier name) : super.con1(name) {
2368 _jtd_constructor_193_impl(name); 2450 _jtd_constructor_194_impl(name);
2369 } 2451 }
2370 _jtd_constructor_193_impl(Identifier name) { 2452 _jtd_constructor_194_impl(Identifier name) {
2371 } 2453 }
2372 /** 2454 /**
2373 * Initialize a newly created executable element to have the given name. 2455 * Initialize a newly created executable element to have the given name.
2374 * @param name the name of this element 2456 * @param name the name of this element
2375 * @param nameOffset the offset of the name of this element in the file that c ontains the 2457 * @param nameOffset the offset of the name of this element in the file that c ontains the
2376 * declaration of this element 2458 * declaration of this element
2377 */ 2459 */
2378 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset) { 2460 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset) {
2379 _jtd_constructor_194_impl(name, nameOffset); 2461 _jtd_constructor_195_impl(name, nameOffset);
2380 } 2462 }
2381 _jtd_constructor_194_impl(String name, int nameOffset) { 2463 _jtd_constructor_195_impl(String name, int nameOffset) {
2382 } 2464 }
2383 ElementImpl getChild(String identifier2) { 2465 ElementImpl getChild(String identifier2) {
2384 for (ExecutableElement function in _functions) { 2466 for (ExecutableElement function in _functions) {
2385 if (((function as ExecutableElementImpl)).identifier == identifier2) { 2467 if (((function as ExecutableElementImpl)).identifier == identifier2) {
2386 return function as ExecutableElementImpl; 2468 return function as ExecutableElementImpl;
2387 } 2469 }
2388 } 2470 }
2389 for (LabelElement label in _labels) { 2471 for (LabelElement label in _labels) {
2390 if (((label as LabelElementImpl)).identifier == identifier2) { 2472 if (((label as LabelElementImpl)).identifier == identifier2) {
2391 return label as LabelElementImpl; 2473 return label as LabelElementImpl;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2515 * library. 2597 * library.
2516 * @param exportedLibrary the library that is exported from this library 2598 * @param exportedLibrary the library that is exported from this library
2517 */ 2599 */
2518 void set exportedLibrary(LibraryElement exportedLibrary2) { 2600 void set exportedLibrary(LibraryElement exportedLibrary2) {
2519 this._exportedLibrary = exportedLibrary2; 2601 this._exportedLibrary = exportedLibrary2;
2520 } 2602 }
2521 void appendTo(JavaStringBuilder builder) { 2603 void appendTo(JavaStringBuilder builder) {
2522 builder.append("export "); 2604 builder.append("export ");
2523 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder); 2605 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder);
2524 } 2606 }
2607 String get identifier => _exportedLibrary.name;
2525 } 2608 }
2526 /** 2609 /**
2527 * Instances of the class {@code ExternalHtmlScriptElementImpl} implement an{@li nk ExternalHtmlScriptElement}. 2610 * Instances of the class {@code ExternalHtmlScriptElementImpl} implement an{@li nk ExternalHtmlScriptElement}.
2528 * @coverage dart.engine.element 2611 * @coverage dart.engine.element
2529 */ 2612 */
2530 class ExternalHtmlScriptElementImpl extends HtmlScriptElementImpl implements Ext ernalHtmlScriptElement { 2613 class ExternalHtmlScriptElementImpl extends HtmlScriptElementImpl implements Ext ernalHtmlScriptElement {
2531 /** 2614 /**
2532 * The source specified in the {@code source} attribute or {@code null} if uns pecified. 2615 * The source specified in the {@code source} attribute or {@code null} if uns pecified.
2533 */ 2616 */
2534 Source _scriptSource; 2617 Source _scriptSource;
(...skipping 21 matching lines...) Expand all
2556 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme nt { 2639 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme nt {
2557 /** 2640 /**
2558 * An empty array of field elements. 2641 * An empty array of field elements.
2559 */ 2642 */
2560 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); 2643 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0);
2561 /** 2644 /**
2562 * Initialize a newly created field element to have the given name. 2645 * Initialize a newly created field element to have the given name.
2563 * @param name the name of this element 2646 * @param name the name of this element
2564 */ 2647 */
2565 FieldElementImpl.con1(Identifier name) : super.con1(name) { 2648 FieldElementImpl.con1(Identifier name) : super.con1(name) {
2566 _jtd_constructor_197_impl(name); 2649 _jtd_constructor_198_impl(name);
2567 } 2650 }
2568 _jtd_constructor_197_impl(Identifier name) { 2651 _jtd_constructor_198_impl(Identifier name) {
2569 } 2652 }
2570 /** 2653 /**
2571 * Initialize a newly created synthetic field element to have the given name. 2654 * Initialize a newly created synthetic field element to have the given name.
2572 * @param name the name of this element 2655 * @param name the name of this element
2573 */ 2656 */
2574 FieldElementImpl.con2(String name) : super.con2(name) { 2657 FieldElementImpl.con2(String name) : super.con2(name) {
2575 _jtd_constructor_198_impl(name); 2658 _jtd_constructor_199_impl(name);
2576 } 2659 }
2577 _jtd_constructor_198_impl(String name) { 2660 _jtd_constructor_199_impl(String name) {
2578 } 2661 }
2579 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); 2662 accept(ElementVisitor visitor) => visitor.visitFieldElement(this);
2580 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 2663 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
2581 ElementKind get kind => ElementKind.FIELD; 2664 ElementKind get kind => ElementKind.FIELD;
2582 bool isStatic() => hasModifier(Modifier.STATIC); 2665 bool isStatic() => hasModifier(Modifier.STATIC);
2583 /** 2666 /**
2584 * Set whether this field is static to correspond to the given value. 2667 * Set whether this field is static to correspond to the given value.
2585 * @param isStatic {@code true} if the field is static 2668 * @param isStatic {@code true} if the field is static
2586 */ 2669 */
2587 void set static(bool isStatic) { 2670 void set static(bool isStatic) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 */ 2711 */
2629 int _visibleRangeLength = -1; 2712 int _visibleRangeLength = -1;
2630 /** 2713 /**
2631 * An empty array of function elements. 2714 * An empty array of function elements.
2632 */ 2715 */
2633 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); 2716 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0);
2634 /** 2717 /**
2635 * Initialize a newly created synthetic function element. 2718 * Initialize a newly created synthetic function element.
2636 */ 2719 */
2637 FunctionElementImpl() : super.con2("", -1) { 2720 FunctionElementImpl() : super.con2("", -1) {
2638 _jtd_constructor_200_impl(); 2721 _jtd_constructor_201_impl();
2639 } 2722 }
2640 _jtd_constructor_200_impl() { 2723 _jtd_constructor_201_impl() {
2641 synthetic = true; 2724 synthetic = true;
2642 } 2725 }
2643 /** 2726 /**
2644 * Initialize a newly created function element to have the given name. 2727 * Initialize a newly created function element to have the given name.
2645 * @param name the name of this element 2728 * @param name the name of this element
2646 */ 2729 */
2647 FunctionElementImpl.con1(Identifier name) : super.con1(name) { 2730 FunctionElementImpl.con1(Identifier name) : super.con1(name) {
2648 _jtd_constructor_201_impl(name); 2731 _jtd_constructor_202_impl(name);
2649 } 2732 }
2650 _jtd_constructor_201_impl(Identifier name) { 2733 _jtd_constructor_202_impl(Identifier name) {
2651 } 2734 }
2652 /** 2735 /**
2653 * Initialize a newly created function element to have no name and the given o ffset. This is used 2736 * Initialize a newly created function element to have no name and the given o ffset. This is used
2654 * for function expressions, which have no name. 2737 * for function expressions, which have no name.
2655 * @param nameOffset the offset of the name of this element in the file that c ontains the 2738 * @param nameOffset the offset of the name of this element in the file that c ontains the
2656 * declaration of this element 2739 * declaration of this element
2657 */ 2740 */
2658 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset) { 2741 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset) {
2659 _jtd_constructor_202_impl(nameOffset); 2742 _jtd_constructor_203_impl(nameOffset);
2660 } 2743 }
2661 _jtd_constructor_202_impl(int nameOffset) { 2744 _jtd_constructor_203_impl(int nameOffset) {
2662 } 2745 }
2663 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); 2746 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
2664 String get identifier => name; 2747 String get identifier => name;
2665 ElementKind get kind => ElementKind.FUNCTION; 2748 ElementKind get kind => ElementKind.FUNCTION;
2666 SourceRange get visibleRange { 2749 SourceRange get visibleRange {
2667 if (_visibleRangeLength < 0) { 2750 if (_visibleRangeLength < 0) {
2668 return null; 2751 return null;
2669 } 2752 }
2670 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); 2753 return new SourceRange(_visibleRangeOffset, _visibleRangeLength);
2671 } 2754 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
2972 this._prefix = prefix2; 3055 this._prefix = prefix2;
2973 } 3056 }
2974 void visitChildren(ElementVisitor<Object> visitor) { 3057 void visitChildren(ElementVisitor<Object> visitor) {
2975 super.visitChildren(visitor); 3058 super.visitChildren(visitor);
2976 safelyVisitChild(_prefix, visitor); 3059 safelyVisitChild(_prefix, visitor);
2977 } 3060 }
2978 void appendTo(JavaStringBuilder builder) { 3061 void appendTo(JavaStringBuilder builder) {
2979 builder.append("import "); 3062 builder.append("import ");
2980 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); 3063 ((_importedLibrary as LibraryElementImpl)).appendTo(builder);
2981 } 3064 }
3065 String get identifier => "${_importedLibrary.name}:${(_prefix == null ? "" : _ prefix.name)}";
2982 } 3066 }
2983 /** 3067 /**
2984 * Instances of the class {@code LabelElementImpl} implement a {@code LabelEleme nt}. 3068 * Instances of the class {@code LabelElementImpl} implement a {@code LabelEleme nt}.
2985 * @coverage dart.engine.element 3069 * @coverage dart.engine.element
2986 */ 3070 */
2987 class LabelElementImpl extends ElementImpl implements LabelElement { 3071 class LabelElementImpl extends ElementImpl implements LabelElement {
2988 /** 3072 /**
2989 * A flag indicating whether this label is associated with a {@code switch} st atement. 3073 * A flag indicating whether this label is associated with a {@code switch} st atement.
2990 */ 3074 */
2991 bool _onSwitchStatement = false; 3075 bool _onSwitchStatement = false;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3096 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin gCompilationUnit; 3180 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin gCompilationUnit;
3097 ElementImpl getChild(String identifier2) { 3181 ElementImpl getChild(String identifier2) {
3098 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier == identifier2) { 3182 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier == identifier2) {
3099 return _definingCompilationUnit as CompilationUnitElementImpl; 3183 return _definingCompilationUnit as CompilationUnitElementImpl;
3100 } 3184 }
3101 for (CompilationUnitElement part in _parts) { 3185 for (CompilationUnitElement part in _parts) {
3102 if (((part as CompilationUnitElementImpl)).identifier == identifier2) { 3186 if (((part as CompilationUnitElementImpl)).identifier == identifier2) {
3103 return part as CompilationUnitElementImpl; 3187 return part as CompilationUnitElementImpl;
3104 } 3188 }
3105 } 3189 }
3190 for (ImportElement importElement in _imports) {
3191 if (((importElement as ImportElementImpl)).identifier == identifier2) {
3192 return importElement as ImportElementImpl;
3193 }
3194 }
3195 for (ExportElement exportElement in _exports) {
3196 if (((exportElement as ExportElementImpl)).identifier == identifier2) {
3197 return exportElement as ExportElementImpl;
3198 }
3199 }
3106 return null; 3200 return null;
3107 } 3201 }
3108 AnalysisContext get context => _context; 3202 AnalysisContext get context => _context;
3109 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit ; 3203 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit ;
3110 FunctionElement get entryPoint => _entryPoint; 3204 FunctionElement get entryPoint => _entryPoint;
3111 List<LibraryElement> get exportedLibraries { 3205 List<LibraryElement> get exportedLibraries {
3112 Set<LibraryElement> libraries = new Set<LibraryElement>(); 3206 Set<LibraryElement> libraries = new Set<LibraryElement>();
3113 for (ExportElement element in _exports) { 3207 for (ExportElement element in _exports) {
3114 LibraryElement library = element.exportedLibrary; 3208 LibraryElement library = element.exportedLibrary;
3115 if (library != null) { 3209 if (library != null) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { 3404 class MethodElementImpl extends ExecutableElementImpl implements MethodElement {
3311 /** 3405 /**
3312 * An empty array of method elements. 3406 * An empty array of method elements.
3313 */ 3407 */
3314 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); 3408 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0);
3315 /** 3409 /**
3316 * Initialize a newly created method element to have the given name. 3410 * Initialize a newly created method element to have the given name.
3317 * @param name the name of this element 3411 * @param name the name of this element
3318 */ 3412 */
3319 MethodElementImpl.con1(Identifier name) : super.con1(name) { 3413 MethodElementImpl.con1(Identifier name) : super.con1(name) {
3320 _jtd_constructor_211_impl(name); 3414 _jtd_constructor_212_impl(name);
3321 } 3415 }
3322 _jtd_constructor_211_impl(Identifier name) { 3416 _jtd_constructor_212_impl(Identifier name) {
3323 } 3417 }
3324 /** 3418 /**
3325 * Initialize a newly created method element to have the given name. 3419 * Initialize a newly created method element to have the given name.
3326 * @param name the name of this element 3420 * @param name the name of this element
3327 * @param nameOffset the offset of the name of this element in the file that c ontains the 3421 * @param nameOffset the offset of the name of this element in the file that c ontains the
3328 * declaration of this element 3422 * declaration of this element
3329 */ 3423 */
3330 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set) { 3424 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set) {
3331 _jtd_constructor_212_impl(name, nameOffset); 3425 _jtd_constructor_213_impl(name, nameOffset);
3332 } 3426 }
3333 _jtd_constructor_212_impl(String name, int nameOffset) { 3427 _jtd_constructor_213_impl(String name, int nameOffset) {
3334 } 3428 }
3335 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); 3429 accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
3336 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 3430 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
3337 ElementKind get kind => ElementKind.METHOD; 3431 ElementKind get kind => ElementKind.METHOD;
3338 bool isAbstract() => hasModifier(Modifier.ABSTRACT); 3432 bool isAbstract() => hasModifier(Modifier.ABSTRACT);
3339 bool isOperator() { 3433 bool isOperator() {
3340 String name2 = name; 3434 String name2 = name;
3341 if (name2.isEmpty) { 3435 if (name2.isEmpty) {
3342 return false; 3436 return false;
3343 } 3437 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 * Initialize a newly created element to represent a list of conflicting eleme nts. 3508 * Initialize a newly created element to represent a list of conflicting eleme nts.
3415 * @param context the analysis context in which the multiply defined elements are defined 3509 * @param context the analysis context in which the multiply defined elements are defined
3416 * @param firstElement the first element that conflicts 3510 * @param firstElement the first element that conflicts
3417 * @param secondElement the second element that conflicts 3511 * @param secondElement the second element that conflicts
3418 */ 3512 */
3419 MultiplyDefinedElementImpl(AnalysisContext context, Element firstElement, Elem ent secondElement) { 3513 MultiplyDefinedElementImpl(AnalysisContext context, Element firstElement, Elem ent secondElement) {
3420 _name = firstElement.name; 3514 _name = firstElement.name;
3421 _conflictingElements = computeConflictingElements(firstElement, secondElemen t); 3515 _conflictingElements = computeConflictingElements(firstElement, secondElemen t);
3422 } 3516 }
3423 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this); 3517 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this);
3518 String computeDocumentationComment() => null;
3424 Element getAncestor(Type elementClass) => null; 3519 Element getAncestor(Type elementClass) => null;
3425 List<Element> get conflictingElements => _conflictingElements; 3520 List<Element> get conflictingElements => _conflictingElements;
3426 AnalysisContext get context => _context; 3521 AnalysisContext get context => _context;
3427 Element get enclosingElement => null; 3522 Element get enclosingElement => null;
3428 ElementKind get kind => ElementKind.ERROR; 3523 ElementKind get kind => ElementKind.ERROR;
3429 LibraryElement get library => null; 3524 LibraryElement get library => null;
3430 ElementLocation get location => null; 3525 ElementLocation get location => null;
3431 List<Annotation> get metadata => AnnotationImpl.EMPTY_ARRAY; 3526 List<Annotation> get metadata => AnnotationImpl.EMPTY_ARRAY;
3432 String get name => _name; 3527 String get name => _name;
3433 int get nameOffset => -1; 3528 int get nameOffset => -1;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3638 PropertyInducingElement _variable; 3733 PropertyInducingElement _variable;
3639 /** 3734 /**
3640 * An empty array of property accessor elements. 3735 * An empty array of property accessor elements.
3641 */ 3736 */
3642 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0); 3737 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0);
3643 /** 3738 /**
3644 * Initialize a newly created property accessor element to have the given name . 3739 * Initialize a newly created property accessor element to have the given name .
3645 * @param name the name of this element 3740 * @param name the name of this element
3646 */ 3741 */
3647 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { 3742 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) {
3648 _jtd_constructor_217_impl(name); 3743 _jtd_constructor_218_impl(name);
3649 } 3744 }
3650 _jtd_constructor_217_impl(Identifier name) { 3745 _jtd_constructor_218_impl(Identifier name) {
3651 } 3746 }
3652 /** 3747 /**
3653 * Initialize a newly created synthetic property accessor element to be associ ated with the given 3748 * Initialize a newly created synthetic property accessor element to be associ ated with the given
3654 * variable. 3749 * variable.
3655 * @param variable the variable with which this access is associated 3750 * @param variable the variable with which this access is associated
3656 */ 3751 */
3657 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe r.con2(variable2.name, -1) { 3752 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe r.con2(variable2.name, -1) {
3658 _jtd_constructor_218_impl(variable2); 3753 _jtd_constructor_219_impl(variable2);
3659 } 3754 }
3660 _jtd_constructor_218_impl(PropertyInducingElementImpl variable2) { 3755 _jtd_constructor_219_impl(PropertyInducingElementImpl variable2) {
3661 this._variable = variable2; 3756 this._variable = variable2;
3662 synthetic = true; 3757 synthetic = true;
3663 } 3758 }
3664 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); 3759 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this);
3665 bool operator ==(Object object) => super == object && identical(isGetter(), (( object as PropertyAccessorElement)).isGetter()); 3760 bool operator ==(Object object) => super == object && identical(isGetter(), (( object as PropertyAccessorElement)).isGetter());
3666 ElementKind get kind { 3761 ElementKind get kind {
3667 if (isGetter()) { 3762 if (isGetter()) {
3668 return ElementKind.GETTER; 3763 return ElementKind.GETTER;
3669 } 3764 }
3670 return ElementKind.SETTER; 3765 return ElementKind.SETTER;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
3715 PropertyAccessorElement _setter; 3810 PropertyAccessorElement _setter;
3716 /** 3811 /**
3717 * An empty array of elements. 3812 * An empty array of elements.
3718 */ 3813 */
3719 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0); 3814 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0);
3720 /** 3815 /**
3721 * Initialize a newly created element to have the given name. 3816 * Initialize a newly created element to have the given name.
3722 * @param name the name of this element 3817 * @param name the name of this element
3723 */ 3818 */
3724 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { 3819 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) {
3725 _jtd_constructor_219_impl(name); 3820 _jtd_constructor_220_impl(name);
3726 } 3821 }
3727 _jtd_constructor_219_impl(Identifier name) { 3822 _jtd_constructor_220_impl(Identifier name) {
3728 } 3823 }
3729 /** 3824 /**
3730 * Initialize a newly created synthetic element to have the given name. 3825 * Initialize a newly created synthetic element to have the given name.
3731 * @param name the name of this element 3826 * @param name the name of this element
3732 */ 3827 */
3733 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { 3828 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) {
3734 _jtd_constructor_220_impl(name); 3829 _jtd_constructor_221_impl(name);
3735 } 3830 }
3736 _jtd_constructor_220_impl(String name) { 3831 _jtd_constructor_221_impl(String name) {
3737 synthetic = true; 3832 synthetic = true;
3738 } 3833 }
3739 PropertyAccessorElement get getter => _getter; 3834 PropertyAccessorElement get getter => _getter;
3740 PropertyAccessorElement get setter => _setter; 3835 PropertyAccessorElement get setter => _setter;
3741 /** 3836 /**
3742 * Set the getter associated with this element to the given accessor. 3837 * Set the getter associated with this element to the given accessor.
3743 * @param getter the getter associated with this element 3838 * @param getter the getter associated with this element
3744 */ 3839 */
3745 void set getter(PropertyAccessorElement getter2) { 3840 void set getter(PropertyAccessorElement getter2) {
3746 this._getter = getter2; 3841 this._getter = getter2;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements TopLevelVariableElement { 3892 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements TopLevelVariableElement {
3798 /** 3893 /**
3799 * An empty array of top-level variable elements. 3894 * An empty array of top-level variable elements.
3800 */ 3895 */
3801 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0); 3896 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl ement>(0);
3802 /** 3897 /**
3803 * Initialize a newly created top-level variable element to have the given nam e. 3898 * Initialize a newly created top-level variable element to have the given nam e.
3804 * @param name the name of this element 3899 * @param name the name of this element
3805 */ 3900 */
3806 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { 3901 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) {
3807 _jtd_constructor_222_impl(name); 3902 _jtd_constructor_223_impl(name);
3808 } 3903 }
3809 _jtd_constructor_222_impl(Identifier name) { 3904 _jtd_constructor_223_impl(Identifier name) {
3810 } 3905 }
3811 /** 3906 /**
3812 * Initialize a newly created synthetic top-level variable element to have the given name. 3907 * Initialize a newly created synthetic top-level variable element to have the given name.
3813 * @param name the name of this element 3908 * @param name the name of this element
3814 */ 3909 */
3815 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { 3910 TopLevelVariableElementImpl.con2(String name) : super.con2(name) {
3816 _jtd_constructor_223_impl(name); 3911 _jtd_constructor_224_impl(name);
3817 } 3912 }
3818 _jtd_constructor_223_impl(String name) { 3913 _jtd_constructor_224_impl(String name) {
3819 } 3914 }
3820 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); 3915 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this);
3821 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; 3916 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE;
3822 bool isStatic() => true; 3917 bool isStatic() => true;
3823 } 3918 }
3824 /** 3919 /**
3825 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ eVariableElement}. 3920 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ eVariableElement}.
3826 * @coverage dart.engine.element 3921 * @coverage dart.engine.element
3827 */ 3922 */
3828 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement { 3923 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
3887 FunctionElement _initializer; 3982 FunctionElement _initializer;
3888 /** 3983 /**
3889 * An empty array of variable elements. 3984 * An empty array of variable elements.
3890 */ 3985 */
3891 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); 3986 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0);
3892 /** 3987 /**
3893 * Initialize a newly created variable element to have the given name. 3988 * Initialize a newly created variable element to have the given name.
3894 * @param name the name of this element 3989 * @param name the name of this element
3895 */ 3990 */
3896 VariableElementImpl.con1(Identifier name) : super.con1(name) { 3991 VariableElementImpl.con1(Identifier name) : super.con1(name) {
3897 _jtd_constructor_225_impl(name); 3992 _jtd_constructor_226_impl(name);
3898 } 3993 }
3899 _jtd_constructor_225_impl(Identifier name) { 3994 _jtd_constructor_226_impl(Identifier name) {
3900 } 3995 }
3901 /** 3996 /**
3902 * Initialize a newly created variable element to have the given name. 3997 * Initialize a newly created variable element to have the given name.
3903 * @param name the name of this element 3998 * @param name the name of this element
3904 * @param nameOffset the offset of the name of this element in the file that c ontains the 3999 * @param nameOffset the offset of the name of this element in the file that c ontains the
3905 * declaration of this element 4000 * declaration of this element
3906 */ 4001 */
3907 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO ffset) { 4002 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO ffset) {
3908 _jtd_constructor_226_impl(name, nameOffset); 4003 _jtd_constructor_227_impl(name, nameOffset);
3909 } 4004 }
3910 _jtd_constructor_226_impl(String name, int nameOffset) { 4005 _jtd_constructor_227_impl(String name, int nameOffset) {
3911 } 4006 }
3912 /** 4007 /**
3913 * Return the result of evaluating this variable's initializer as a compile-ti me constant 4008 * Return the result of evaluating this variable's initializer as a compile-ti me constant
3914 * expression, or {@code null} if this variable is not a 'const' variable or d oes not have an 4009 * expression, or {@code null} if this variable is not a 'const' variable or d oes not have an
3915 * initializer. 4010 * initializer.
3916 * @return the result of evaluating this variable's initializer 4011 * @return the result of evaluating this variable's initializer
3917 */ 4012 */
3918 EvaluationResultImpl get evaluationResult => null; 4013 EvaluationResultImpl get evaluationResult => null;
3919 FunctionElement get initializer => _initializer; 4014 FunctionElement get initializer => _initializer;
3920 Type2 get type => _type; 4015 Type2 get type => _type;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
4074 InterfaceType _definingType; 4169 InterfaceType _definingType;
4075 /** 4170 /**
4076 * Initialize a newly created element to represent the member of the given par ameterized type. 4171 * Initialize a newly created element to represent the member of the given par ameterized type.
4077 * @param baseElement the element on which the parameterized element was creat ed 4172 * @param baseElement the element on which the parameterized element was creat ed
4078 * @param definingType the type in which the element is defined 4173 * @param definingType the type in which the element is defined
4079 */ 4174 */
4080 Member(Element baseElement, InterfaceType definingType) { 4175 Member(Element baseElement, InterfaceType definingType) {
4081 this._baseElement = baseElement; 4176 this._baseElement = baseElement;
4082 this._definingType = definingType; 4177 this._definingType = definingType;
4083 } 4178 }
4179 String computeDocumentationComment() => _baseElement.computeDocumentationComme nt();
4084 Element getAncestor(Type elementClass) => baseElement.getAncestor(elementClass ); 4180 Element getAncestor(Type elementClass) => baseElement.getAncestor(elementClass );
4085 /** 4181 /**
4086 * Return the element on which the parameterized element was created. 4182 * Return the element on which the parameterized element was created.
4087 * @return the element on which the parameterized element was created 4183 * @return the element on which the parameterized element was created
4088 */ 4184 */
4089 Element get baseElement => _baseElement; 4185 Element get baseElement => _baseElement;
4090 AnalysisContext get context => _baseElement.context; 4186 AnalysisContext get context => _baseElement.context;
4091 ElementKind get kind => _baseElement.kind; 4187 ElementKind get kind => _baseElement.kind;
4092 LibraryElement get library => _baseElement.library; 4188 LibraryElement get library => _baseElement.library;
4093 ElementLocation get location => _baseElement.location; 4189 ElementLocation get location => _baseElement.location;
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4505 /** 4601 /**
4506 * The type of object returned by this type of function. 4602 * The type of object returned by this type of function.
4507 */ 4603 */
4508 Type2 _returnType = VoidTypeImpl.instance; 4604 Type2 _returnType = VoidTypeImpl.instance;
4509 /** 4605 /**
4510 * Initialize a newly created function type to be declared by the given elemen t and to have the 4606 * Initialize a newly created function type to be declared by the given elemen t and to have the
4511 * given name. 4607 * given name.
4512 * @param element the element representing the declaration of the function typ e 4608 * @param element the element representing the declaration of the function typ e
4513 */ 4609 */
4514 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n ull ? null : element.name) { 4610 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n ull ? null : element.name) {
4515 _jtd_constructor_290_impl(element); 4611 _jtd_constructor_291_impl(element);
4516 } 4612 }
4517 _jtd_constructor_290_impl(ExecutableElement element) { 4613 _jtd_constructor_291_impl(ExecutableElement element) {
4518 } 4614 }
4519 /** 4615 /**
4520 * Initialize a newly created function type to be declared by the given elemen t and to have the 4616 * Initialize a newly created function type to be declared by the given elemen t and to have the
4521 * given name. 4617 * given name.
4522 * @param element the element representing the declaration of the function typ e 4618 * @param element the element representing the declaration of the function typ e
4523 */ 4619 */
4524 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme nt == null ? null : element.name) { 4620 FunctionTypeImpl.con2(FunctionTypeAliasElement element) : super(element, eleme nt == null ? null : element.name) {
4525 _jtd_constructor_291_impl(element); 4621 _jtd_constructor_292_impl(element);
4526 } 4622 }
4527 _jtd_constructor_291_impl(FunctionTypeAliasElement element) { 4623 _jtd_constructor_292_impl(FunctionTypeAliasElement element) {
4528 } 4624 }
4529 bool operator ==(Object object) { 4625 bool operator ==(Object object) {
4530 if (object is! FunctionTypeImpl) { 4626 if (object is! FunctionTypeImpl) {
4531 return false; 4627 return false;
4532 } 4628 }
4533 FunctionTypeImpl otherType = object as FunctionTypeImpl; 4629 FunctionTypeImpl otherType = object as FunctionTypeImpl;
4534 return element == otherType.element && JavaArrays.equals(_normalParameterTyp es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType ._namedParameterTypes) && _returnType == otherType._returnType; 4630 return element == otherType.element && JavaArrays.equals(_normalParameterTyp es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType ._namedParameterTypes) && _returnType == otherType._returnType;
4535 } 4631 }
4536 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; 4632 Map<String, Type2> get namedParameterTypes => _namedParameterTypes;
4537 List<Type2> get normalParameterTypes => _normalParameterTypes; 4633 List<Type2> get normalParameterTypes => _normalParameterTypes;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
4806 } 4902 }
4807 /** 4903 /**
4808 * An array containing the actual types of the type arguments. 4904 * An array containing the actual types of the type arguments.
4809 */ 4905 */
4810 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; 4906 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY;
4811 /** 4907 /**
4812 * Initialize a newly created type to be declared by the given element. 4908 * Initialize a newly created type to be declared by the given element.
4813 * @param element the element representing the declaration of the type 4909 * @param element the element representing the declaration of the type
4814 */ 4910 */
4815 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) { 4911 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) {
4816 _jtd_constructor_292_impl(element); 4912 _jtd_constructor_293_impl(element);
4817 } 4913 }
4818 _jtd_constructor_292_impl(ClassElement element) { 4914 _jtd_constructor_293_impl(ClassElement element) {
4819 } 4915 }
4820 /** 4916 /**
4821 * Initialize a newly created type to have the given name. This constructor sh ould only be used in 4917 * Initialize a newly created type to have the given name. This constructor sh ould only be used in
4822 * cases where there is no declaration of the type. 4918 * cases where there is no declaration of the type.
4823 * @param name the name of the type 4919 * @param name the name of the type
4824 */ 4920 */
4825 InterfaceTypeImpl.con2(String name) : super(null, name) { 4921 InterfaceTypeImpl.con2(String name) : super(null, name) {
4826 _jtd_constructor_293_impl(name); 4922 _jtd_constructor_294_impl(name);
4827 } 4923 }
4828 _jtd_constructor_293_impl(String name) { 4924 _jtd_constructor_294_impl(String name) {
4829 } 4925 }
4830 bool operator ==(Object object) { 4926 bool operator ==(Object object) {
4831 if (object is! InterfaceTypeImpl) { 4927 if (object is! InterfaceTypeImpl) {
4832 return false; 4928 return false;
4833 } 4929 }
4834 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; 4930 InterfaceTypeImpl otherType = object as InterfaceTypeImpl;
4835 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments); 4931 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments);
4836 } 4932 }
4837 ClassElement get element => super.element as ClassElement; 4933 ClassElement get element => super.element as ClassElement;
4838 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this); 4934 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
5045 if (element != null && element.isAccessibleIn(library)) { 5141 if (element != null && element.isAccessibleIn(library)) {
5046 return element; 5142 return element;
5047 } 5143 }
5048 } 5144 }
5049 InterfaceType supertype = superclass; 5145 InterfaceType supertype = superclass;
5050 while (supertype != null) { 5146 while (supertype != null) {
5051 element = supertype.getGetter(getterName); 5147 element = supertype.getGetter(getterName);
5052 if (element != null && element.isAccessibleIn(library)) { 5148 if (element != null && element.isAccessibleIn(library)) {
5053 return element; 5149 return element;
5054 } 5150 }
5151 for (InterfaceType mixin in supertype.mixins) {
5152 element = mixin.getGetter(getterName);
5153 if (element != null && element.isAccessibleIn(library)) {
5154 return element;
5155 }
5156 }
5055 supertype = supertype.superclass; 5157 supertype = supertype.superclass;
5056 } 5158 }
5057 return null; 5159 return null;
5058 } 5160 }
5059 MethodElement lookUpMethod(String methodName, LibraryElement library) { 5161 MethodElement lookUpMethod(String methodName, LibraryElement library) {
5060 MethodElement element = getMethod(methodName); 5162 MethodElement element = getMethod(methodName);
5061 if (element != null && element.isAccessibleIn(library)) { 5163 if (element != null && element.isAccessibleIn(library)) {
5062 return element; 5164 return element;
5063 } 5165 }
5064 for (InterfaceType mixin in mixins) { 5166 for (InterfaceType mixin in mixins) {
5065 element = mixin.getMethod(methodName); 5167 element = mixin.getMethod(methodName);
5066 if (element != null && element.isAccessibleIn(library)) { 5168 if (element != null && element.isAccessibleIn(library)) {
5067 return element; 5169 return element;
5068 } 5170 }
5069 } 5171 }
5070 InterfaceType supertype = superclass; 5172 InterfaceType supertype = superclass;
5071 while (supertype != null) { 5173 while (supertype != null) {
5072 element = supertype.getMethod(methodName); 5174 element = supertype.getMethod(methodName);
5073 if (element != null && element.isAccessibleIn(library)) { 5175 if (element != null && element.isAccessibleIn(library)) {
5074 return element; 5176 return element;
5075 } 5177 }
5178 for (InterfaceType mixin in supertype.mixins) {
5179 element = mixin.getMethod(methodName);
5180 if (element != null && element.isAccessibleIn(library)) {
5181 return element;
5182 }
5183 }
5076 supertype = supertype.superclass; 5184 supertype = supertype.superclass;
5077 } 5185 }
5078 return null; 5186 return null;
5079 } 5187 }
5080 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library ) { 5188 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library ) {
5081 PropertyAccessorElement element = getSetter(setterName); 5189 PropertyAccessorElement element = getSetter(setterName);
5082 if (element != null && element.isAccessibleIn(library)) { 5190 if (element != null && element.isAccessibleIn(library)) {
5083 return element; 5191 return element;
5084 } 5192 }
5085 for (InterfaceType mixin in mixins) { 5193 for (InterfaceType mixin in mixins) {
5086 element = mixin.getSetter(setterName); 5194 element = mixin.getSetter(setterName);
5087 if (element != null && element.isAccessibleIn(library)) { 5195 if (element != null && element.isAccessibleIn(library)) {
5088 return element; 5196 return element;
5089 } 5197 }
5090 } 5198 }
5091 InterfaceType supertype = superclass; 5199 InterfaceType supertype = superclass;
5092 while (supertype != null) { 5200 while (supertype != null) {
5093 element = supertype.getSetter(setterName); 5201 element = supertype.getSetter(setterName);
5094 if (element != null && element.isAccessibleIn(library)) { 5202 if (element != null && element.isAccessibleIn(library)) {
5095 return element; 5203 return element;
5096 } 5204 }
5205 for (InterfaceType mixin in supertype.mixins) {
5206 element = mixin.getSetter(setterName);
5207 if (element != null && element.isAccessibleIn(library)) {
5208 return element;
5209 }
5210 }
5097 supertype = supertype.superclass; 5211 supertype = supertype.superclass;
5098 } 5212 }
5099 return null; 5213 return null;
5100 } 5214 }
5101 /** 5215 /**
5102 * Set the actual types of the type arguments to those in the given array. 5216 * Set the actual types of the type arguments to those in the given array.
5103 * @param typeArguments the actual types of the type arguments 5217 * @param typeArguments the actual types of the type arguments
5104 */ 5218 */
5105 void set typeArguments(List<Type2> typeArguments2) { 5219 void set typeArguments(List<Type2> typeArguments2) {
5106 this._typeArguments = typeArguments2; 5220 this._typeArguments = typeArguments2;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 bool isVoid() => true; 5388 bool isVoid() => true;
5275 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes ) => this; 5389 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes ) => this;
5276 } 5390 }
5277 /** 5391 /**
5278 * The interface {@code FunctionType} defines the behavior common to objects rep resenting the type 5392 * The interface {@code FunctionType} defines the behavior common to objects rep resenting the type
5279 * of a function, method, constructor, getter, or setter. Function types come in three variations: 5393 * of a function, method, constructor, getter, or setter. Function types come in three variations:
5280 * <ol> 5394 * <ol>
5281 * <li>The types of functions that only have required parameters. These have the general form 5395 * <li>The types of functions that only have required parameters. These have the general form
5282 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.</li> 5396 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.</li>
5283 * <li>The types of functions with optional positional parameters. These have th e general form 5397 * <li>The types of functions with optional positional parameters. These have th e general form
5284 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>, &hellip;, T<sub >n+k</sub>]) &rarr; 5398 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [[T<sub>n+1</sub>, &hellip;, T<su b>n+k</sub>]]) &rarr;
5285 * T</i>.</li> 5399 * T</i>.</li>
5286 * <li>The types of functions with named positional parameters. These have the g eneral form 5400 * <li>The types of functions with named positional parameters. These have the g eneral form
5287 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;, T<s ub>xk</sub> xk}) 5401 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;, T<s ub>xk</sub> xk})
5288 * &rarr; T</i>.</li> 5402 * &rarr; T</i>.</li>
5289 * </ol> 5403 * </ol>
5290 * @coverage dart.engine.type 5404 * @coverage dart.engine.type
5291 */ 5405 */
5292 abstract class FunctionType implements Type2 { 5406 abstract class FunctionType implements Type2 {
5293 /** 5407 /**
5294 * Return a map from the names of named parameters to the types of the named p arameters of this 5408 * Return a map from the names of named parameters to the types of the named p arameters of this
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
5334 * conditions are met: 5448 * conditions are met:
5335 * <ul> 5449 * <ul>
5336 * <li>Either 5450 * <li>Either
5337 * <ul> 5451 * <ul>
5338 * <li><i>S</i> is void, or</li> 5452 * <li><i>S</i> is void, or</li>
5339 * <li><i>T &hArr; S</i>.</li> 5453 * <li><i>T &hArr; S</i>.</li>
5340 * </ul> 5454 * </ul>
5341 * </li> 5455 * </li>
5342 * <li>For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr; S< sub>i</sub></i>.</li> 5456 * <li>For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr; S< sub>i</sub></i>.</li>
5343 * </ul> 5457 * </ul>
5344 * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub >, &hellip;, 5458 * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [[T<sub>n+1</su b>, &hellip;,
5345 * T<sub>n+k</sub>]) &rarr; T</i> is a subtype of the function type <i>(S<sub> 1</sub>, &hellip;, 5459 * T<sub>n+k</sub>]]) &rarr; T</i> is a subtype of the function type <i>(S<sub >1</sub>, &hellip;,
5346 * S<sub>n</sub>, [S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]) &rarr; S</i>, if all of the 5460 * S<sub>n</sub>, [[S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]]) &rarr; S</i> , if all of the
5347 * following conditions are met: 5461 * following conditions are met:
5348 * <ul> 5462 * <ul>
5349 * <li>Either 5463 * <li>Either
5350 * <ul> 5464 * <ul>
5351 * <li><i>S</i> is void, or</li> 5465 * <li><i>S</i> is void, or</li>
5352 * <li><i>T &hArr; S</i>.</li> 5466 * <li><i>T &hArr; S</i>.</li>
5353 * </ul> 5467 * </ul>
5354 * </li> 5468 * </li>
5355 * <li><i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>, <i>T<sub>i</sub> 5469 * <li><i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>, <i>T<sub>i</sub>
5356 * &hArr; S<sub>i</sub></i>.</li> 5470 * &hArr; S<sub>i</sub></i>.</li>
(...skipping 10 matching lines...) Expand all
5367 * </ul> 5481 * </ul>
5368 * </li> 5482 * </li>
5369 * <li>For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr; S< sub>i</sub></i>.</li> 5483 * <li>For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr; S< sub>i</sub></i>.</li>
5370 * <li><i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>, &he llip;, 5484 * <li><i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>, &he llip;,
5371 * x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.</li> 5485 * x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.</li>
5372 * <li>For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;, y<sub>m</s ub>}</i>, 5486 * <li>For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;, y<sub>m</s ub>}</i>,
5373 * <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr; Si</i>.</li> 5487 * <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr; Si</i>.</li>
5374 * </ul> 5488 * </ul>
5375 * In addition, the following subtype rules apply: 5489 * In addition, the following subtype rules apply:
5376 * <p> 5490 * <p>
5377 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, []) &rarr; T <: (T<sub>1</sub>, &hellip;, 5491 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [[]]) &rarr; T <: (T<sub>1</sub >, &hellip;,
5378 * T<sub>n</sub>) &rarr; T.</i><br> 5492 * T<sub>n</sub>) &rarr; T.</i><br>
5379 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>, &he llip;, 5493 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>, &he llip;,
5380 * T<sub>n</sub>, {}) &rarr; T.</i><br> 5494 * T<sub>n</sub>, {}) &rarr; T.</i><br>
5381 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <: (T<sub>1</sub>, &hellip;, 5495 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <: (T<sub>1</sub>, &hellip;,
5382 * T<sub>n</sub>) &rarr; T.</i><br> 5496 * T<sub>n</sub>) &rarr; T.</i><br>
5383 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>, &he llip;, 5497 * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>, &he llip;,
5384 * T<sub>n</sub>, []) &rarr; T.</i> 5498 * T<sub>n</sub>, [[]]) &rarr; T.</i>
5385 * <p> 5499 * <p>
5386 * All functions implement the class {@code Function}. However not all functio n types are a 5500 * All functions implement the class {@code Function}. However not all functio n types are a
5387 * subtype of {@code Function}. If an interface type <i>I</i> includes a metho d named{@code call()}, and the type of {@code call()} is the function type <i>F< /i>, then <i>I</i> is 5501 * subtype of {@code Function}. If an interface type <i>I</i> includes a metho d named{@code call()}, and the type of {@code call()} is the function type <i>F< /i>, then <i>I</i> is
5388 * considered to be a subtype of <i>F</i>. 5502 * considered to be a subtype of <i>F</i>.
5389 * @param type the type being compared with this type 5503 * @param type the type being compared with this type
5390 * @return {@code true} if this type is a subtype of the given type 5504 * @return {@code true} if this type is a subtype of the given type
5391 */ 5505 */
5392 bool isSubtypeOf(Type2 type); 5506 bool isSubtypeOf(Type2 type);
5393 /** 5507 /**
5394 * Return the type resulting from substituting the given arguments for this ty pe's parameters. 5508 * Return the type resulting from substituting the given arguments for this ty pe's parameters.
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
5505 * <i>T<sub>i</sub> &laquo; S<sub>i</sub></i>, <i>1 <= i <= n</i>. 5619 * <i>T<sub>i</sub> &laquo; S<sub>i</sub></i>, <i>1 <= i <= n</i>.
5506 * <li>Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>. 5620 * <li>Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>.
5507 * </ul> 5621 * </ul>
5508 * @param type the type being compared with this type 5622 * @param type the type being compared with this type
5509 * @return {@code true} if this type is more specific than the given type 5623 * @return {@code true} if this type is more specific than the given type
5510 */ 5624 */
5511 bool isMoreSpecificThan(Type2 type); 5625 bool isMoreSpecificThan(Type2 type);
5512 /** 5626 /**
5513 * Return {@code true} if this type is a subtype of the given type. An interfa ce type <i>T</i> is 5627 * Return {@code true} if this type is a subtype of the given type. An interfa ce type <i>T</i> is
5514 * a subtype of an interface type <i>S</i>, written <i>T</i> <: <i>S</i>, iff 5628 * a subtype of an interface type <i>S</i>, written <i>T</i> <: <i>S</i>, iff
5515 * <i>[bottom/dynamic]T</i> &laquo; <i>S</i> (<i>T</i> is more specific than < i>S</i>). If an 5629 * <i>[[bottom/dynamic]]T</i> &laquo; <i>S</i> (<i>T</i> is more specific than <i>S</i>). If an
5516 * interface type <i>I</i> includes a method named <i>call()</i>, and the type of <i>call()</i> is 5630 * interface type <i>I</i> includes a method named <i>call()</i>, and the type of <i>call()</i> is
5517 * the function type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>. 5631 * the function type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
5518 * @param type the type being compared with this type 5632 * @param type the type being compared with this type
5519 * @return {@code true} if this type is a subtype of the given type 5633 * @return {@code true} if this type is a subtype of the given type
5520 */ 5634 */
5521 bool isSubtypeOf(Type2 type); 5635 bool isSubtypeOf(Type2 type);
5522 /** 5636 /**
5523 * Return the element representing the getter that results from looking up the given getter in 5637 * Return the element representing the getter that results from looking up the given getter in
5524 * this class with respect to the given library, or {@code null} if the look u p fails. The 5638 * this class with respect to the given library, or {@code null} if the look u p fails. The
5525 * behavior of this method is defined by the Dart Language Specification in se ction 12.15.1: 5639 * behavior of this method is defined by the Dart Language Specification in se ction 12.15.1:
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
5653 */ 5767 */
5654 bool isSupertypeOf(Type2 type); 5768 bool isSupertypeOf(Type2 type);
5655 /** 5769 /**
5656 * Return {@code true} if this type represents the type 'void'. 5770 * Return {@code true} if this type represents the type 'void'.
5657 * @return {@code true} if this type represents the type 'void' 5771 * @return {@code true} if this type represents the type 'void'
5658 */ 5772 */
5659 bool isVoid(); 5773 bool isVoid();
5660 /** 5774 /**
5661 * Return the type resulting from substituting the given arguments for the giv en parameters in 5775 * Return the type resulting from substituting the given arguments for the giv en parameters in
5662 * this type. The specification defines this operation in section 2: <blockquo te> The notation 5776 * this type. The specification defines this operation in section 2: <blockquo te> The notation
5663 * <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ..., y<sub>n</sub>]E</ i> denotes a copy of 5777 * <i>[[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ..., y<sub>n</sub>]]E </i> denotes a copy of
5664 * <i>E</i> in which all occurrences of <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with 5778 * <i>E</i> in which all occurrences of <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
5665 * <i>x<sub>i</sub></i>.</blockquote> Note that, contrary to the specification , this method will 5779 * <i>x<sub>i</sub></i>.</blockquote> Note that, contrary to the specification , this method will
5666 * not create a copy of this type if no substitutions were required, but will return this type 5780 * not create a copy of this type if no substitutions were required, but will return this type
5667 * directly. 5781 * directly.
5668 * @param argumentTypes the actual type arguments being substituted for the pa rameters 5782 * @param argumentTypes the actual type arguments being substituted for the pa rameters
5669 * @param parameterTypes the parameters to be replaced 5783 * @param parameterTypes the parameters to be replaced
5670 * @return the result of performing the substitution 5784 * @return the result of performing the substitution
5671 */ 5785 */
5672 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 5786 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
5673 } 5787 }
5674 /** 5788 /**
5675 * The interface {@code TypeVariableType} defines the behavior of objects repres enting the type 5789 * The interface {@code TypeVariableType} defines the behavior of objects repres enting the type
5676 * introduced by a type variable. 5790 * introduced by a type variable.
5677 * @coverage dart.engine.type 5791 * @coverage dart.engine.type
5678 */ 5792 */
5679 abstract class TypeVariableType implements Type2 { 5793 abstract class TypeVariableType implements Type2 {
5680 TypeVariableElement get element; 5794 TypeVariableElement get element;
5681 } 5795 }
5682 /** 5796 /**
5683 * The interface {@code VoidType} defines the behavior of the unique object repr esenting the type{@code void}. 5797 * The interface {@code VoidType} defines the behavior of the unique object repr esenting the type{@code void}.
5684 * @coverage dart.engine.type 5798 * @coverage dart.engine.type
5685 */ 5799 */
5686 abstract class VoidType implements Type2 { 5800 abstract class VoidType implements Type2 {
5687 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 5801 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
5688 } 5802 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698