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

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

Issue 14161021: Generate unique names less aggressively. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 */ 1317 */
1318 ClassElementImpl(Identifier name) : super.con1(name) { 1318 ClassElementImpl(Identifier name) : super.con1(name) {
1319 } 1319 }
1320 accept(ElementVisitor visitor) => visitor.visitClassElement(this); 1320 accept(ElementVisitor visitor) => visitor.visitClassElement(this);
1321 List<PropertyAccessorElement> get accessors => _accessors; 1321 List<PropertyAccessorElement> get accessors => _accessors;
1322 List<InterfaceType> get allSupertypes { 1322 List<InterfaceType> get allSupertypes {
1323 Set<InterfaceType> list = new Set<InterfaceType>(); 1323 Set<InterfaceType> list = new Set<InterfaceType>();
1324 collectAllSupertypes(list); 1324 collectAllSupertypes(list);
1325 return new List.from(list); 1325 return new List.from(list);
1326 } 1326 }
1327 ElementImpl getChild(String identifier27) { 1327 ElementImpl getChild(String identifier2) {
1328 for (PropertyAccessorElement accessor in _accessors) { 1328 for (PropertyAccessorElement accessor in _accessors) {
1329 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier27 ) { 1329 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) {
1330 return accessor as PropertyAccessorElementImpl; 1330 return accessor as PropertyAccessorElementImpl;
1331 } 1331 }
1332 } 1332 }
1333 for (ConstructorElement constructor in _constructors) { 1333 for (ConstructorElement constructor in _constructors) {
1334 if (((constructor as ConstructorElementImpl)).identifier == identifier27) { 1334 if (((constructor as ConstructorElementImpl)).identifier == identifier2) {
1335 return constructor as ConstructorElementImpl; 1335 return constructor as ConstructorElementImpl;
1336 } 1336 }
1337 } 1337 }
1338 for (FieldElement field in _fields) { 1338 for (FieldElement field in _fields) {
1339 if (((field as FieldElementImpl)).identifier == identifier27) { 1339 if (((field as FieldElementImpl)).identifier == identifier2) {
1340 return field as FieldElementImpl; 1340 return field as FieldElementImpl;
1341 } 1341 }
1342 } 1342 }
1343 for (MethodElement method in _methods) { 1343 for (MethodElement method in _methods) {
1344 if (((method as MethodElementImpl)).identifier == identifier27) { 1344 if (((method as MethodElementImpl)).identifier == identifier2) {
1345 return method as MethodElementImpl; 1345 return method as MethodElementImpl;
1346 } 1346 }
1347 } 1347 }
1348 for (TypeVariableElement typeVariable in _typeVariables) { 1348 for (TypeVariableElement typeVariable in _typeVariables) {
1349 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier27 ) { 1349 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) {
1350 return typeVariable as TypeVariableElementImpl; 1350 return typeVariable as TypeVariableElementImpl;
1351 } 1351 }
1352 } 1352 }
1353 return null; 1353 return null;
1354 } 1354 }
1355 List<ConstructorElement> get constructors => _constructors; 1355 List<ConstructorElement> get constructors => _constructors;
1356 /** 1356 /**
1357 * Given some name, this returns the {@link FieldElement} with the matching na me, if there is no 1357 * 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. 1358 * such field, then {@code null} is returned.
1359 * @param name some name to lookup a field element with 1359 * @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 1360 * @return the matching field element, or {@code null} if no such element was found
1361 */ 1361 */
1362 FieldElement getField(String name27) { 1362 FieldElement getField(String name2) {
1363 for (FieldElement fieldElement in _fields) { 1363 for (FieldElement fieldElement in _fields) {
1364 if (name27 == fieldElement.name) { 1364 if (name2 == fieldElement.name) {
1365 return fieldElement; 1365 return fieldElement;
1366 } 1366 }
1367 } 1367 }
1368 return null; 1368 return null;
1369 } 1369 }
1370 List<FieldElement> get fields => _fields; 1370 List<FieldElement> get fields => _fields;
1371 /** 1371 /**
1372 * Return the element representing the getter with the given name that is decl ared in this class, 1372 * Return the element representing the getter with the given name that is decl ared in this class,
1373 * or {@code null} if this class does not declare a getter with the given name . 1373 * or {@code null} if this class does not declare a getter with the given name .
1374 * @param getterName the name of the getter to be returned 1374 * @param getterName the name of the getter to be returned
(...skipping 18 matching lines...) Expand all
1393 MethodElement getMethod(String methodName) { 1393 MethodElement getMethod(String methodName) {
1394 for (MethodElement method in _methods) { 1394 for (MethodElement method in _methods) {
1395 if (method.name == methodName) { 1395 if (method.name == methodName) {
1396 return method; 1396 return method;
1397 } 1397 }
1398 } 1398 }
1399 return null; 1399 return null;
1400 } 1400 }
1401 List<MethodElement> get methods => _methods; 1401 List<MethodElement> get methods => _methods;
1402 List<InterfaceType> get mixins => _mixins; 1402 List<InterfaceType> get mixins => _mixins;
1403 ConstructorElement getNamedConstructor(String name28) { 1403 ConstructorElement getNamedConstructor(String name2) {
1404 for (ConstructorElement element in constructors) { 1404 for (ConstructorElement element in constructors) {
1405 String elementName = element.name; 1405 String elementName = element.name;
1406 if (elementName != null && elementName == name28) { 1406 if (elementName != null && elementName == name2) {
1407 return element; 1407 return element;
1408 } 1408 }
1409 } 1409 }
1410 return null; 1410 return null;
1411 } 1411 }
1412 /** 1412 /**
1413 * Return the element representing the setter with the given name that is decl ared in this class, 1413 * Return the element representing the setter with the given name that is decl ared in this class,
1414 * or {@code null} if this class does not declare a setter with the given name . 1414 * or {@code null} if this class does not declare a setter with the given name .
1415 * @param setterName the name of the getter to be returned 1415 * @param setterName the name of the getter to be returned
1416 * @return the setter declared in this class with the given name 1416 * @return the setter declared in this class with the given name
1417 */ 1417 */
1418 PropertyAccessorElement getSetter(String setterName) { 1418 PropertyAccessorElement getSetter(String setterName) {
1419 for (PropertyAccessorElement accessor in _accessors) { 1419 for (PropertyAccessorElement accessor in _accessors) {
1420 if (accessor.isSetter() && accessor.name == setterName) { 1420 if (accessor.isSetter() && accessor.name == setterName) {
1421 return accessor; 1421 return accessor;
1422 } 1422 }
1423 } 1423 }
1424 return null; 1424 return null;
1425 } 1425 }
1426 InterfaceType get supertype => _supertype; 1426 InterfaceType get supertype => _supertype;
1427 InterfaceType get type => _type; 1427 InterfaceType get type => _type;
1428 List<TypeVariableElement> get typeVariables => _typeVariables; 1428 List<TypeVariableElement> get typeVariables => _typeVariables;
1429 ConstructorElement get unnamedConstructor { 1429 ConstructorElement get unnamedConstructor {
1430 for (ConstructorElement element in constructors) { 1430 for (ConstructorElement element in constructors) {
1431 String name12 = element.name; 1431 String name2 = element.name;
1432 if (name12 == null || name12.isEmpty) { 1432 if (name2 == null || name2.isEmpty) {
1433 return element; 1433 return element;
1434 } 1434 }
1435 } 1435 }
1436 return null; 1436 return null;
1437 } 1437 }
1438 bool isAbstract() => hasModifier(Modifier.ABSTRACT); 1438 bool isAbstract() => hasModifier(Modifier.ABSTRACT);
1439 bool isTypedef() => hasModifier(Modifier.TYPEDEF); 1439 bool isTypedef() => hasModifier(Modifier.TYPEDEF);
1440 bool isValidMixin() => hasModifier(Modifier.MIXIN); 1440 bool isValidMixin() => hasModifier(Modifier.MIXIN);
1441 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) { 1441 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) {
1442 PropertyAccessorElement element = getGetter(getterName); 1442 PropertyAccessorElement element = getGetter(getterName);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 * Set the superclass of the class to the given type. 1579 * Set the superclass of the class to the given type.
1580 * @param supertype the superclass of the class 1580 * @param supertype the superclass of the class
1581 */ 1581 */
1582 void set supertype(InterfaceType supertype2) { 1582 void set supertype(InterfaceType supertype2) {
1583 this._supertype = supertype2; 1583 this._supertype = supertype2;
1584 } 1584 }
1585 /** 1585 /**
1586 * Set the type defined by the class to the given type. 1586 * Set the type defined by the class to the given type.
1587 * @param type the type defined by the class 1587 * @param type the type defined by the class
1588 */ 1588 */
1589 void set type(InterfaceType type5) { 1589 void set type(InterfaceType type2) {
1590 this._type = type5; 1590 this._type = type2;
1591 } 1591 }
1592 /** 1592 /**
1593 * Set whether this class is defined by a typedef construct to correspond to t he given value. 1593 * Set whether this class is defined by a typedef construct to correspond to t he given value.
1594 * @param isTypedef {@code true} if the class is defined by a typedef construc t 1594 * @param isTypedef {@code true} if the class is defined by a typedef construc t
1595 */ 1595 */
1596 void set typedef(bool isTypedef) { 1596 void set typedef(bool isTypedef) {
1597 setModifier(Modifier.TYPEDEF, isTypedef); 1597 setModifier(Modifier.TYPEDEF, isTypedef);
1598 } 1598 }
1599 /** 1599 /**
1600 * Set the type variables defined for this class to the given type variables. 1600 * Set the type variables defined for this class to the given type variables.
(...skipping 14 matching lines...) Expand all
1615 } 1615 }
1616 void visitChildren(ElementVisitor<Object> visitor) { 1616 void visitChildren(ElementVisitor<Object> visitor) {
1617 super.visitChildren(visitor); 1617 super.visitChildren(visitor);
1618 safelyVisitChildren(_accessors, visitor); 1618 safelyVisitChildren(_accessors, visitor);
1619 safelyVisitChildren(_constructors, visitor); 1619 safelyVisitChildren(_constructors, visitor);
1620 safelyVisitChildren(_fields, visitor); 1620 safelyVisitChildren(_fields, visitor);
1621 safelyVisitChildren(_methods, visitor); 1621 safelyVisitChildren(_methods, visitor);
1622 safelyVisitChildren(_typeVariables, visitor); 1622 safelyVisitChildren(_typeVariables, visitor);
1623 } 1623 }
1624 void appendTo(JavaStringBuilder builder) { 1624 void appendTo(JavaStringBuilder builder) {
1625 String name13 = name; 1625 String name2 = name;
1626 if (name13 == null) { 1626 if (name2 == null) {
1627 builder.append("{unnamed class}"); 1627 builder.append("{unnamed class}");
1628 } else { 1628 } else {
1629 builder.append(name13); 1629 builder.append(name2);
1630 } 1630 }
1631 int variableCount = _typeVariables.length; 1631 int variableCount = _typeVariables.length;
1632 if (variableCount > 0) { 1632 if (variableCount > 0) {
1633 builder.append("<"); 1633 builder.append("<");
1634 for (int i = 0; i < variableCount; i++) { 1634 for (int i = 0; i < variableCount; i++) {
1635 if (i > 0) { 1635 if (i > 0) {
1636 builder.append(", "); 1636 builder.append(", ");
1637 } 1637 }
1638 ((_typeVariables[i] as TypeVariableElementImpl)).appendTo(builder); 1638 ((_typeVariables[i] as TypeVariableElementImpl)).appendTo(builder);
1639 } 1639 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1695 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem ent>(0); 1695 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem ent>(0);
1696 /** 1696 /**
1697 * Initialize a newly created compilation unit element to have the given name. 1697 * Initialize a newly created compilation unit element to have the given name.
1698 * @param name the name of this element 1698 * @param name the name of this element
1699 */ 1699 */
1700 CompilationUnitElementImpl(String name) : super.con2(name, -1) { 1700 CompilationUnitElementImpl(String name) : super.con2(name, -1) {
1701 } 1701 }
1702 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); 1702 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this);
1703 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _source == ((object as CompilationUnitElementImpl)).source; 1703 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _source == ((object as CompilationUnitElementImpl)).source;
1704 List<PropertyAccessorElement> get accessors => _accessors; 1704 List<PropertyAccessorElement> get accessors => _accessors;
1705 ElementImpl getChild(String identifier28) { 1705 ElementImpl getChild(String identifier2) {
1706 for (PropertyAccessorElement accessor in _accessors) { 1706 for (PropertyAccessorElement accessor in _accessors) {
1707 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier28 ) { 1707 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier2) {
1708 return accessor as PropertyAccessorElementImpl; 1708 return accessor as PropertyAccessorElementImpl;
1709 } 1709 }
1710 } 1710 }
1711 for (VariableElement variable in _variables) { 1711 for (VariableElement variable in _variables) {
1712 if (((variable as VariableElementImpl)).identifier == identifier28) { 1712 if (((variable as VariableElementImpl)).identifier == identifier2) {
1713 return variable as VariableElementImpl; 1713 return variable as VariableElementImpl;
1714 } 1714 }
1715 } 1715 }
1716 for (ExecutableElement function in _functions) { 1716 for (ExecutableElement function in _functions) {
1717 if (((function as ExecutableElementImpl)).identifier == identifier28) { 1717 if (((function as ExecutableElementImpl)).identifier == identifier2) {
1718 return function as ExecutableElementImpl; 1718 return function as ExecutableElementImpl;
1719 } 1719 }
1720 } 1720 }
1721 for (FunctionTypeAliasElement typeAlias in _typeAliases) { 1721 for (FunctionTypeAliasElement typeAlias in _typeAliases) {
1722 if (((typeAlias as FunctionTypeAliasElementImpl)).identifier == identifier 28) { 1722 if (((typeAlias as FunctionTypeAliasElementImpl)).identifier == identifier 2) {
1723 return typeAlias as FunctionTypeAliasElementImpl; 1723 return typeAlias as FunctionTypeAliasElementImpl;
1724 } 1724 }
1725 } 1725 }
1726 for (ClassElement type in _types) { 1726 for (ClassElement type in _types) {
1727 if (((type as ClassElementImpl)).identifier == identifier28) { 1727 if (((type as ClassElementImpl)).identifier == identifier2) {
1728 return type as ClassElementImpl; 1728 return type as ClassElementImpl;
1729 } 1729 }
1730 } 1730 }
1731 return null; 1731 return null;
1732 } 1732 }
1733 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t; 1733 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen t;
1734 List<FunctionElement> get functions => _functions; 1734 List<FunctionElement> get functions => _functions;
1735 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases; 1735 List<FunctionTypeAliasElement> get functionTypeAliases => _typeAliases;
1736 String get identifier => source.encoding; 1736 String get identifier => source.encoding;
1737 ElementKind get kind => ElementKind.COMPILATION_UNIT; 1737 ElementKind get kind => ElementKind.COMPILATION_UNIT;
1738 Source get source => _source; 1738 Source get source => _source;
1739 List<TopLevelVariableElement> get topLevelVariables => _variables; 1739 List<TopLevelVariableElement> get topLevelVariables => _variables;
1740 ClassElement getType(String className) { 1740 ClassElement getType(String className) {
1741 for (ClassElement type in _types) { 1741 for (ClassElement type in _types) {
1742 if (type.name == className) { 1742 if (type.name == className) {
1743 return type; 1743 return type;
1744 } 1744 }
1745 } 1745 }
1746 return null; 1746 return null;
1747 } 1747 }
1748 List<ClassElement> get types => _types; 1748 List<ClassElement> get types => _types;
1749 int get hashCode => _source.hashCode; 1749 int get hashCode => _source.hashCode;
1750 /** 1750 /**
1751 * Set the top-level accessors (getters and setters) contained in this compila tion unit to the 1751 * Set the top-level accessors (getters and setters) contained in this compila tion unit to the
1752 * given accessors. 1752 * given accessors.
1753 * @param the top-level accessors (getters and setters) contained in this comp ilation unit 1753 * @param the top-level accessors (getters and setters) contained in this comp ilation unit
1754 */ 1754 */
1755 void set accessors(List<PropertyAccessorElement> accessors3) { 1755 void set accessors(List<PropertyAccessorElement> accessors2) {
1756 for (PropertyAccessorElement accessor in accessors3) { 1756 for (PropertyAccessorElement accessor in accessors2) {
1757 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this; 1757 ((accessor as PropertyAccessorElementImpl)).enclosingElement = this;
1758 } 1758 }
1759 this._accessors = accessors3; 1759 this._accessors = accessors2;
1760 } 1760 }
1761 /** 1761 /**
1762 * Set the top-level functions contained in this compilation unit to the given functions. 1762 * Set the top-level functions contained in this compilation unit to the given functions.
1763 * @param functions the top-level functions contained in this compilation unit 1763 * @param functions the top-level functions contained in this compilation unit
1764 */ 1764 */
1765 void set functions(List<FunctionElement> functions2) { 1765 void set functions(List<FunctionElement> functions2) {
1766 for (FunctionElement function in functions2) { 1766 for (FunctionElement function in functions2) {
1767 ((function as FunctionElementImpl)).enclosingElement = this; 1767 ((function as FunctionElementImpl)).enclosingElement = this;
1768 } 1768 }
1769 this._functions = functions2; 1769 this._functions = functions2;
1770 } 1770 }
1771 /** 1771 /**
1772 * Set the source that corresponds to this compilation unit to the given sourc e. 1772 * Set the source that corresponds to this compilation unit to the given sourc e.
1773 * @param source the source that corresponds to this compilation unit 1773 * @param source the source that corresponds to this compilation unit
1774 */ 1774 */
1775 void set source(Source source5) { 1775 void set source(Source source2) {
1776 this._source = source5; 1776 this._source = source2;
1777 } 1777 }
1778 /** 1778 /**
1779 * Set the top-level variables contained in this compilation unit to the given variables. 1779 * Set the top-level variables contained in this compilation unit to the given variables.
1780 * @param variables the top-level variables contained in this compilation unit 1780 * @param variables the top-level variables contained in this compilation unit
1781 */ 1781 */
1782 void set topLevelVariables(List<TopLevelVariableElement> variables2) { 1782 void set topLevelVariables(List<TopLevelVariableElement> variables2) {
1783 for (TopLevelVariableElement field in variables2) { 1783 for (TopLevelVariableElement field in variables2) {
1784 ((field as TopLevelVariableElementImpl)).enclosingElement = this; 1784 ((field as TopLevelVariableElementImpl)).enclosingElement = this;
1785 } 1785 }
1786 this._variables = variables2; 1786 this._variables = variables2;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 * The result of evaluating this variable's initializer. 1850 * The result of evaluating this variable's initializer.
1851 */ 1851 */
1852 EvaluationResultImpl _result; 1852 EvaluationResultImpl _result;
1853 /** 1853 /**
1854 * Initialize a newly created local variable element to have the given name. 1854 * Initialize a newly created local variable element to have the given name.
1855 * @param name the name of this element 1855 * @param name the name of this element
1856 */ 1856 */
1857 ConstLocalVariableElementImpl(Identifier name) : super(name) { 1857 ConstLocalVariableElementImpl(Identifier name) : super(name) {
1858 } 1858 }
1859 EvaluationResultImpl get evaluationResult => _result; 1859 EvaluationResultImpl get evaluationResult => _result;
1860 void set evaluationResult(EvaluationResultImpl result3) { 1860 void set evaluationResult(EvaluationResultImpl result2) {
1861 this._result = result3; 1861 this._result = result2;
1862 } 1862 }
1863 } 1863 }
1864 /** 1864 /**
1865 * Instances of the class {@code ConstParameterElementImpl} implement a {@code P arameterElement} for 1865 * Instances of the class {@code ConstParameterElementImpl} implement a {@code P arameterElement} for
1866 * a 'const' parameter that has an initializer. 1866 * a 'const' parameter that has an initializer.
1867 * @coverage dart.engine.element 1867 * @coverage dart.engine.element
1868 */ 1868 */
1869 class ConstParameterElementImpl extends ParameterElementImpl { 1869 class ConstParameterElementImpl extends ParameterElementImpl {
1870 /** 1870 /**
1871 * The result of evaluating this variable's initializer. 1871 * The result of evaluating this variable's initializer.
1872 */ 1872 */
1873 EvaluationResultImpl _result; 1873 EvaluationResultImpl _result;
1874 /** 1874 /**
1875 * Initialize a newly created parameter element to have the given name. 1875 * Initialize a newly created parameter element to have the given name.
1876 * @param name the name of this element 1876 * @param name the name of this element
1877 */ 1877 */
1878 ConstParameterElementImpl(Identifier name) : super(name) { 1878 ConstParameterElementImpl(Identifier name) : super(name) {
1879 } 1879 }
1880 EvaluationResultImpl get evaluationResult => _result; 1880 EvaluationResultImpl get evaluationResult => _result;
1881 void set evaluationResult(EvaluationResultImpl result4) { 1881 void set evaluationResult(EvaluationResultImpl result2) {
1882 this._result = result4; 1882 this._result = result2;
1883 } 1883 }
1884 } 1884 }
1885 /** 1885 /**
1886 * Instances of the class {@code ConstTopLevelVariableElementImpl} implement a{@ code TopLevelVariableElement} for a top-level 'const' variable that has an initi alizer. 1886 * Instances of the class {@code ConstTopLevelVariableElementImpl} implement a{@ code TopLevelVariableElement} for a top-level 'const' variable that has an initi alizer.
1887 */ 1887 */
1888 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl { 1888 class ConstTopLevelVariableElementImpl extends TopLevelVariableElementImpl {
1889 /** 1889 /**
1890 * The result of evaluating this variable's initializer. 1890 * The result of evaluating this variable's initializer.
1891 */ 1891 */
1892 EvaluationResultImpl _result; 1892 EvaluationResultImpl _result;
1893 /** 1893 /**
1894 * Initialize a newly created top-level variable element to have the given nam e. 1894 * Initialize a newly created top-level variable element to have the given nam e.
1895 * @param name the name of this element 1895 * @param name the name of this element
1896 */ 1896 */
1897 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name) { 1897 ConstTopLevelVariableElementImpl(Identifier name) : super.con1(name) {
1898 } 1898 }
1899 EvaluationResultImpl get evaluationResult => _result; 1899 EvaluationResultImpl get evaluationResult => _result;
1900 void set evaluationResult(EvaluationResultImpl result5) { 1900 void set evaluationResult(EvaluationResultImpl result2) {
1901 this._result = result5; 1901 this._result = result2;
1902 } 1902 }
1903 } 1903 }
1904 /** 1904 /**
1905 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons tructorElement}. 1905 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons tructorElement}.
1906 * @coverage dart.engine.element 1906 * @coverage dart.engine.element
1907 */ 1907 */
1908 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo rElement { 1908 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo rElement {
1909 /** 1909 /**
1910 * An empty array of constructor elements. 1910 * An empty array of constructor elements.
1911 */ 1911 */
(...skipping 19 matching lines...) Expand all
1931 } 1931 }
1932 /** 1932 /**
1933 * Set whether this constructor represents a factory method to the given value . 1933 * Set whether this constructor represents a factory method to the given value .
1934 * @param isFactory {@code true} if this constructor represents a factory meth od 1934 * @param isFactory {@code true} if this constructor represents a factory meth od
1935 */ 1935 */
1936 void set factory(bool isFactory) { 1936 void set factory(bool isFactory) {
1937 setModifier(Modifier.FACTORY, isFactory); 1937 setModifier(Modifier.FACTORY, isFactory);
1938 } 1938 }
1939 void appendTo(JavaStringBuilder builder) { 1939 void appendTo(JavaStringBuilder builder) {
1940 builder.append(enclosingElement.name); 1940 builder.append(enclosingElement.name);
1941 String name14 = name; 1941 String name2 = name;
1942 if (name14 != null && !name14.isEmpty) { 1942 if (name2 != null && !name2.isEmpty) {
1943 builder.append("."); 1943 builder.append(".");
1944 builder.append(name14); 1944 builder.append(name2);
1945 } 1945 }
1946 super.appendTo(builder); 1946 super.appendTo(builder);
1947 } 1947 }
1948 } 1948 }
1949 /** 1949 /**
1950 * Instances of the class {@code DynamicElementImpl} represent the synthetic ele ment representing 1950 * Instances of the class {@code DynamicElementImpl} represent the synthetic ele ment representing
1951 * the declaration of the type {@code dynamic}. 1951 * the declaration of the type {@code dynamic}.
1952 * @coverage dart.engine.element 1952 * @coverage dart.engine.element
1953 */ 1953 */
1954 class DynamicElementImpl extends ElementImpl { 1954 class DynamicElementImpl extends ElementImpl {
(...skipping 18 matching lines...) Expand all
1973 ElementKind get kind => ElementKind.DYNAMIC; 1973 ElementKind get kind => ElementKind.DYNAMIC;
1974 /** 1974 /**
1975 * Return the type defined by this element. 1975 * Return the type defined by this element.
1976 * @return the type defined by this element 1976 * @return the type defined by this element
1977 */ 1977 */
1978 DynamicTypeImpl get type => _type; 1978 DynamicTypeImpl get type => _type;
1979 /** 1979 /**
1980 * Set the type defined by this element to the given type. 1980 * Set the type defined by this element to the given type.
1981 * @param type the type defined by this element 1981 * @param type the type defined by this element
1982 */ 1982 */
1983 void set type(DynamicTypeImpl type6) { 1983 void set type(DynamicTypeImpl type2) {
1984 this._type = type6; 1984 this._type = type2;
1985 } 1985 }
1986 } 1986 }
1987 /** 1987 /**
1988 * The abstract class {@code ElementImpl} implements the behavior common to obje cts that implement 1988 * The abstract class {@code ElementImpl} implements the behavior common to obje cts that implement
1989 * an {@link Element}. 1989 * an {@link Element}.
1990 * @coverage dart.engine.element 1990 * @coverage dart.engine.element
1991 */ 1991 */
1992 abstract class ElementImpl implements Element { 1992 abstract class ElementImpl implements Element {
1993 /** 1993 /**
1994 * The enclosing element of this element, or {@code null} if this element is a t the root of the 1994 * The enclosing element of this element, or {@code null} if this element is a t the root of the
(...skipping 18 matching lines...) Expand all
2013 */ 2013 */
2014 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; 2014 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY;
2015 /** 2015 /**
2016 * A cached copy of the calculated hashCode for this element. 2016 * A cached copy of the calculated hashCode for this element.
2017 */ 2017 */
2018 int _cachedHashCode = 0; 2018 int _cachedHashCode = 0;
2019 /** 2019 /**
2020 * Initialize a newly created element to have the given name. 2020 * Initialize a newly created element to have the given name.
2021 * @param name the name of this element 2021 * @param name the name of this element
2022 */ 2022 */
2023 ElementImpl.con1(Identifier name29) { 2023 ElementImpl.con1(Identifier name2) {
2024 _jtd_constructor_188_impl(name29); 2024 _jtd_constructor_188_impl(name2);
2025 } 2025 }
2026 _jtd_constructor_188_impl(Identifier name29) { 2026 _jtd_constructor_188_impl(Identifier name2) {
2027 _jtd_constructor_189_impl(name29 == null ? "" : name29.name, name29 == null ? -1 : name29.offset); 2027 _jtd_constructor_189_impl(name2 == null ? "" : name2.name, name2 == null ? - 1 : name2.offset);
2028 } 2028 }
2029 /** 2029 /**
2030 * Initialize a newly created element to have the given name. 2030 * Initialize a newly created element to have the given name.
2031 * @param name the name of this element 2031 * @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 2032 * @param nameOffset the offset of the name of this element in the file that c ontains the
2033 * declaration of this element 2033 * declaration of this element
2034 */ 2034 */
2035 ElementImpl.con2(String name9, int nameOffset2) { 2035 ElementImpl.con2(String name2, int nameOffset2) {
2036 _jtd_constructor_189_impl(name9, nameOffset2); 2036 _jtd_constructor_189_impl(name2, nameOffset2);
2037 } 2037 }
2038 _jtd_constructor_189_impl(String name9, int nameOffset2) { 2038 _jtd_constructor_189_impl(String name2, int nameOffset2) {
2039 this._name = StringUtilities.intern(name9); 2039 this._name = StringUtilities.intern(name2);
2040 this._nameOffset = nameOffset2; 2040 this._nameOffset = nameOffset2;
2041 } 2041 }
2042 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location; 2042 bool operator ==(Object object) => object != null && object.runtimeType == run timeType && ((object as Element)).location == location;
2043 Element getAncestor(Type elementClass) { 2043 Element getAncestor(Type elementClass) {
2044 Element ancestor = _enclosingElement; 2044 Element ancestor = _enclosingElement;
2045 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { 2045 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) {
2046 ancestor = ancestor.enclosingElement; 2046 ancestor = ancestor.enclosingElement;
2047 } 2047 }
2048 return ancestor as Element; 2048 return ancestor as Element;
2049 } 2049 }
(...skipping 20 matching lines...) Expand all
2070 return null; 2070 return null;
2071 } 2071 }
2072 return _enclosingElement.source; 2072 return _enclosingElement.source;
2073 } 2073 }
2074 int get hashCode { 2074 int get hashCode {
2075 if (_cachedHashCode == 0) { 2075 if (_cachedHashCode == 0) {
2076 _cachedHashCode = location.hashCode; 2076 _cachedHashCode = location.hashCode;
2077 } 2077 }
2078 return _cachedHashCode; 2078 return _cachedHashCode;
2079 } 2079 }
2080 bool isAccessibleIn(LibraryElement library37) { 2080 bool isAccessibleIn(LibraryElement library2) {
2081 if (Identifier.isPrivateName(_name)) { 2081 if (Identifier.isPrivateName(_name)) {
2082 return library37 == library; 2082 return library2 == library;
2083 } 2083 }
2084 return true; 2084 return true;
2085 } 2085 }
2086 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC); 2086 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC);
2087 /** 2087 /**
2088 * Set the metadata associate with this element to the given array of annotati ons. 2088 * Set the metadata associate with this element to the given array of annotati ons.
2089 * @param metadata the metadata to be associated with this element 2089 * @param metadata the metadata to be associated with this element
2090 */ 2090 */
2091 void set metadata(List<Annotation> metadata3) { 2091 void set metadata(List<Annotation> metadata2) {
2092 this._metadata = metadata3; 2092 this._metadata = metadata2;
2093 } 2093 }
2094 /** 2094 /**
2095 * Set the offset of the name of this element in the file that contains the de claration of this 2095 * Set the offset of the name of this element in the file that contains the de claration of this
2096 * element to the given value. This is normally done via the constructor, but this method is 2096 * element to the given value. This is normally done via the constructor, but this method is
2097 * provided to support unnamed constructors. 2097 * provided to support unnamed constructors.
2098 * @param nameOffset the offset to the beginning of the name 2098 * @param nameOffset the offset to the beginning of the name
2099 */ 2099 */
2100 void set nameOffset(int nameOffset3) { 2100 void set nameOffset(int nameOffset2) {
2101 this._nameOffset = nameOffset3; 2101 this._nameOffset = nameOffset2;
2102 } 2102 }
2103 /** 2103 /**
2104 * Set whether this element is synthetic to correspond to the given value. 2104 * Set whether this element is synthetic to correspond to the given value.
2105 * @param isSynthetic {@code true} if the element is synthetic 2105 * @param isSynthetic {@code true} if the element is synthetic
2106 */ 2106 */
2107 void set synthetic(bool isSynthetic) { 2107 void set synthetic(bool isSynthetic) {
2108 setModifier(Modifier.SYNTHETIC, isSynthetic); 2108 setModifier(Modifier.SYNTHETIC, isSynthetic);
2109 } 2109 }
2110 String toString() { 2110 String toString() {
2111 JavaStringBuilder builder = new JavaStringBuilder(); 2111 JavaStringBuilder builder = new JavaStringBuilder();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2256 String toString() => encoding; 2256 String toString() => encoding;
2257 /** 2257 /**
2258 * Decode the encoded form of a location into an array of components. 2258 * Decode the encoded form of a location into an array of components.
2259 * @param encoding the encoded form of a location 2259 * @param encoding the encoded form of a location
2260 * @return the components that were encoded 2260 * @return the components that were encoded
2261 */ 2261 */
2262 List<String> decode(String encoding) { 2262 List<String> decode(String encoding) {
2263 List<String> components = new List<String>(); 2263 List<String> components = new List<String>();
2264 JavaStringBuilder builder = new JavaStringBuilder(); 2264 JavaStringBuilder builder = new JavaStringBuilder();
2265 int index = 0; 2265 int index = 0;
2266 int length3 = encoding.length; 2266 int length2 = encoding.length;
2267 while (index < length3) { 2267 while (index < length2) {
2268 int currentChar = encoding.codeUnitAt(index); 2268 int currentChar = encoding.codeUnitAt(index);
2269 if (currentChar == _SEPARATOR_CHAR) { 2269 if (currentChar == _SEPARATOR_CHAR) {
2270 if (index + 1 < length3 && encoding.codeUnitAt(index + 1) == _SEPARATOR_ CHAR) { 2270 if (index + 1 < length2 && encoding.codeUnitAt(index + 1) == _SEPARATOR_ CHAR) {
2271 builder.appendChar(_SEPARATOR_CHAR); 2271 builder.appendChar(_SEPARATOR_CHAR);
2272 index += 2; 2272 index += 2;
2273 } else { 2273 } else {
2274 components.add(builder.toString()); 2274 components.add(builder.toString());
2275 builder.length = 0; 2275 builder.length = 0;
2276 index++; 2276 index++;
2277 } 2277 }
2278 } else { 2278 } else {
2279 builder.appendChar(currentChar); 2279 builder.appendChar(currentChar);
2280 index++; 2280 index++;
2281 } 2281 }
2282 } 2282 }
2283 if (builder.length > 0) { 2283 if (builder.length > 0) {
2284 components.add(builder.toString()); 2284 components.add(builder.toString());
2285 } 2285 }
2286 return new List.from(components); 2286 return new List.from(components);
2287 } 2287 }
2288 /** 2288 /**
2289 * Append an encoded form of the given component to the given builder. 2289 * Append an encoded form of the given component to the given builder.
2290 * @param builder the builder to which the encoded component is to be appended 2290 * @param builder the builder to which the encoded component is to be appended
2291 * @param component the component to be appended to the builder 2291 * @param component the component to be appended to the builder
2292 */ 2292 */
2293 void encode(JavaStringBuilder builder, String component) { 2293 void encode(JavaStringBuilder builder, String component) {
2294 int length4 = component.length; 2294 int length2 = component.length;
2295 for (int i = 0; i < length4; i++) { 2295 for (int i = 0; i < length2; i++) {
2296 int currentChar = component.codeUnitAt(i); 2296 int currentChar = component.codeUnitAt(i);
2297 if (currentChar == _SEPARATOR_CHAR) { 2297 if (currentChar == _SEPARATOR_CHAR) {
2298 builder.appendChar(_SEPARATOR_CHAR); 2298 builder.appendChar(_SEPARATOR_CHAR);
2299 } 2299 }
2300 builder.appendChar(currentChar); 2300 builder.appendChar(currentChar);
2301 } 2301 }
2302 } 2302 }
2303 } 2303 }
2304 /** 2304 /**
2305 * Instances of the class {@code EmbeddedHtmlScriptElementImpl} implement an{@li nk EmbeddedHtmlScriptElement}. 2305 * Instances of the class {@code EmbeddedHtmlScriptElementImpl} implement an{@li nk EmbeddedHtmlScriptElement}.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 * Initialize a newly created executable element to have the given name. 2373 * Initialize a newly created executable element to have the given name.
2374 * @param name the name of this element 2374 * @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 2375 * @param nameOffset the offset of the name of this element in the file that c ontains the
2376 * declaration of this element 2376 * declaration of this element
2377 */ 2377 */
2378 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset) { 2378 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam eOffset) {
2379 _jtd_constructor_194_impl(name, nameOffset); 2379 _jtd_constructor_194_impl(name, nameOffset);
2380 } 2380 }
2381 _jtd_constructor_194_impl(String name, int nameOffset) { 2381 _jtd_constructor_194_impl(String name, int nameOffset) {
2382 } 2382 }
2383 ElementImpl getChild(String identifier29) { 2383 ElementImpl getChild(String identifier2) {
2384 for (ExecutableElement function in _functions) { 2384 for (ExecutableElement function in _functions) {
2385 if (((function as ExecutableElementImpl)).identifier == identifier29) { 2385 if (((function as ExecutableElementImpl)).identifier == identifier2) {
2386 return function as ExecutableElementImpl; 2386 return function as ExecutableElementImpl;
2387 } 2387 }
2388 } 2388 }
2389 for (LabelElement label in _labels) { 2389 for (LabelElement label in _labels) {
2390 if (((label as LabelElementImpl)).identifier == identifier29) { 2390 if (((label as LabelElementImpl)).identifier == identifier2) {
2391 return label as LabelElementImpl; 2391 return label as LabelElementImpl;
2392 } 2392 }
2393 } 2393 }
2394 for (VariableElement variable in _localVariables) { 2394 for (VariableElement variable in _localVariables) {
2395 if (((variable as VariableElementImpl)).identifier == identifier29) { 2395 if (((variable as VariableElementImpl)).identifier == identifier2) {
2396 return variable as VariableElementImpl; 2396 return variable as VariableElementImpl;
2397 } 2397 }
2398 } 2398 }
2399 for (ParameterElement parameter in _parameters) { 2399 for (ParameterElement parameter in _parameters) {
2400 if (((parameter as ParameterElementImpl)).identifier == identifier29) { 2400 if (((parameter as ParameterElementImpl)).identifier == identifier2) {
2401 return parameter as ParameterElementImpl; 2401 return parameter as ParameterElementImpl;
2402 } 2402 }
2403 } 2403 }
2404 return null; 2404 return null;
2405 } 2405 }
2406 List<FunctionElement> get functions => _functions; 2406 List<FunctionElement> get functions => _functions;
2407 List<LabelElement> get labels => _labels; 2407 List<LabelElement> get labels => _labels;
2408 List<LocalVariableElement> get localVariables => _localVariables; 2408 List<LocalVariableElement> get localVariables => _localVariables;
2409 List<ParameterElement> get parameters => _parameters; 2409 List<ParameterElement> get parameters => _parameters;
2410 FunctionType get type => _type; 2410 FunctionType get type => _type;
2411 bool isOperator() => false; 2411 bool isOperator() => false;
2412 /** 2412 /**
2413 * Set the functions defined within this executable element to the given funct ions. 2413 * Set the functions defined within this executable element to the given funct ions.
2414 * @param functions the functions defined within this executable element 2414 * @param functions the functions defined within this executable element
2415 */ 2415 */
2416 void set functions(List<FunctionElement> functions3) { 2416 void set functions(List<FunctionElement> functions2) {
2417 for (FunctionElement function in functions3) { 2417 for (FunctionElement function in functions2) {
2418 ((function as FunctionElementImpl)).enclosingElement = this; 2418 ((function as FunctionElementImpl)).enclosingElement = this;
2419 } 2419 }
2420 this._functions = functions3; 2420 this._functions = functions2;
2421 } 2421 }
2422 /** 2422 /**
2423 * Set the labels defined within this executable element to the given labels. 2423 * Set the labels defined within this executable element to the given labels.
2424 * @param labels the labels defined within this executable element 2424 * @param labels the labels defined within this executable element
2425 */ 2425 */
2426 void set labels(List<LabelElement> labels2) { 2426 void set labels(List<LabelElement> labels2) {
2427 for (LabelElement label in labels2) { 2427 for (LabelElement label in labels2) {
2428 ((label as LabelElementImpl)).enclosingElement = this; 2428 ((label as LabelElementImpl)).enclosingElement = this;
2429 } 2429 }
2430 this._labels = labels2; 2430 this._labels = labels2;
2431 } 2431 }
2432 /** 2432 /**
2433 * Set the local variables defined within this executable element to the given variables. 2433 * Set the local variables defined within this executable element to the given variables.
2434 * @param localVariables the local variables defined within this executable el ement 2434 * @param localVariables the local variables defined within this executable el ement
2435 */ 2435 */
2436 void set localVariables(List<LocalVariableElement> localVariables2) { 2436 void set localVariables(List<LocalVariableElement> localVariables2) {
2437 for (LocalVariableElement variable in localVariables2) { 2437 for (LocalVariableElement variable in localVariables2) {
2438 ((variable as LocalVariableElementImpl)).enclosingElement = this; 2438 ((variable as LocalVariableElementImpl)).enclosingElement = this;
2439 } 2439 }
2440 this._localVariables = localVariables2; 2440 this._localVariables = localVariables2;
2441 } 2441 }
2442 /** 2442 /**
2443 * Set the parameters defined by this executable element to the given paramete rs. 2443 * Set the parameters defined by this executable element to the given paramete rs.
2444 * @param parameters the parameters defined by this executable element 2444 * @param parameters the parameters defined by this executable element
2445 */ 2445 */
2446 void set parameters(List<ParameterElement> parameters7) { 2446 void set parameters(List<ParameterElement> parameters2) {
2447 for (ParameterElement parameter in parameters7) { 2447 for (ParameterElement parameter in parameters2) {
2448 ((parameter as ParameterElementImpl)).enclosingElement = this; 2448 ((parameter as ParameterElementImpl)).enclosingElement = this;
2449 } 2449 }
2450 this._parameters = parameters7; 2450 this._parameters = parameters2;
2451 } 2451 }
2452 /** 2452 /**
2453 * Set the type of function defined by this executable element to the given ty pe. 2453 * Set the type of function defined by this executable element to the given ty pe.
2454 * @param type the type of function defined by this executable element 2454 * @param type the type of function defined by this executable element
2455 */ 2455 */
2456 void set type(FunctionType type7) { 2456 void set type(FunctionType type2) {
2457 this._type = type7; 2457 this._type = type2;
2458 } 2458 }
2459 void visitChildren(ElementVisitor<Object> visitor) { 2459 void visitChildren(ElementVisitor<Object> visitor) {
2460 super.visitChildren(visitor); 2460 super.visitChildren(visitor);
2461 safelyVisitChildren(_functions, visitor); 2461 safelyVisitChildren(_functions, visitor);
2462 safelyVisitChildren(_labels, visitor); 2462 safelyVisitChildren(_labels, visitor);
2463 safelyVisitChildren(_localVariables, visitor); 2463 safelyVisitChildren(_localVariables, visitor);
2464 safelyVisitChildren(_parameters, visitor); 2464 safelyVisitChildren(_parameters, visitor);
2465 } 2465 }
2466 void appendTo(JavaStringBuilder builder) { 2466 void appendTo(JavaStringBuilder builder) {
2467 builder.append("("); 2467 builder.append("(");
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 * length. 2675 * length.
2676 * @param offset the offset to the beginning of the visible range for this ele ment 2676 * @param offset the offset to the beginning of the visible range for this ele ment
2677 * @param length the length of the visible range for this element, or {@code - 1} if this element 2677 * @param length the length of the visible range for this element, or {@code - 1} if this element
2678 * does not have a visible range 2678 * does not have a visible range
2679 */ 2679 */
2680 void setVisibleRange(int offset, int length) { 2680 void setVisibleRange(int offset, int length) {
2681 _visibleRangeOffset = offset; 2681 _visibleRangeOffset = offset;
2682 _visibleRangeLength = length; 2682 _visibleRangeLength = length;
2683 } 2683 }
2684 void appendTo(JavaStringBuilder builder) { 2684 void appendTo(JavaStringBuilder builder) {
2685 String name15 = name; 2685 String name2 = name;
2686 if (name15 != null) { 2686 if (name2 != null) {
2687 builder.append(name15); 2687 builder.append(name2);
2688 } 2688 }
2689 super.appendTo(builder); 2689 super.appendTo(builder);
2690 } 2690 }
2691 } 2691 }
2692 /** 2692 /**
2693 * Instances of the class {@code FunctionTypeAliasElementImpl} implement a{@code FunctionTypeAliasElement}. 2693 * Instances of the class {@code FunctionTypeAliasElementImpl} implement a{@code FunctionTypeAliasElement}.
2694 * @coverage dart.engine.element 2694 * @coverage dart.engine.element
2695 */ 2695 */
2696 class FunctionTypeAliasElementImpl extends ElementImpl implements FunctionTypeAl iasElement { 2696 class FunctionTypeAliasElementImpl extends ElementImpl implements FunctionTypeAl iasElement {
2697 /** 2697 /**
(...skipping 12 matching lines...) Expand all
2710 * An empty array of type alias elements. 2710 * An empty array of type alias elements.
2711 */ 2711 */
2712 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias Element>(0); 2712 static List<FunctionTypeAliasElement> EMPTY_ARRAY = new List<FunctionTypeAlias Element>(0);
2713 /** 2713 /**
2714 * Initialize a newly created type alias element to have the given name. 2714 * Initialize a newly created type alias element to have the given name.
2715 * @param name the name of this element 2715 * @param name the name of this element
2716 */ 2716 */
2717 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name) { 2717 FunctionTypeAliasElementImpl(Identifier name) : super.con1(name) {
2718 } 2718 }
2719 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this); 2719 accept(ElementVisitor visitor) => visitor.visitFunctionTypeAliasElement(this);
2720 ElementImpl getChild(String identifier30) { 2720 ElementImpl getChild(String identifier2) {
2721 for (VariableElement parameter in _parameters) { 2721 for (VariableElement parameter in _parameters) {
2722 if (((parameter as VariableElementImpl)).identifier == identifier30) { 2722 if (((parameter as VariableElementImpl)).identifier == identifier2) {
2723 return parameter as VariableElementImpl; 2723 return parameter as VariableElementImpl;
2724 } 2724 }
2725 } 2725 }
2726 for (TypeVariableElement typeVariable in _typeVariables) { 2726 for (TypeVariableElement typeVariable in _typeVariables) {
2727 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier30 ) { 2727 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier2) {
2728 return typeVariable as TypeVariableElementImpl; 2728 return typeVariable as TypeVariableElementImpl;
2729 } 2729 }
2730 } 2730 }
2731 return null; 2731 return null;
2732 } 2732 }
2733 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi lationUnitElement; 2733 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi lationUnitElement;
2734 ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS; 2734 ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
2735 List<ParameterElement> get parameters => _parameters; 2735 List<ParameterElement> get parameters => _parameters;
2736 FunctionType get type => _type; 2736 FunctionType get type => _type;
2737 List<TypeVariableElement> get typeVariables => _typeVariables; 2737 List<TypeVariableElement> get typeVariables => _typeVariables;
2738 /** 2738 /**
2739 * Set the parameters defined by this type alias to the given parameters. 2739 * Set the parameters defined by this type alias to the given parameters.
2740 * @param parameters the parameters defined by this type alias 2740 * @param parameters the parameters defined by this type alias
2741 */ 2741 */
2742 void set parameters(List<ParameterElement> parameters8) { 2742 void set parameters(List<ParameterElement> parameters2) {
2743 if (parameters8 != null) { 2743 if (parameters2 != null) {
2744 for (ParameterElement parameter in parameters8) { 2744 for (ParameterElement parameter in parameters2) {
2745 ((parameter as ParameterElementImpl)).enclosingElement = this; 2745 ((parameter as ParameterElementImpl)).enclosingElement = this;
2746 } 2746 }
2747 } 2747 }
2748 this._parameters = parameters8; 2748 this._parameters = parameters2;
2749 } 2749 }
2750 /** 2750 /**
2751 * Set the type of function defined by this type alias to the given type. 2751 * Set the type of function defined by this type alias to the given type.
2752 * @param type the type of function defined by this type alias 2752 * @param type the type of function defined by this type alias
2753 */ 2753 */
2754 void set type(FunctionType type8) { 2754 void set type(FunctionType type2) {
2755 this._type = type8; 2755 this._type = type2;
2756 } 2756 }
2757 /** 2757 /**
2758 * Set the type variables defined for this type to the given variables. 2758 * Set the type variables defined for this type to the given variables.
2759 * @param typeVariables the type variables defined for this type 2759 * @param typeVariables the type variables defined for this type
2760 */ 2760 */
2761 void set typeVariables(List<TypeVariableElement> typeVariables3) { 2761 void set typeVariables(List<TypeVariableElement> typeVariables2) {
2762 for (TypeVariableElement variable in typeVariables3) { 2762 for (TypeVariableElement variable in typeVariables2) {
2763 ((variable as TypeVariableElementImpl)).enclosingElement = this; 2763 ((variable as TypeVariableElementImpl)).enclosingElement = this;
2764 } 2764 }
2765 this._typeVariables = typeVariables3; 2765 this._typeVariables = typeVariables2;
2766 } 2766 }
2767 void visitChildren(ElementVisitor<Object> visitor) { 2767 void visitChildren(ElementVisitor<Object> visitor) {
2768 super.visitChildren(visitor); 2768 super.visitChildren(visitor);
2769 safelyVisitChildren(_parameters, visitor); 2769 safelyVisitChildren(_parameters, visitor);
2770 safelyVisitChildren(_typeVariables, visitor); 2770 safelyVisitChildren(_typeVariables, visitor);
2771 } 2771 }
2772 void appendTo(JavaStringBuilder builder) { 2772 void appendTo(JavaStringBuilder builder) {
2773 builder.append("typedef "); 2773 builder.append("typedef ");
2774 builder.append(name); 2774 builder.append(name);
2775 int variableCount = _typeVariables.length; 2775 int variableCount = _typeVariables.length;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2881 } 2881 }
2882 for (HtmlScriptElement script in scripts2) { 2882 for (HtmlScriptElement script in scripts2) {
2883 ((script as HtmlScriptElementImpl)).enclosingElement = this; 2883 ((script as HtmlScriptElementImpl)).enclosingElement = this;
2884 } 2884 }
2885 this._scripts = scripts2; 2885 this._scripts = scripts2;
2886 } 2886 }
2887 /** 2887 /**
2888 * Set the source that corresponds to this HTML file to the given source. 2888 * Set the source that corresponds to this HTML file to the given source.
2889 * @param source the source that corresponds to this HTML file 2889 * @param source the source that corresponds to this HTML file
2890 */ 2890 */
2891 void set source(Source source6) { 2891 void set source(Source source2) {
2892 this._source = source6; 2892 this._source = source2;
2893 } 2893 }
2894 void visitChildren(ElementVisitor<Object> visitor) { 2894 void visitChildren(ElementVisitor<Object> visitor) {
2895 super.visitChildren(visitor); 2895 super.visitChildren(visitor);
2896 safelyVisitChildren(_scripts, visitor); 2896 safelyVisitChildren(_scripts, visitor);
2897 } 2897 }
2898 void appendTo(JavaStringBuilder builder) { 2898 void appendTo(JavaStringBuilder builder) {
2899 if (_source == null) { 2899 if (_source == null) {
2900 builder.append("{HTML file}"); 2900 builder.append("{HTML file}");
2901 } else { 2901 } else {
2902 builder.append(_source.fullName); 2902 builder.append(_source.fullName);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2946 accept(ElementVisitor visitor) => visitor.visitImportElement(this); 2946 accept(ElementVisitor visitor) => visitor.visitImportElement(this);
2947 List<NamespaceCombinator> get combinators => _combinators; 2947 List<NamespaceCombinator> get combinators => _combinators;
2948 LibraryElement get importedLibrary => _importedLibrary; 2948 LibraryElement get importedLibrary => _importedLibrary;
2949 ElementKind get kind => ElementKind.IMPORT; 2949 ElementKind get kind => ElementKind.IMPORT;
2950 PrefixElement get prefix => _prefix; 2950 PrefixElement get prefix => _prefix;
2951 /** 2951 /**
2952 * Set the combinators that were specified as part of the import directive to the given array of 2952 * Set the combinators that were specified as part of the import directive to the given array of
2953 * combinators. 2953 * combinators.
2954 * @param combinators the combinators that were specified as part of the impor t directive 2954 * @param combinators the combinators that were specified as part of the impor t directive
2955 */ 2955 */
2956 void set combinators(List<NamespaceCombinator> combinators3) { 2956 void set combinators(List<NamespaceCombinator> combinators2) {
2957 this._combinators = combinators3; 2957 this._combinators = combinators2;
2958 } 2958 }
2959 /** 2959 /**
2960 * Set the library that is imported into this library by this import directive to the given 2960 * Set the library that is imported into this library by this import directive to the given
2961 * library. 2961 * library.
2962 * @param importedLibrary the library that is imported into this library 2962 * @param importedLibrary the library that is imported into this library
2963 */ 2963 */
2964 void set importedLibrary(LibraryElement importedLibrary3) { 2964 void set importedLibrary(LibraryElement importedLibrary2) {
2965 this._importedLibrary = importedLibrary3; 2965 this._importedLibrary = importedLibrary2;
2966 } 2966 }
2967 /** 2967 /**
2968 * Set the prefix that was specified as part of the import directive to the gi ven prefix. 2968 * Set the prefix that was specified as part of the import directive to the gi ven prefix.
2969 * @param prefix the prefix that was specified as part of the import directive 2969 * @param prefix the prefix that was specified as part of the import directive
2970 */ 2970 */
2971 void set prefix(PrefixElement prefix3) { 2971 void set prefix(PrefixElement prefix2) {
2972 this._prefix = prefix3; 2972 this._prefix = prefix2;
2973 } 2973 }
2974 void visitChildren(ElementVisitor<Object> visitor) { 2974 void visitChildren(ElementVisitor<Object> visitor) {
2975 super.visitChildren(visitor); 2975 super.visitChildren(visitor);
2976 safelyVisitChild(_prefix, visitor); 2976 safelyVisitChild(_prefix, visitor);
2977 } 2977 }
2978 void appendTo(JavaStringBuilder builder) { 2978 void appendTo(JavaStringBuilder builder) {
2979 builder.append("import "); 2979 builder.append("import ");
2980 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); 2980 ((_importedLibrary as LibraryElementImpl)).appendTo(builder);
2981 } 2981 }
2982 } 2982 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 /** 3087 /**
3088 * Initialize a newly created library element to have the given name. 3088 * Initialize a newly created library element to have the given name.
3089 * @param context the analysis context in which the library is defined 3089 * @param context the analysis context in which the library is defined
3090 * @param name the name of this element 3090 * @param name the name of this element
3091 */ 3091 */
3092 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co n1(name) { 3092 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co n1(name) {
3093 this._context = context; 3093 this._context = context;
3094 } 3094 }
3095 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); 3095 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
3096 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin gCompilationUnit; 3096 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == ((object as LibraryElementImpl)).definin gCompilationUnit;
3097 ElementImpl getChild(String identifier31) { 3097 ElementImpl getChild(String identifier2) {
3098 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier == identifier31) { 3098 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier == identifier2) {
3099 return _definingCompilationUnit as CompilationUnitElementImpl; 3099 return _definingCompilationUnit as CompilationUnitElementImpl;
3100 } 3100 }
3101 for (CompilationUnitElement part in _parts) { 3101 for (CompilationUnitElement part in _parts) {
3102 if (((part as CompilationUnitElementImpl)).identifier == identifier31) { 3102 if (((part as CompilationUnitElementImpl)).identifier == identifier2) {
3103 return part as CompilationUnitElementImpl; 3103 return part as CompilationUnitElementImpl;
3104 } 3104 }
3105 } 3105 }
3106 return null; 3106 return null;
3107 } 3107 }
3108 AnalysisContext get context => _context; 3108 AnalysisContext get context => _context;
3109 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit ; 3109 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit ;
3110 FunctionElement get entryPoint => _entryPoint; 3110 FunctionElement get entryPoint => _entryPoint;
3111 List<LibraryElement> get exportedLibraries { 3111 List<LibraryElement> get exportedLibraries {
3112 Set<LibraryElement> libraries = new Set<LibraryElement>(); 3112 Set<LibraryElement> libraries = new Set<LibraryElement>();
(...skipping 17 matching lines...) Expand all
3130 } 3130 }
3131 return new List.from(libraries); 3131 return new List.from(libraries);
3132 } 3132 }
3133 List<ImportElement> get imports => _imports; 3133 List<ImportElement> get imports => _imports;
3134 ElementKind get kind => ElementKind.LIBRARY; 3134 ElementKind get kind => ElementKind.LIBRARY;
3135 LibraryElement get library => this; 3135 LibraryElement get library => this;
3136 List<CompilationUnitElement> get parts => _parts; 3136 List<CompilationUnitElement> get parts => _parts;
3137 List<PrefixElement> get prefixes { 3137 List<PrefixElement> get prefixes {
3138 Set<PrefixElement> prefixes = new Set<PrefixElement>(); 3138 Set<PrefixElement> prefixes = new Set<PrefixElement>();
3139 for (ImportElement element in _imports) { 3139 for (ImportElement element in _imports) {
3140 PrefixElement prefix4 = element.prefix; 3140 PrefixElement prefix2 = element.prefix;
3141 if (prefix4 != null) { 3141 if (prefix2 != null) {
3142 javaSetAdd(prefixes, prefix4); 3142 javaSetAdd(prefixes, prefix2);
3143 } 3143 }
3144 } 3144 }
3145 return new List.from(prefixes); 3145 return new List.from(prefixes);
3146 } 3146 }
3147 Source get source { 3147 Source get source {
3148 if (_definingCompilationUnit == null) { 3148 if (_definingCompilationUnit == null) {
3149 return null; 3149 return null;
3150 } 3150 }
3151 return _definingCompilationUnit.source; 3151 return _definingCompilationUnit.source;
3152 } 3152 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
3195 } 3195 }
3196 this._exports = exports2; 3196 this._exports = exports2;
3197 } 3197 }
3198 /** 3198 /**
3199 * Set the specifications of all of the imports defined in this library to the given array. 3199 * Set the specifications of all of the imports defined in this library to the given array.
3200 * @param imports the specifications of all of the imports defined in this lib rary 3200 * @param imports the specifications of all of the imports defined in this lib rary
3201 */ 3201 */
3202 void set imports(List<ImportElement> imports2) { 3202 void set imports(List<ImportElement> imports2) {
3203 for (ImportElement importElement in imports2) { 3203 for (ImportElement importElement in imports2) {
3204 ((importElement as ImportElementImpl)).enclosingElement = this; 3204 ((importElement as ImportElementImpl)).enclosingElement = this;
3205 PrefixElementImpl prefix5 = importElement.prefix as PrefixElementImpl; 3205 PrefixElementImpl prefix2 = importElement.prefix as PrefixElementImpl;
3206 if (prefix5 != null) { 3206 if (prefix2 != null) {
3207 prefix5.enclosingElement = this; 3207 prefix2.enclosingElement = this;
3208 } 3208 }
3209 } 3209 }
3210 this._imports = imports2; 3210 this._imports = imports2;
3211 } 3211 }
3212 /** 3212 /**
3213 * Set the compilation units that are included in this library using a {@code part} directive. 3213 * Set the compilation units that are included in this library using a {@code part} directive.
3214 * @param parts the compilation units that are included in this library using a {@code part}directive 3214 * @param parts the compilation units that are included in this library using a {@code part}directive
3215 */ 3215 */
3216 void set parts(List<CompilationUnitElement> parts2) { 3216 void set parts(List<CompilationUnitElement> parts2) {
3217 for (CompilationUnitElement compilationUnit in parts2) { 3217 for (CompilationUnitElement compilationUnit in parts2) {
(...skipping 11 matching lines...) Expand all
3229 /** 3229 /**
3230 * Answer {@code true} if the receiver directly or indirectly imports the dart :html libraries. 3230 * Answer {@code true} if the receiver directly or indirectly imports the dart :html libraries.
3231 * @return {@code true} if the receiver directly or indirectly imports the dar t:html libraries 3231 * @return {@code true} if the receiver directly or indirectly imports the dar t:html libraries
3232 */ 3232 */
3233 bool isOrImportsBrowserLibrary() { 3233 bool isOrImportsBrowserLibrary() {
3234 List<LibraryElement> visited = new List<LibraryElement>(); 3234 List<LibraryElement> visited = new List<LibraryElement>();
3235 Source htmlLibSource = _context.sourceFactory.forUri(DartSdk.DART_HTML); 3235 Source htmlLibSource = _context.sourceFactory.forUri(DartSdk.DART_HTML);
3236 visited.add(this); 3236 visited.add(this);
3237 for (int index = 0; index < visited.length; index++) { 3237 for (int index = 0; index < visited.length; index++) {
3238 LibraryElement library = visited[index]; 3238 LibraryElement library = visited[index];
3239 Source source14 = library.definingCompilationUnit.source; 3239 Source source2 = library.definingCompilationUnit.source;
3240 if (source14 == htmlLibSource) { 3240 if (source2 == htmlLibSource) {
3241 return true; 3241 return true;
3242 } 3242 }
3243 for (LibraryElement importedLibrary in library.importedLibraries) { 3243 for (LibraryElement importedLibrary in library.importedLibraries) {
3244 if (!visited.contains(importedLibrary)) { 3244 if (!visited.contains(importedLibrary)) {
3245 visited.add(importedLibrary); 3245 visited.add(importedLibrary);
3246 } 3246 }
3247 } 3247 }
3248 for (LibraryElement exportedLibrary in library.exportedLibraries) { 3248 for (LibraryElement exportedLibrary in library.exportedLibraries) {
3249 if (!visited.contains(exportedLibrary)) { 3249 if (!visited.contains(exportedLibrary)) {
3250 visited.add(exportedLibrary); 3250 visited.add(exportedLibrary);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
3330 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set) { 3330 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set) {
3331 _jtd_constructor_212_impl(name, nameOffset); 3331 _jtd_constructor_212_impl(name, nameOffset);
3332 } 3332 }
3333 _jtd_constructor_212_impl(String name, int nameOffset) { 3333 _jtd_constructor_212_impl(String name, int nameOffset) {
3334 } 3334 }
3335 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); 3335 accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
3336 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 3336 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
3337 ElementKind get kind => ElementKind.METHOD; 3337 ElementKind get kind => ElementKind.METHOD;
3338 bool isAbstract() => hasModifier(Modifier.ABSTRACT); 3338 bool isAbstract() => hasModifier(Modifier.ABSTRACT);
3339 bool isOperator() { 3339 bool isOperator() {
3340 String name16 = name; 3340 String name2 = name;
3341 if (name16.isEmpty) { 3341 if (name2.isEmpty) {
3342 return false; 3342 return false;
3343 } 3343 }
3344 int first = name16.codeUnitAt(0); 3344 int first = name2.codeUnitAt(0);
3345 return !((0x61 <= first && first <= 0x7A) || (0x41 <= first && first <= 0x5A ) || first == 0x5F || first == 0x24); 3345 return !((0x61 <= first && first <= 0x7A) || (0x41 <= first && first <= 0x5A ) || first == 0x5F || first == 0x24);
3346 } 3346 }
3347 bool isStatic() => hasModifier(Modifier.STATIC); 3347 bool isStatic() => hasModifier(Modifier.STATIC);
3348 /** 3348 /**
3349 * Set whether this method is abstract to correspond to the given value. 3349 * Set whether this method is abstract to correspond to the given value.
3350 * @param isAbstract {@code true} if the method is abstract 3350 * @param isAbstract {@code true} if the method is abstract
3351 */ 3351 */
3352 void set abstract(bool isAbstract) { 3352 void set abstract(bool isAbstract) {
3353 setModifier(Modifier.ABSTRACT, isAbstract); 3353 setModifier(Modifier.ABSTRACT, isAbstract);
3354 } 3354 }
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3541 * Set the kind of this parameter to the given kind. 3541 * Set the kind of this parameter to the given kind.
3542 * @param parameterKind the new kind of this parameter 3542 * @param parameterKind the new kind of this parameter
3543 */ 3543 */
3544 void set parameterKind(ParameterKind parameterKind2) { 3544 void set parameterKind(ParameterKind parameterKind2) {
3545 this._parameterKind = parameterKind2; 3545 this._parameterKind = parameterKind2;
3546 } 3546 }
3547 /** 3547 /**
3548 * Set the parameters defined by this executable element to the given paramete rs. 3548 * Set the parameters defined by this executable element to the given paramete rs.
3549 * @param parameters the parameters defined by this executable element 3549 * @param parameters the parameters defined by this executable element
3550 */ 3550 */
3551 void set parameters(List<ParameterElement> parameters9) { 3551 void set parameters(List<ParameterElement> parameters2) {
3552 for (ParameterElement parameter in parameters9) { 3552 for (ParameterElement parameter in parameters2) {
3553 ((parameter as ParameterElementImpl)).enclosingElement = this; 3553 ((parameter as ParameterElementImpl)).enclosingElement = this;
3554 } 3554 }
3555 this._parameters = parameters9; 3555 this._parameters = parameters2;
3556 } 3556 }
3557 /** 3557 /**
3558 * Set the visible range for this element to the range starting at the given o ffset with the given 3558 * Set the visible range for this element to the range starting at the given o ffset with the given
3559 * length. 3559 * length.
3560 * @param offset the offset to the beginning of the visible range for this ele ment 3560 * @param offset the offset to the beginning of the visible range for this ele ment
3561 * @param length the length of the visible range for this element, or {@code - 1} if this element 3561 * @param length the length of the visible range for this element, or {@code - 1} if this element
3562 * does not have a visible range 3562 * does not have a visible range
3563 */ 3563 */
3564 void setVisibleRange(int offset, int length) { 3564 void setVisibleRange(int offset, int length) {
3565 _visibleRangeOffset = offset; 3565 _visibleRangeOffset = offset;
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
3684 * Set whether this accessor is a setter to correspond to the given value. 3684 * Set whether this accessor is a setter to correspond to the given value.
3685 * @param isSetter {@code true} if the accessor is a setter 3685 * @param isSetter {@code true} if the accessor is a setter
3686 */ 3686 */
3687 void set setter(bool isSetter) { 3687 void set setter(bool isSetter) {
3688 setModifier(Modifier.SETTER, isSetter); 3688 setModifier(Modifier.SETTER, isSetter);
3689 } 3689 }
3690 /** 3690 /**
3691 * Set the variable associated with this accessor to the given variable. 3691 * Set the variable associated with this accessor to the given variable.
3692 * @param variable the variable associated with this accessor 3692 * @param variable the variable associated with this accessor
3693 */ 3693 */
3694 void set variable(PropertyInducingElement variable3) { 3694 void set variable(PropertyInducingElement variable2) {
3695 this._variable = variable3; 3695 this._variable = variable2;
3696 } 3696 }
3697 void appendTo(JavaStringBuilder builder) { 3697 void appendTo(JavaStringBuilder builder) {
3698 builder.append(isGetter() ? "get " : "set "); 3698 builder.append(isGetter() ? "get " : "set ");
3699 builder.append(variable.name); 3699 builder.append(variable.name);
3700 super.appendTo(builder); 3700 super.appendTo(builder);
3701 } 3701 }
3702 } 3702 }
3703 /** 3703 /**
3704 * Instances of the class {@code PropertyInducingElementImpl} implement a{@code PropertyInducingElement}. 3704 * Instances of the class {@code PropertyInducingElementImpl} implement a{@code PropertyInducingElement}.
3705 * @coverage dart.engine.element 3705 * @coverage dart.engine.element
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3853 * Set the type representing the bound associated with this variable to the gi ven type. 3853 * Set the type representing the bound associated with this variable to the gi ven type.
3854 * @param bound the type representing the bound associated with this variable 3854 * @param bound the type representing the bound associated with this variable
3855 */ 3855 */
3856 void set bound(Type2 bound2) { 3856 void set bound(Type2 bound2) {
3857 this._bound = bound2; 3857 this._bound = bound2;
3858 } 3858 }
3859 /** 3859 /**
3860 * Set the type defined by this type variable to the given type 3860 * Set the type defined by this type variable to the given type
3861 * @param type the type defined by this type variable 3861 * @param type the type defined by this type variable
3862 */ 3862 */
3863 void set type(TypeVariableType type9) { 3863 void set type(TypeVariableType type2) {
3864 this._type = type9; 3864 this._type = type2;
3865 } 3865 }
3866 void appendTo(JavaStringBuilder builder) { 3866 void appendTo(JavaStringBuilder builder) {
3867 builder.append(name); 3867 builder.append(name);
3868 if (_bound != null) { 3868 if (_bound != null) {
3869 builder.append(" extends "); 3869 builder.append(" extends ");
3870 builder.append(_bound); 3870 builder.append(_bound);
3871 } 3871 }
3872 } 3872 }
3873 } 3873 }
3874 /** 3874 /**
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3939 * Set whether this variable is final to correspond to the given value. 3939 * Set whether this variable is final to correspond to the given value.
3940 * @param isFinal {@code true} if the variable is final 3940 * @param isFinal {@code true} if the variable is final
3941 */ 3941 */
3942 void set final2(bool isFinal) { 3942 void set final2(bool isFinal) {
3943 setModifier(Modifier.FINAL, isFinal); 3943 setModifier(Modifier.FINAL, isFinal);
3944 } 3944 }
3945 /** 3945 /**
3946 * Set the function representing this variable's initializer to the given func tion. 3946 * Set the function representing this variable's initializer to the given func tion.
3947 * @param initializer the function representing this variable's initializer 3947 * @param initializer the function representing this variable's initializer
3948 */ 3948 */
3949 void set initializer(FunctionElement initializer3) { 3949 void set initializer(FunctionElement initializer2) {
3950 if (initializer3 != null) { 3950 if (initializer2 != null) {
3951 ((initializer3 as FunctionElementImpl)).enclosingElement = this; 3951 ((initializer2 as FunctionElementImpl)).enclosingElement = this;
3952 } 3952 }
3953 this._initializer = initializer3; 3953 this._initializer = initializer2;
3954 } 3954 }
3955 /** 3955 /**
3956 * Set the declared type of this variable to the given type. 3956 * Set the declared type of this variable to the given type.
3957 * @param type the declared type of this variable 3957 * @param type the declared type of this variable
3958 */ 3958 */
3959 void set type(Type2 type10) { 3959 void set type(Type2 type2) {
3960 this._type = type10; 3960 this._type = type2;
3961 } 3961 }
3962 void visitChildren(ElementVisitor<Object> visitor) { 3962 void visitChildren(ElementVisitor<Object> visitor) {
3963 super.visitChildren(visitor); 3963 super.visitChildren(visitor);
3964 safelyVisitChild(_initializer, visitor); 3964 safelyVisitChild(_initializer, visitor);
3965 } 3965 }
3966 void appendTo(JavaStringBuilder builder) { 3966 void appendTo(JavaStringBuilder builder) {
3967 builder.append(type); 3967 builder.append(type);
3968 builder.append(" "); 3968 builder.append(" ");
3969 builder.append(name); 3969 builder.append(name);
3970 } 3970 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
4161 * @param baseElement the element on which the parameterized element was creat ed 4161 * @param baseElement the element on which the parameterized element was creat ed
4162 * @param definingType the type in which the element is defined 4162 * @param definingType the type in which the element is defined
4163 */ 4163 */
4164 MethodMember(MethodElement baseElement, InterfaceType definingType) : super(ba seElement, definingType) { 4164 MethodMember(MethodElement baseElement, InterfaceType definingType) : super(ba seElement, definingType) {
4165 } 4165 }
4166 MethodElement get baseElement => super.baseElement as MethodElement; 4166 MethodElement get baseElement => super.baseElement as MethodElement;
4167 ClassElement get enclosingElement => baseElement.enclosingElement; 4167 ClassElement get enclosingElement => baseElement.enclosingElement;
4168 bool isAbstract() => baseElement.isAbstract(); 4168 bool isAbstract() => baseElement.isAbstract();
4169 String toString() { 4169 String toString() {
4170 MethodElement baseElement2 = baseElement; 4170 MethodElement baseElement2 = baseElement;
4171 List<ParameterElement> parameters12 = parameters; 4171 List<ParameterElement> parameters2 = parameters;
4172 FunctionType type13 = type; 4172 FunctionType type2 = type;
4173 JavaStringBuilder builder = new JavaStringBuilder(); 4173 JavaStringBuilder builder = new JavaStringBuilder();
4174 builder.append(baseElement2.enclosingElement.name); 4174 builder.append(baseElement2.enclosingElement.name);
4175 builder.append("."); 4175 builder.append(".");
4176 builder.append(baseElement2.name); 4176 builder.append(baseElement2.name);
4177 builder.append("("); 4177 builder.append("(");
4178 int parameterCount = parameters12.length; 4178 int parameterCount = parameters2.length;
4179 for (int i = 0; i < parameterCount; i++) { 4179 for (int i = 0; i < parameterCount; i++) {
4180 if (i > 0) { 4180 if (i > 0) {
4181 builder.append(", "); 4181 builder.append(", ");
4182 } 4182 }
4183 builder.append(parameters12[i]).toString(); 4183 builder.append(parameters2[i]).toString();
4184 } 4184 }
4185 builder.append(")"); 4185 builder.append(")");
4186 if (type13 != null) { 4186 if (type2 != null) {
4187 builder.append(" -> "); 4187 builder.append(" -> ");
4188 builder.append(type13.returnType); 4188 builder.append(type2.returnType);
4189 } 4189 }
4190 return builder.toString(); 4190 return builder.toString();
4191 } 4191 }
4192 } 4192 }
4193 /** 4193 /**
4194 * Instances of the class {@code ParameterMember} represent a parameter element defined in a 4194 * Instances of the class {@code ParameterMember} represent a parameter element defined in a
4195 * parameterized type where the values of the type parameters are known. 4195 * parameterized type where the values of the type parameters are known.
4196 */ 4196 */
4197 class ParameterMember extends VariableMember implements ParameterElement { 4197 class ParameterMember extends VariableMember implements ParameterElement {
4198 /** 4198 /**
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
4245 } 4245 }
4246 List<ParameterElement> parameterizedParameters = new List<ParameterElement>( parameterCount); 4246 List<ParameterElement> parameterizedParameters = new List<ParameterElement>( parameterCount);
4247 for (int i = 0; i < parameterCount; i++) { 4247 for (int i = 0; i < parameterCount; i++) {
4248 parameterizedParameters[i] = ParameterMember.from(baseParameters[i], defin ingType); 4248 parameterizedParameters[i] = ParameterMember.from(baseParameters[i], defin ingType);
4249 } 4249 }
4250 return parameterizedParameters; 4250 return parameterizedParameters;
4251 } 4251 }
4252 SourceRange get visibleRange => baseElement.visibleRange; 4252 SourceRange get visibleRange => baseElement.visibleRange;
4253 bool isInitializingFormal() => baseElement.isInitializingFormal(); 4253 bool isInitializingFormal() => baseElement.isInitializingFormal();
4254 String toString() { 4254 String toString() {
4255 ParameterElement baseElement3 = baseElement; 4255 ParameterElement baseElement2 = baseElement;
4256 String left = ""; 4256 String left = "";
4257 String right = ""; 4257 String right = "";
4258 while (true) { 4258 while (true) {
4259 if (baseElement3.parameterKind == ParameterKind.NAMED) { 4259 if (baseElement2.parameterKind == ParameterKind.NAMED) {
4260 left = "{"; 4260 left = "{";
4261 right = "}"; 4261 right = "}";
4262 } else if (baseElement3.parameterKind == ParameterKind.POSITIONAL) { 4262 } else if (baseElement2.parameterKind == ParameterKind.POSITIONAL) {
4263 left = "["; 4263 left = "[";
4264 right = "]"; 4264 right = "]";
4265 } 4265 }
4266 break; 4266 break;
4267 } 4267 }
4268 JavaStringBuilder builder = new JavaStringBuilder(); 4268 JavaStringBuilder builder = new JavaStringBuilder();
4269 builder.append(left); 4269 builder.append(left);
4270 builder.append(type); 4270 builder.append(type);
4271 builder.append(" "); 4271 builder.append(" ");
4272 builder.append(baseElement3.name); 4272 builder.append(baseElement2.name);
4273 builder.append(right); 4273 builder.append(right);
4274 return builder.toString(); 4274 return builder.toString();
4275 } 4275 }
4276 } 4276 }
4277 /** 4277 /**
4278 * Instances of the class {@code PropertyAccessorMember} represent a property ac cessor element 4278 * Instances of the class {@code PropertyAccessorMember} represent a property ac cessor element
4279 * defined in a parameterized type where the values of the type parameters are k nown. 4279 * defined in a parameterized type where the values of the type parameters are k nown.
4280 */ 4280 */
4281 class PropertyAccessorMember extends ExecutableMember implements PropertyAccesso rElement { 4281 class PropertyAccessorMember extends ExecutableMember implements PropertyAccesso rElement {
4282 /** 4282 /**
(...skipping 23 matching lines...) Expand all
4306 * Initialize a newly created element to represent a property accessor of the given parameterized 4306 * Initialize a newly created element to represent a property accessor of the given parameterized
4307 * type. 4307 * type.
4308 * @param baseElement the element on which the parameterized element was creat ed 4308 * @param baseElement the element on which the parameterized element was creat ed
4309 * @param definingType the type in which the element is defined 4309 * @param definingType the type in which the element is defined
4310 */ 4310 */
4311 PropertyAccessorMember(PropertyAccessorElement baseElement, InterfaceType defi ningType) : super(baseElement, definingType) { 4311 PropertyAccessorMember(PropertyAccessorElement baseElement, InterfaceType defi ningType) : super(baseElement, definingType) {
4312 } 4312 }
4313 PropertyAccessorElement get baseElement => super.baseElement as PropertyAccess orElement; 4313 PropertyAccessorElement get baseElement => super.baseElement as PropertyAccess orElement;
4314 Element get enclosingElement => baseElement.enclosingElement; 4314 Element get enclosingElement => baseElement.enclosingElement;
4315 PropertyInducingElement get variable { 4315 PropertyInducingElement get variable {
4316 PropertyInducingElement variable4 = baseElement.variable; 4316 PropertyInducingElement variable2 = baseElement.variable;
4317 if (variable4 is FieldElement) { 4317 if (variable2 is FieldElement) {
4318 return FieldMember.from(((variable4 as FieldElement)), definingType); 4318 return FieldMember.from(((variable2 as FieldElement)), definingType);
4319 } 4319 }
4320 return variable4; 4320 return variable2;
4321 } 4321 }
4322 bool isGetter() => baseElement.isGetter(); 4322 bool isGetter() => baseElement.isGetter();
4323 bool isSetter() => baseElement.isSetter(); 4323 bool isSetter() => baseElement.isSetter();
4324 } 4324 }
4325 /** 4325 /**
4326 * The abstract class {@code VariableMember} defines the behavior common to memb ers that represent a 4326 * The abstract class {@code VariableMember} defines the behavior common to memb ers that represent a
4327 * variable element defined in a parameterized type where the values of the type parameters are 4327 * variable element defined in a parameterized type where the values of the type parameters are
4328 * known. 4328 * known.
4329 */ 4329 */
4330 abstract class VariableMember extends Member implements VariableElement { 4330 abstract class VariableMember extends Member implements VariableElement {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
4495 } 4495 }
4496 FunctionTypeImpl otherType = object as FunctionTypeImpl; 4496 FunctionTypeImpl otherType = object as FunctionTypeImpl;
4497 return element == otherType.element && JavaArrays.equals(_normalParameterTyp es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType ._namedParameterTypes) && _returnType == otherType._returnType; 4497 return element == otherType.element && JavaArrays.equals(_normalParameterTyp es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType ._namedParameterTypes) && _returnType == otherType._returnType;
4498 } 4498 }
4499 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; 4499 Map<String, Type2> get namedParameterTypes => _namedParameterTypes;
4500 List<Type2> get normalParameterTypes => _normalParameterTypes; 4500 List<Type2> get normalParameterTypes => _normalParameterTypes;
4501 List<Type2> get optionalParameterTypes => _optionalParameterTypes; 4501 List<Type2> get optionalParameterTypes => _optionalParameterTypes;
4502 Type2 get returnType => _returnType; 4502 Type2 get returnType => _returnType;
4503 List<Type2> get typeArguments => _typeArguments; 4503 List<Type2> get typeArguments => _typeArguments;
4504 int get hashCode { 4504 int get hashCode {
4505 Element element53 = element; 4505 Element element2 = element;
4506 if (element53 == null) { 4506 if (element2 == null) {
4507 return 0; 4507 return 0;
4508 } 4508 }
4509 return element53.hashCode; 4509 return element2.hashCode;
4510 } 4510 }
4511 bool isSubtypeOf(Type2 type) { 4511 bool isSubtypeOf(Type2 type) {
4512 if (type == null) { 4512 if (type == null) {
4513 return false; 4513 return false;
4514 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct ion()) { 4514 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct ion()) {
4515 return true; 4515 return true;
4516 } else if (type is! FunctionType) { 4516 } else if (type is! FunctionType) {
4517 return false; 4517 return false;
4518 } else if (this == type) { 4518 } else if (this == type) {
4519 return true; 4519 return true;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
4592 * array. 4592 * array.
4593 * @param optionalParameterTypes the types of the optional parameters of this type of function 4593 * @param optionalParameterTypes the types of the optional parameters of this type of function
4594 */ 4594 */
4595 void set optionalParameterTypes(List<Type2> optionalParameterTypes2) { 4595 void set optionalParameterTypes(List<Type2> optionalParameterTypes2) {
4596 this._optionalParameterTypes = optionalParameterTypes2; 4596 this._optionalParameterTypes = optionalParameterTypes2;
4597 } 4597 }
4598 /** 4598 /**
4599 * Set the type of object returned by this type of function to the given type. 4599 * Set the type of object returned by this type of function to the given type.
4600 * @param returnType the type of object returned by this type of function 4600 * @param returnType the type of object returned by this type of function
4601 */ 4601 */
4602 void set returnType(Type2 returnType3) { 4602 void set returnType(Type2 returnType2) {
4603 this._returnType = returnType3; 4603 this._returnType = returnType2;
4604 } 4604 }
4605 /** 4605 /**
4606 * Set the actual types of the type arguments to the given types. 4606 * Set the actual types of the type arguments to the given types.
4607 * @param typeArguments the actual types of the type arguments 4607 * @param typeArguments the actual types of the type arguments
4608 */ 4608 */
4609 void set typeArguments(List<Type2> typeArguments4) { 4609 void set typeArguments(List<Type2> typeArguments2) {
4610 this._typeArguments = typeArguments4; 4610 this._typeArguments = typeArguments2;
4611 } 4611 }
4612 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen tTypes, typeArguments); 4612 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen tTypes, typeArguments);
4613 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT ypes) { 4613 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT ypes) {
4614 if (argumentTypes.length != parameterTypes.length) { 4614 if (argumentTypes.length != parameterTypes.length) {
4615 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes. length}) != parameterTypes.length (${parameterTypes.length})"); 4615 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes. length}) != parameterTypes.length (${parameterTypes.length})");
4616 } 4616 }
4617 if (argumentTypes.length == 0) { 4617 if (argumentTypes.length == 0) {
4618 return this; 4618 return this;
4619 } 4619 }
4620 Element element54 = element; 4620 Element element2 = element;
4621 FunctionTypeImpl newType = (element54 is ExecutableElement) ? new FunctionTy peImpl.con1((element54 as ExecutableElement)) : new FunctionTypeImpl.con2((eleme nt54 as FunctionTypeAliasElement)); 4621 FunctionTypeImpl newType = (element2 is ExecutableElement) ? new FunctionTyp eImpl.con1((element2 as ExecutableElement)) : new FunctionTypeImpl.con2((element 2 as FunctionTypeAliasElement));
4622 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes); 4622 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes);
4623 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar gumentTypes, parameterTypes); 4623 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar gumentTypes, parameterTypes);
4624 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes , argumentTypes, parameterTypes); 4624 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes , argumentTypes, parameterTypes);
4625 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp es, parameterTypes); 4625 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp es, parameterTypes);
4626 return newType; 4626 return newType;
4627 } 4627 }
4628 void appendTo(JavaStringBuilder builder) { 4628 void appendTo(JavaStringBuilder builder) {
4629 builder.append("("); 4629 builder.append("(");
4630 bool needsComma = false; 4630 bool needsComma = false;
4631 if (_normalParameterTypes.length > 0) { 4631 if (_normalParameterTypes.length > 0) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
4727 int longestPath = 1; 4727 int longestPath = 1;
4728 int pathLength; 4728 int pathLength;
4729 if (superinterfaces.length > 0) { 4729 if (superinterfaces.length > 0) {
4730 for (InterfaceType superinterface in superinterfaces) { 4730 for (InterfaceType superinterface in superinterfaces) {
4731 pathLength = computeLongestInheritancePathToObject2(superinterface, dept h + 1); 4731 pathLength = computeLongestInheritancePathToObject2(superinterface, dept h + 1);
4732 if (pathLength > longestPath) { 4732 if (pathLength > longestPath) {
4733 longestPath = pathLength; 4733 longestPath = pathLength;
4734 } 4734 }
4735 } 4735 }
4736 } 4736 }
4737 InterfaceType supertype3 = classElement.supertype; 4737 InterfaceType supertype2 = classElement.supertype;
4738 pathLength = computeLongestInheritancePathToObject2(supertype3, depth + 1); 4738 pathLength = computeLongestInheritancePathToObject2(supertype2, depth + 1);
4739 if (pathLength > longestPath) { 4739 if (pathLength > longestPath) {
4740 longestPath = pathLength; 4740 longestPath = pathLength;
4741 } 4741 }
4742 return longestPath; 4742 return longestPath;
4743 } 4743 }
4744 /** 4744 /**
4745 * Returns the set of all superinterfaces of the passed {@link Type}. This is a recursive method, 4745 * Returns the set of all superinterfaces of the passed {@link Type}. This is a recursive method,
4746 * callers should call the public {@link #computeSuperinterfaceSet(Type)}. 4746 * callers should call the public {@link #computeSuperinterfaceSet(Type)}.
4747 * @param type the {@link Type} to compute the set of superinterfaces of 4747 * @param type the {@link Type} to compute the set of superinterfaces of
4748 * @param set a {@link HashSet} used recursively by this method 4748 * @param set a {@link HashSet} used recursively by this method
4749 * @return the {@link Set} of superinterfaces of the passed {@link Type} 4749 * @return the {@link Set} of superinterfaces of the passed {@link Type}
4750 * @see #computeSuperinterfaceSet(Type) 4750 * @see #computeSuperinterfaceSet(Type)
4751 * @see #getLeastUpperBound(Type) 4751 * @see #getLeastUpperBound(Type)
4752 */ 4752 */
4753 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In terfaceType> set) { 4753 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In terfaceType> set) {
4754 Element element55 = type.element; 4754 Element element2 = type.element;
4755 if (element55 != null && element55 is ClassElement) { 4755 if (element2 != null && element2 is ClassElement) {
4756 ClassElement classElement = element55 as ClassElement; 4756 ClassElement classElement = element2 as ClassElement;
4757 List<InterfaceType> superinterfaces = classElement.interfaces; 4757 List<InterfaceType> superinterfaces = classElement.interfaces;
4758 for (InterfaceType superinterface in superinterfaces) { 4758 for (InterfaceType superinterface in superinterfaces) {
4759 javaSetAdd(set, superinterface); 4759 javaSetAdd(set, superinterface);
4760 computeSuperinterfaceSet2(superinterface, set); 4760 computeSuperinterfaceSet2(superinterface, set);
4761 } 4761 }
4762 InterfaceType supertype4 = classElement.supertype; 4762 InterfaceType supertype2 = classElement.supertype;
4763 if (supertype4 != null) { 4763 if (supertype2 != null) {
4764 javaSetAdd(set, supertype4); 4764 javaSetAdd(set, supertype2);
4765 computeSuperinterfaceSet2(supertype4, set); 4765 computeSuperinterfaceSet2(supertype2, set);
4766 } 4766 }
4767 } 4767 }
4768 return set; 4768 return set;
4769 } 4769 }
4770 /** 4770 /**
4771 * An array containing the actual types of the type arguments. 4771 * An array containing the actual types of the type arguments.
4772 */ 4772 */
4773 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; 4773 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY;
4774 /** 4774 /**
4775 * Initialize a newly created type to be declared by the given element. 4775 * Initialize a newly created type to be declared by the given element.
(...skipping 18 matching lines...) Expand all
4794 if (object is! InterfaceTypeImpl) { 4794 if (object is! InterfaceTypeImpl) {
4795 return false; 4795 return false;
4796 } 4796 }
4797 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; 4797 InterfaceTypeImpl otherType = object as InterfaceTypeImpl;
4798 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments); 4798 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments);
4799 } 4799 }
4800 ClassElement get element => super.element as ClassElement; 4800 ClassElement get element => super.element as ClassElement;
4801 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this); 4801 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this);
4802 List<InterfaceType> get interfaces { 4802 List<InterfaceType> get interfaces {
4803 ClassElement classElement = element; 4803 ClassElement classElement = element;
4804 List<InterfaceType> interfaces4 = classElement.interfaces; 4804 List<InterfaceType> interfaces2 = classElement.interfaces;
4805 List<TypeVariableElement> typeVariables7 = classElement.typeVariables; 4805 List<TypeVariableElement> typeVariables2 = classElement.typeVariables;
4806 if (typeVariables7.length == 0) { 4806 if (typeVariables2.length == 0) {
4807 return interfaces4; 4807 return interfaces2;
4808 } 4808 }
4809 int count = interfaces4.length; 4809 int count = interfaces2.length;
4810 List<InterfaceType> typedInterfaces = new List<InterfaceType>(count); 4810 List<InterfaceType> typedInterfaces = new List<InterfaceType>(count);
4811 for (int i = 0; i < count; i++) { 4811 for (int i = 0; i < count; i++) {
4812 typedInterfaces[i] = interfaces4[i].substitute2(_typeArguments, TypeVariab leTypeImpl.getTypes(typeVariables7)); 4812 typedInterfaces[i] = interfaces2[i].substitute2(_typeArguments, TypeVariab leTypeImpl.getTypes(typeVariables2));
4813 } 4813 }
4814 return typedInterfaces; 4814 return typedInterfaces;
4815 } 4815 }
4816 Type2 getLeastUpperBound(Type2 type39) { 4816 Type2 getLeastUpperBound(Type2 type2) {
4817 Type2 dynamicType = DynamicTypeImpl.instance; 4817 Type2 dynamicType = DynamicTypeImpl.instance;
4818 if (identical(this, dynamicType) || identical(type39, dynamicType)) { 4818 if (identical(this, dynamicType) || identical(type2, dynamicType)) {
4819 return dynamicType; 4819 return dynamicType;
4820 } 4820 }
4821 if (type39 == null || type39 is! InterfaceType) { 4821 if (type2 == null || type2 is! InterfaceType) {
4822 return null; 4822 return null;
4823 } 4823 }
4824 InterfaceType i = this; 4824 InterfaceType i = this;
4825 InterfaceType j = type39 as InterfaceType; 4825 InterfaceType j = type2 as InterfaceType;
4826 Set<InterfaceType> si = computeSuperinterfaceSet(i); 4826 Set<InterfaceType> si = computeSuperinterfaceSet(i);
4827 Set<InterfaceType> sj = computeSuperinterfaceSet(j); 4827 Set<InterfaceType> sj = computeSuperinterfaceSet(j);
4828 javaSetAdd(si, i.element.type); 4828 javaSetAdd(si, i.element.type);
4829 javaSetAdd(sj, j.element.type); 4829 javaSetAdd(sj, j.element.type);
4830 si.retainAll(sj); 4830 si.retainAll(sj);
4831 Set<InterfaceType> s = si; 4831 Set<InterfaceType> s = si;
4832 List<InterfaceType> sn = new List.from(s); 4832 List<InterfaceType> sn = new List.from(s);
4833 List<int> depths = new List<int>.filled(sn.length, 0); 4833 List<int> depths = new List<int>.filled(sn.length, 0);
4834 int maxDepth = 0; 4834 int maxDepth = 0;
4835 for (int n = 0; n < sn.length; n++) { 4835 for (int n = 0; n < sn.length; n++) {
(...skipping 13 matching lines...) Expand all
4849 } 4849 }
4850 if (numberOfTypesAtMaxDepth == 1) { 4850 if (numberOfTypesAtMaxDepth == 1) {
4851 return sn[indexOfLeastUpperBound]; 4851 return sn[indexOfLeastUpperBound];
4852 } 4852 }
4853 } 4853 }
4854 return null; 4854 return null;
4855 } 4855 }
4856 MethodElement getMethod(String methodName) => MethodMember.from(((element as C lassElementImpl)).getMethod(methodName), this); 4856 MethodElement getMethod(String methodName) => MethodMember.from(((element as C lassElementImpl)).getMethod(methodName), this);
4857 List<InterfaceType> get mixins { 4857 List<InterfaceType> get mixins {
4858 ClassElement classElement = element; 4858 ClassElement classElement = element;
4859 List<InterfaceType> mixins3 = classElement.mixins; 4859 List<InterfaceType> mixins2 = classElement.mixins;
4860 List<TypeVariableElement> typeVariables8 = classElement.typeVariables; 4860 List<TypeVariableElement> typeVariables2 = classElement.typeVariables;
4861 if (typeVariables8.length == 0) { 4861 if (typeVariables2.length == 0) {
4862 return mixins3; 4862 return mixins2;
4863 } 4863 }
4864 int count = mixins3.length; 4864 int count = mixins2.length;
4865 List<InterfaceType> typedMixins = new List<InterfaceType>(count); 4865 List<InterfaceType> typedMixins = new List<InterfaceType>(count);
4866 for (int i = 0; i < count; i++) { 4866 for (int i = 0; i < count; i++) {
4867 typedMixins[i] = mixins3[i].substitute2(_typeArguments, TypeVariableTypeIm pl.getTypes(typeVariables8)); 4867 typedMixins[i] = mixins2[i].substitute2(_typeArguments, TypeVariableTypeIm pl.getTypes(typeVariables2));
4868 } 4868 }
4869 return typedMixins; 4869 return typedMixins;
4870 } 4870 }
4871 PropertyAccessorElement getSetter(String setterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getSetter(setterName), this); 4871 PropertyAccessorElement getSetter(String setterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getSetter(setterName), this);
4872 InterfaceType get superclass { 4872 InterfaceType get superclass {
4873 ClassElement classElement = element; 4873 ClassElement classElement = element;
4874 InterfaceType supertype5 = classElement.supertype; 4874 InterfaceType supertype2 = classElement.supertype;
4875 if (supertype5 == null) { 4875 if (supertype2 == null) {
4876 return null; 4876 return null;
4877 } 4877 }
4878 return supertype5.substitute2(_typeArguments, TypeVariableTypeImpl.getTypes( classElement.typeVariables)); 4878 return supertype2.substitute2(_typeArguments, TypeVariableTypeImpl.getTypes( classElement.typeVariables));
4879 } 4879 }
4880 List<Type2> get typeArguments => _typeArguments; 4880 List<Type2> get typeArguments => _typeArguments;
4881 int get hashCode { 4881 int get hashCode {
4882 ClassElement element56 = element; 4882 ClassElement element2 = element;
4883 if (element56 == null) { 4883 if (element2 == null) {
4884 return 0; 4884 return 0;
4885 } 4885 }
4886 return element56.hashCode; 4886 return element2.hashCode;
4887 } 4887 }
4888 bool isDartCoreFunction() { 4888 bool isDartCoreFunction() {
4889 ClassElement element57 = element; 4889 ClassElement element2 = element;
4890 if (element57 == null) { 4890 if (element2 == null) {
4891 return false; 4891 return false;
4892 } 4892 }
4893 return element57.name == "Function" && element57.library.isDartCore(); 4893 return element2.name == "Function" && element2.library.isDartCore();
4894 } 4894 }
4895 bool isDirectSupertypeOf(InterfaceType type) { 4895 bool isDirectSupertypeOf(InterfaceType type) {
4896 ClassElement i = element; 4896 ClassElement i = element;
4897 ClassElement j = type.element; 4897 ClassElement j = type.element;
4898 InterfaceType supertype6 = j.supertype; 4898 InterfaceType supertype2 = j.supertype;
4899 if (supertype6 == null) { 4899 if (supertype2 == null) {
4900 return false; 4900 return false;
4901 } 4901 }
4902 ClassElement supertypeElement = supertype6.element; 4902 ClassElement supertypeElement = supertype2.element;
4903 if (supertypeElement == i) { 4903 if (supertypeElement == i) {
4904 return true; 4904 return true;
4905 } 4905 }
4906 for (InterfaceType interfaceType in j.interfaces) { 4906 for (InterfaceType interfaceType in j.interfaces) {
4907 if (interfaceType.element == i) { 4907 if (interfaceType.element == i) {
4908 return true; 4908 return true;
4909 } 4909 }
4910 } 4910 }
4911 for (InterfaceType mixinType in j.mixins) { 4911 for (InterfaceType mixinType in j.mixins) {
4912 if (mixinType.element == i) { 4912 if (mixinType.element == i) {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
4973 if (typeTArgs.length != typeSArgs.length) { 4973 if (typeTArgs.length != typeSArgs.length) {
4974 return false; 4974 return false;
4975 } 4975 }
4976 for (int i = 0; i < typeTArgs.length; i++) { 4976 for (int i = 0; i < typeTArgs.length; i++) {
4977 if (!typeTArgs[i].isSubtypeOf(typeSArgs[i])) { 4977 if (!typeTArgs[i].isSubtypeOf(typeSArgs[i])) {
4978 return false; 4978 return false;
4979 } 4979 }
4980 } 4980 }
4981 return true; 4981 return true;
4982 } 4982 }
4983 Type2 supertype7 = elementT.supertype; 4983 Type2 supertype2 = elementT.supertype;
4984 if (supertype7 == null) { 4984 if (supertype2 == null) {
4985 return false; 4985 return false;
4986 } 4986 }
4987 List<Type2> interfaceTypes = elementT.interfaces; 4987 List<Type2> interfaceTypes = elementT.interfaces;
4988 for (Type2 interfaceType in interfaceTypes) { 4988 for (Type2 interfaceType in interfaceTypes) {
4989 if (interfaceType.isSubtypeOf(typeS)) { 4989 if (interfaceType.isSubtypeOf(typeS)) {
4990 return true; 4990 return true;
4991 } 4991 }
4992 } 4992 }
4993 List<Type2> mixinTypes = elementT.mixins; 4993 List<Type2> mixinTypes = elementT.mixins;
4994 for (Type2 mixinType in mixinTypes) { 4994 for (Type2 mixinType in mixinTypes) {
4995 if (mixinType == typeS) { 4995 if (mixinType == typeS) {
4996 return true; 4996 return true;
4997 } 4997 }
4998 } 4998 }
4999 return supertype7.isSubtypeOf(typeS); 4999 return supertype2.isSubtypeOf(typeS);
5000 } 5000 }
5001 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) { 5001 PropertyAccessorElement lookUpGetter(String getterName, LibraryElement library ) {
5002 PropertyAccessorElement element = getGetter(getterName); 5002 PropertyAccessorElement element = getGetter(getterName);
5003 if (element != null && element.isAccessibleIn(library)) { 5003 if (element != null && element.isAccessibleIn(library)) {
5004 return element; 5004 return element;
5005 } 5005 }
5006 for (InterfaceType mixin in mixins) { 5006 for (InterfaceType mixin in mixins) {
5007 element = mixin.getGetter(getterName); 5007 element = mixin.getGetter(getterName);
5008 if (element != null && element.isAccessibleIn(library)) { 5008 if (element != null && element.isAccessibleIn(library)) {
5009 return element; 5009 return element;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
5058 return element; 5058 return element;
5059 } 5059 }
5060 supertype = supertype.superclass; 5060 supertype = supertype.superclass;
5061 } 5061 }
5062 return null; 5062 return null;
5063 } 5063 }
5064 /** 5064 /**
5065 * Set the actual types of the type arguments to those in the given array. 5065 * Set the actual types of the type arguments to those in the given array.
5066 * @param typeArguments the actual types of the type arguments 5066 * @param typeArguments the actual types of the type arguments
5067 */ 5067 */
5068 void set typeArguments(List<Type2> typeArguments5) { 5068 void set typeArguments(List<Type2> typeArguments2) {
5069 this._typeArguments = typeArguments5; 5069 this._typeArguments = typeArguments2;
5070 } 5070 }
5071 InterfaceTypeImpl substitute5(List<Type2> argumentTypes) => substitute2(argume ntTypes, typeArguments); 5071 InterfaceTypeImpl substitute5(List<Type2> argumentTypes) => substitute2(argume ntTypes, typeArguments);
5072 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter Types) { 5072 InterfaceTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameter Types) {
5073 if (argumentTypes.length != parameterTypes.length) { 5073 if (argumentTypes.length != parameterTypes.length) {
5074 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes. length}) != parameterTypes.length (${parameterTypes.length})"); 5074 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes. length}) != parameterTypes.length (${parameterTypes.length})");
5075 } 5075 }
5076 if (argumentTypes.length == 0) { 5076 if (argumentTypes.length == 0) {
5077 return this; 5077 return this;
5078 } 5078 }
5079 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element); 5079 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element);
(...skipping 23 matching lines...) Expand all
5103 abstract class TypeImpl implements Type2 { 5103 abstract class TypeImpl implements Type2 {
5104 /** 5104 /**
5105 * Return an array containing the results of using the given argument types an d parameter types to 5105 * Return an array containing the results of using the given argument types an d parameter types to
5106 * perform a substitution on all of the given types. 5106 * perform a substitution on all of the given types.
5107 * @param types the types on which a substitution is to be performed 5107 * @param types the types on which a substitution is to be performed
5108 * @param argumentTypes the argument types for the substitution 5108 * @param argumentTypes the argument types for the substitution
5109 * @param parameterTypes the parameter types for the substitution 5109 * @param parameterTypes the parameter types for the substitution
5110 * @return the result of performing the substitution on each of the types 5110 * @return the result of performing the substitution on each of the types
5111 */ 5111 */
5112 static List<Type2> substitute(List<Type2> types, List<Type2> argumentTypes, Li st<Type2> parameterTypes) { 5112 static List<Type2> substitute(List<Type2> types, List<Type2> argumentTypes, Li st<Type2> parameterTypes) {
5113 int length6 = types.length; 5113 int length2 = types.length;
5114 if (length6 == 0) { 5114 if (length2 == 0) {
5115 return types; 5115 return types;
5116 } 5116 }
5117 List<Type2> newTypes = new List<Type2>(length6); 5117 List<Type2> newTypes = new List<Type2>(length2);
5118 for (int i = 0; i < length6; i++) { 5118 for (int i = 0; i < length2; i++) {
5119 newTypes[i] = types[i].substitute2(argumentTypes, parameterTypes); 5119 newTypes[i] = types[i].substitute2(argumentTypes, parameterTypes);
5120 } 5120 }
5121 return newTypes; 5121 return newTypes;
5122 } 5122 }
5123 /** 5123 /**
5124 * The element representing the declaration of this type, or {@code null} if t he type has not, or 5124 * The element representing the declaration of this type, or {@code null} if t he type has not, or
5125 * cannot, be associated with an element. 5125 * cannot, be associated with an element.
5126 */ 5126 */
5127 Element _element; 5127 Element _element;
5128 /** 5128 /**
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 } 5197 }
5198 bool operator ==(Object object) => object is TypeVariableTypeImpl && element = = ((object as TypeVariableTypeImpl)).element; 5198 bool operator ==(Object object) => object is TypeVariableTypeImpl && element = = ((object as TypeVariableTypeImpl)).element;
5199 TypeVariableElement get element => super.element as TypeVariableElement; 5199 TypeVariableElement get element => super.element as TypeVariableElement;
5200 int get hashCode => element.hashCode; 5200 int get hashCode => element.hashCode;
5201 bool isMoreSpecificThan(Type2 type) { 5201 bool isMoreSpecificThan(Type2 type) {
5202 Type2 upperBound = element.bound; 5202 Type2 upperBound = element.bound;
5203 return type == upperBound; 5203 return type == upperBound;
5204 } 5204 }
5205 bool isSubtypeOf(Type2 type) => true; 5205 bool isSubtypeOf(Type2 type) => true;
5206 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes) { 5206 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes) {
5207 int length7 = parameterTypes.length; 5207 int length2 = parameterTypes.length;
5208 for (int i = 0; i < length7; i++) { 5208 for (int i = 0; i < length2; i++) {
5209 if (parameterTypes[i] == this) { 5209 if (parameterTypes[i] == this) {
5210 return argumentTypes[i]; 5210 return argumentTypes[i];
5211 } 5211 }
5212 } 5212 }
5213 return this; 5213 return this;
5214 } 5214 }
5215 } 5215 }
5216 /** 5216 /**
5217 * The unique instance of the class {@code VoidTypeImpl} implements the type {@c ode void}. 5217 * The unique instance of the class {@code VoidTypeImpl} implements the type {@c ode void}.
5218 * @coverage dart.engine.type 5218 * @coverage dart.engine.type
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
5642 abstract class TypeVariableType implements Type2 { 5642 abstract class TypeVariableType implements Type2 {
5643 TypeVariableElement get element; 5643 TypeVariableElement get element;
5644 } 5644 }
5645 /** 5645 /**
5646 * The interface {@code VoidType} defines the behavior of the unique object repr esenting the type{@code void}. 5646 * The interface {@code VoidType} defines the behavior of the unique object repr esenting the type{@code void}.
5647 * @coverage dart.engine.type 5647 * @coverage dart.engine.type
5648 */ 5648 */
5649 abstract class VoidType implements Type2 { 5649 abstract class VoidType implements Type2 {
5650 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 5650 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
5651 } 5651 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698