OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
7 | 7 |
8 library engine.element; | 8 library engine.element; |
9 | 9 |
10 import 'dart:collection'; | 10 import 'dart:collection'; |
11 import 'java_core.dart'; | 11 import 'java_core.dart'; |
12 import 'java_engine.dart'; | 12 import 'java_engine.dart'; |
13 import 'utilities_collection.dart'; | 13 import 'utilities_collection.dart'; |
14 import 'source.dart'; | 14 import 'source.dart'; |
15 import 'scanner.dart' show Keyword; | 15 import 'scanner.dart' show Keyword; |
16 import 'ast.dart'; | 16 import 'ast.dart'; |
17 import 'sdk.dart' show DartSdk; | 17 import 'sdk.dart' show DartSdk; |
18 import 'html.dart' show XmlTagNode; | 18 import 'html.dart' show XmlAttributeNode, XmlTagNode; |
19 import 'engine.dart' show AnalysisContext; | 19 import 'engine.dart' show AnalysisContext; |
20 import 'constant.dart' show EvaluationResultImpl; | 20 import 'constant.dart' show EvaluationResultImpl; |
21 import 'utilities_dart.dart'; | 21 import 'utilities_dart.dart'; |
22 | 22 |
23 /** | 23 /** |
24 * The interface `ClassElement` defines the behavior of elements that represent
a class. | 24 * The interface `ClassElement` defines the behavior of elements that represent
a class. |
25 * | 25 * |
26 * @coverage dart.engine.element | 26 * @coverage dart.engine.element |
27 */ | 27 */ |
28 abstract class ClassElement implements Element { | 28 abstract class ClassElement implements Element { |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 * <b>Note:</b> Because the element model represents the state of the code, it
is possible for it | 150 * <b>Note:</b> Because the element model represents the state of the code, it
is possible for it |
151 * to be semantically invalid. In particular, it is not safe to assume that th
e inheritance | 151 * to be semantically invalid. In particular, it is not safe to assume that th
e inheritance |
152 * structure of a class does not contain a cycle. Clients that traverse the in
heritance structure | 152 * structure of a class does not contain a cycle. Clients that traverse the in
heritance structure |
153 * must explicitly guard against infinite loops. | 153 * must explicitly guard against infinite loops. |
154 * | 154 * |
155 * @return the superclass of this class | 155 * @return the superclass of this class |
156 */ | 156 */ |
157 InterfaceType get supertype; | 157 InterfaceType get supertype; |
158 | 158 |
159 /** | 159 /** |
160 * Return an array containing all of the toolkit specific objects attached to
this class. | 160 * Return an array containing all of the toolkit specific objects associated w
ith this class. The |
| 161 * array will be empty if the class does not have any toolkit specific objects
or if the |
| 162 * compilation unit containing the class has not yet had toolkit references re
solved. |
161 * | 163 * |
162 * @return the toolkit objects attached to this class | 164 * @return the toolkit objects associated with this class |
163 */ | 165 */ |
164 List<ToolkitObjectElement> get toolkitObjects; | 166 List<ToolkitObjectElement> get toolkitObjects; |
165 | 167 |
166 /** | 168 /** |
167 * Return the type defined by the class. | 169 * Return the type defined by the class. |
168 * | 170 * |
169 * @return the type defined by the class | 171 * @return the type defined by the class |
170 */ | 172 */ |
171 InterfaceType get type; | 173 InterfaceType get type; |
172 | 174 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 /** | 207 /** |
206 * Return `true` if this class is abstract. A class is abstract if it has an e
xplicit | 208 * Return `true` if this class is abstract. A class is abstract if it has an e
xplicit |
207 * `abstract` modifier. Note, that this definition of <i>abstract</i> is diffe
rent from | 209 * `abstract` modifier. Note, that this definition of <i>abstract</i> is diffe
rent from |
208 * <i>has unimplemented members</i>. | 210 * <i>has unimplemented members</i>. |
209 * | 211 * |
210 * @return `true` if this class is abstract | 212 * @return `true` if this class is abstract |
211 */ | 213 */ |
212 bool get isAbstract; | 214 bool get isAbstract; |
213 | 215 |
214 /** | 216 /** |
| 217 * Return `true` if this class [isProxy], or if it inherits the proxy annotati
on |
| 218 * from a supertype. |
| 219 * |
| 220 * @return `true` if this class defines or inherits a proxy |
| 221 */ |
| 222 bool get isOrInheritsProxy; |
| 223 |
| 224 /** |
215 * Return `true` if this element has an annotation of the form '@proxy'. | 225 * Return `true` if this element has an annotation of the form '@proxy'. |
216 * | 226 * |
217 * @return `true` if this element defines a proxy | 227 * @return `true` if this element defines a proxy |
218 */ | 228 */ |
219 bool get isProxy; | 229 bool get isProxy; |
220 | 230 |
221 /** | 231 /** |
222 * Return `true` if this class is defined by a typedef construct. | 232 * Return `true` if this class is defined by a typedef construct. |
223 * | 233 * |
224 * @return `true` if this class is defined by a typedef construct | 234 * @return `true` if this class is defined by a typedef construct |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 abstract class CompilationUnitElement implements Element, UriReferencedElement { | 343 abstract class CompilationUnitElement implements Element, UriReferencedElement { |
334 /** | 344 /** |
335 * Return an array containing all of the top-level accessors (getters and sett
ers) contained in | 345 * Return an array containing all of the top-level accessors (getters and sett
ers) contained in |
336 * this compilation unit. | 346 * this compilation unit. |
337 * | 347 * |
338 * @return the top-level accessors contained in this compilation unit | 348 * @return the top-level accessors contained in this compilation unit |
339 */ | 349 */ |
340 List<PropertyAccessorElement> get accessors; | 350 List<PropertyAccessorElement> get accessors; |
341 | 351 |
342 /** | 352 /** |
| 353 * Return an array containing all of the Angular views defined in this compila
tion unit. The array |
| 354 * will be empty if the element does not have any Angular views or if the comp
ilation unit has not |
| 355 * yet had toolkit references resolved. |
| 356 * |
| 357 * @return the Angular views defined in this compilation unit. |
| 358 */ |
| 359 List<AngularViewElement> get angularViews; |
| 360 |
| 361 /** |
343 * Return the library in which this compilation unit is defined. | 362 * Return the library in which this compilation unit is defined. |
344 * | 363 * |
345 * @return the library in which this compilation unit is defined | 364 * @return the library in which this compilation unit is defined |
346 */ | 365 */ |
347 LibraryElement get enclosingElement; | 366 LibraryElement get enclosingElement; |
348 | 367 |
349 /** | 368 /** |
350 * Return an array containing all of the top-level functions contained in this
compilation unit. | 369 * Return an array containing all of the top-level functions contained in this
compilation unit. |
351 * | 370 * |
352 * @return the top-level functions contained in this compilation unit | 371 * @return the top-level functions contained in this compilation unit |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 * [ConstructorElement] . | 425 * [ConstructorElement] . |
407 * | 426 * |
408 * This method is expensive, because resolved AST might be evicted from cache,
so parsing and | 427 * This method is expensive, because resolved AST might be evicted from cache,
so parsing and |
409 * resolving will be performed. | 428 * resolving will be performed. |
410 * | 429 * |
411 * @return the resolved [ConstructorDeclaration], not `null`. | 430 * @return the resolved [ConstructorDeclaration], not `null`. |
412 */ | 431 */ |
413 ConstructorDeclaration get node; | 432 ConstructorDeclaration get node; |
414 | 433 |
415 /** | 434 /** |
416 * Return the constructor to which this constructor is redirecting. | 435 * Return the constructor to which this constructor is redirecting, or `null`
if this constructor |
| 436 * does not redirect to another constructor or if the library containing this
constructor has |
| 437 * not yet been resolved. |
417 * | 438 * |
418 * @return the constructor to which this constructor is redirecting | 439 * @return the constructor to which this constructor is redirecting |
419 */ | 440 */ |
420 ConstructorElement get redirectedConstructor; | 441 ConstructorElement get redirectedConstructor; |
421 | 442 |
422 /** | 443 /** |
423 * Return `true` if this constructor is a const constructor. | 444 * Return `true` if this constructor is a const constructor. |
424 * | 445 * |
425 * @return `true` if this constructor is a const constructor | 446 * @return `true` if this constructor is a const constructor |
426 */ | 447 */ |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 | 570 |
550 /** | 571 /** |
551 * Return an object representing the location of this element in the element m
odel. The object can | 572 * Return an object representing the location of this element in the element m
odel. The object can |
552 * be used to locate this element at a later time. | 573 * be used to locate this element at a later time. |
553 * | 574 * |
554 * @return the location of this element in the element model | 575 * @return the location of this element in the element model |
555 */ | 576 */ |
556 ElementLocation get location; | 577 ElementLocation get location; |
557 | 578 |
558 /** | 579 /** |
559 * Return an array containing all of the metadata associated with this element
. | 580 * Return an array containing all of the metadata associated with this element
. The array will be |
| 581 * empty if the element does not have any metadata or if the library containin
g this element has |
| 582 * not yet been resolved. |
560 * | 583 * |
561 * @return the metadata associated with this element | 584 * @return the metadata associated with this element |
562 */ | 585 */ |
563 List<ElementAnnotation> get metadata; | 586 List<ElementAnnotation> get metadata; |
564 | 587 |
565 /** | 588 /** |
566 * Return the name of this element, or `null` if this element does not have a
name. | 589 * Return the name of this element, or `null` if this element does not have a
name. |
567 * | 590 * |
568 * @return the name of this element | 591 * @return the name of this element |
569 */ | 592 */ |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 | 643 |
621 /** | 644 /** |
622 * Return `true` if this element has an annotation of the form '@deprecated' o
r | 645 * Return `true` if this element has an annotation of the form '@deprecated' o
r |
623 * '@Deprecated('..')'. | 646 * '@Deprecated('..')'. |
624 * | 647 * |
625 * @return `true` if this element is deprecated | 648 * @return `true` if this element is deprecated |
626 */ | 649 */ |
627 bool get isDeprecated; | 650 bool get isDeprecated; |
628 | 651 |
629 /** | 652 /** |
| 653 * Return `true` if this element has an annotation of the form '@override'. |
| 654 * |
| 655 * @return `true` if this element is overridden |
| 656 */ |
| 657 bool get isOverride; |
| 658 |
| 659 /** |
630 * Return `true` if this element is private. Private elements are visible only
within the | 660 * Return `true` if this element is private. Private elements are visible only
within the |
631 * library in which they are declared. | 661 * library in which they are declared. |
632 * | 662 * |
633 * @return `true` if this element is private | 663 * @return `true` if this element is private |
634 */ | 664 */ |
635 bool get isPrivate; | 665 bool get isPrivate; |
636 | 666 |
637 /** | 667 /** |
638 * Return `true` if this element is public. Public elements are visible within
any library | 668 * Return `true` if this element is public. Public elements are visible within
any library |
639 * that imports the library in which they are declared. | 669 * that imports the library in which they are declared. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0,
"Angular filter"); | 740 static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0,
"Angular filter"); |
711 | 741 |
712 static final ElementKind ANGULAR_COMPONENT = new ElementKind('ANGULAR_COMPONEN
T', 1, "Angular component"); | 742 static final ElementKind ANGULAR_COMPONENT = new ElementKind('ANGULAR_COMPONEN
T', 1, "Angular component"); |
713 | 743 |
714 static final ElementKind ANGULAR_CONTROLLER = new ElementKind('ANGULAR_CONTROL
LER', 2, "Angular controller"); | 744 static final ElementKind ANGULAR_CONTROLLER = new ElementKind('ANGULAR_CONTROL
LER', 2, "Angular controller"); |
715 | 745 |
716 static final ElementKind ANGULAR_DIRECTIVE = new ElementKind('ANGULAR_DIRECTIV
E', 3, "Angular directive"); | 746 static final ElementKind ANGULAR_DIRECTIVE = new ElementKind('ANGULAR_DIRECTIV
E', 3, "Angular directive"); |
717 | 747 |
718 static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY'
, 4, "Angular property"); | 748 static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY'
, 4, "Angular property"); |
719 | 749 |
720 static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR'
, 5, "Angular selector"); | 750 static final ElementKind ANGULAR_SCOPE_PROPERTY = new ElementKind('ANGULAR_SCO
PE_PROPERTY', 5, "Angular scope property"); |
721 | 751 |
722 static final ElementKind CLASS = new ElementKind('CLASS', 6, "class"); | 752 static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR'
, 6, "Angular selector"); |
723 | 753 |
724 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 7, "compilation unit"); | 754 static final ElementKind ANGULAR_VIEW = new ElementKind('ANGULAR_VIEW', 7, "An
gular view"); |
725 | 755 |
726 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 8, "cons
tructor"); | 756 static final ElementKind CLASS = new ElementKind('CLASS', 8, "class"); |
727 | 757 |
728 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 9, "<dynamic>"); | 758 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 9, "compilation unit"); |
729 | 759 |
730 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML
_SCRIPT', 10, "embedded html script"); | 760 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 10, "con
structor"); |
731 | 761 |
732 static final ElementKind ERROR = new ElementKind('ERROR', 11, "<error>"); | 762 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 11, "<dynamic>")
; |
733 | 763 |
734 static final ElementKind EXPORT = new ElementKind('EXPORT', 12, "export direct
ive"); | 764 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML
_SCRIPT', 12, "embedded html script"); |
735 | 765 |
736 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML
_SCRIPT', 13, "external html script"); | 766 static final ElementKind ERROR = new ElementKind('ERROR', 13, "<error>"); |
737 | 767 |
738 static final ElementKind FIELD = new ElementKind('FIELD', 14, "field"); | 768 static final ElementKind EXPORT = new ElementKind('EXPORT', 14, "export direct
ive"); |
739 | 769 |
740 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 15, "function"
); | 770 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML
_SCRIPT', 15, "external html script"); |
741 | 771 |
742 static final ElementKind GETTER = new ElementKind('GETTER', 16, "getter"); | 772 static final ElementKind FIELD = new ElementKind('FIELD', 16, "field"); |
743 | 773 |
744 static final ElementKind HTML = new ElementKind('HTML', 17, "html"); | 774 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 17, "function"
); |
745 | 775 |
746 static final ElementKind IMPORT = new ElementKind('IMPORT', 18, "import direct
ive"); | 776 static final ElementKind GETTER = new ElementKind('GETTER', 18, "getter"); |
747 | 777 |
748 static final ElementKind LABEL = new ElementKind('LABEL', 19, "label"); | 778 static final ElementKind HTML = new ElementKind('HTML', 19, "html"); |
749 | 779 |
750 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 20, "library"); | 780 static final ElementKind IMPORT = new ElementKind('IMPORT', 20, "import direct
ive"); |
751 | 781 |
752 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 21
, "local variable"); | 782 static final ElementKind LABEL = new ElementKind('LABEL', 21, "label"); |
753 | 783 |
754 static final ElementKind METHOD = new ElementKind('METHOD', 22, "method"); | 784 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 22, "library"); |
755 | 785 |
756 static final ElementKind NAME = new ElementKind('NAME', 23, "<name>"); | 786 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 23
, "local variable"); |
757 | 787 |
758 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 24, "paramet
er"); | 788 static final ElementKind METHOD = new ElementKind('METHOD', 24, "method"); |
759 | 789 |
760 static final ElementKind PREFIX = new ElementKind('PREFIX', 25, "import prefix
"); | 790 static final ElementKind NAME = new ElementKind('NAME', 25, "<name>"); |
761 | 791 |
762 static final ElementKind SETTER = new ElementKind('SETTER', 26, "setter"); | 792 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 26, "paramet
er"); |
763 | 793 |
764 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 27, "top level variable"); | 794 static final ElementKind PREFIX = new ElementKind('PREFIX', 27, "import prefix
"); |
765 | 795 |
766 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_
ALIAS', 28, "function type alias"); | 796 static final ElementKind SETTER = new ElementKind('SETTER', 28, "setter"); |
767 | 797 |
768 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 29
, "type parameter"); | 798 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 29, "top level variable"); |
769 | 799 |
770 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 30, "<universe
>"); | 800 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_
ALIAS', 30, "function type alias"); |
| 801 |
| 802 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 31
, "type parameter"); |
| 803 |
| 804 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 32, "<universe
>"); |
771 | 805 |
772 static final List<ElementKind> values = [ | 806 static final List<ElementKind> values = [ |
773 ANGULAR_FILTER, | 807 ANGULAR_FILTER, |
774 ANGULAR_COMPONENT, | 808 ANGULAR_COMPONENT, |
775 ANGULAR_CONTROLLER, | 809 ANGULAR_CONTROLLER, |
776 ANGULAR_DIRECTIVE, | 810 ANGULAR_DIRECTIVE, |
777 ANGULAR_PROPERTY, | 811 ANGULAR_PROPERTY, |
| 812 ANGULAR_SCOPE_PROPERTY, |
778 ANGULAR_SELECTOR, | 813 ANGULAR_SELECTOR, |
| 814 ANGULAR_VIEW, |
779 CLASS, | 815 CLASS, |
780 COMPILATION_UNIT, | 816 COMPILATION_UNIT, |
781 CONSTRUCTOR, | 817 CONSTRUCTOR, |
782 DYNAMIC, | 818 DYNAMIC, |
783 EMBEDDED_HTML_SCRIPT, | 819 EMBEDDED_HTML_SCRIPT, |
784 ERROR, | 820 ERROR, |
785 EXPORT, | 821 EXPORT, |
786 EXTERNAL_HTML_SCRIPT, | 822 EXTERNAL_HTML_SCRIPT, |
787 FIELD, | 823 FIELD, |
788 FUNCTION, | 824 FUNCTION, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 R visitAngularComponentElement(AngularComponentElement element); | 891 R visitAngularComponentElement(AngularComponentElement element); |
856 | 892 |
857 R visitAngularControllerElement(AngularControllerElement element); | 893 R visitAngularControllerElement(AngularControllerElement element); |
858 | 894 |
859 R visitAngularDirectiveElement(AngularDirectiveElement element); | 895 R visitAngularDirectiveElement(AngularDirectiveElement element); |
860 | 896 |
861 R visitAngularFilterElement(AngularFilterElement element); | 897 R visitAngularFilterElement(AngularFilterElement element); |
862 | 898 |
863 R visitAngularPropertyElement(AngularPropertyElement element); | 899 R visitAngularPropertyElement(AngularPropertyElement element); |
864 | 900 |
| 901 R visitAngularScopePropertyElement(AngularScopePropertyElement element); |
| 902 |
865 R visitAngularSelectorElement(AngularSelectorElement element); | 903 R visitAngularSelectorElement(AngularSelectorElement element); |
866 | 904 |
| 905 R visitAngularViewElement(AngularViewElement element); |
| 906 |
867 R visitClassElement(ClassElement element); | 907 R visitClassElement(ClassElement element); |
868 | 908 |
869 R visitCompilationUnitElement(CompilationUnitElement element); | 909 R visitCompilationUnitElement(CompilationUnitElement element); |
870 | 910 |
871 R visitConstructorElement(ConstructorElement element); | 911 R visitConstructorElement(ConstructorElement element); |
872 | 912 |
873 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element); | 913 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element); |
874 | 914 |
875 R visitExportElement(ExportElement element); | 915 R visitExportElement(ExportElement element); |
876 | 916 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1341 */ | 1381 */ |
1342 List<LibraryElement> get visibleLibraries; | 1382 List<LibraryElement> get visibleLibraries; |
1343 | 1383 |
1344 /** | 1384 /** |
1345 * Return `true` if the defining compilation unit of this library contains at
least one | 1385 * Return `true` if the defining compilation unit of this library contains at
least one |
1346 * import directive whose URI uses the "dart-ext" scheme. | 1386 * import directive whose URI uses the "dart-ext" scheme. |
1347 */ | 1387 */ |
1348 bool hasExtUri(); | 1388 bool hasExtUri(); |
1349 | 1389 |
1350 /** | 1390 /** |
1351 * Return `true` if this library is created for Angular analysis. | 1391 * Return `true` if this library is created for Angular analysis. If this libr
ary has not |
| 1392 * yet had toolkit references resolved, then `false` will be returned. |
1352 * | 1393 * |
1353 * @return `true` if this library is created for Angular analysis | 1394 * @return `true` if this library is created for Angular analysis |
1354 */ | 1395 */ |
1355 bool get isAngularHtml; | 1396 bool get isAngularHtml; |
1356 | 1397 |
1357 /** | 1398 /** |
1358 * Answer `true` if this library is an application that can be run in the brow
ser. | 1399 * Answer `true` if this library is an application that can be run in the brow
ser. |
1359 * | 1400 * |
1360 * @return `true` if this library is an application that can be run in the bro
wser | 1401 * @return `true` if this library is an application that can be run in the bro
wser |
1361 */ | 1402 */ |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 | 1514 |
1474 /** | 1515 /** |
1475 * Return the type of this element as the dynamic type. | 1516 * Return the type of this element as the dynamic type. |
1476 * | 1517 * |
1477 * @return the type of this element as the dynamic type | 1518 * @return the type of this element as the dynamic type |
1478 */ | 1519 */ |
1479 Type2 get type; | 1520 Type2 get type; |
1480 } | 1521 } |
1481 | 1522 |
1482 /** | 1523 /** |
| 1524 * The interface [MultiplyInheritedExecutableElement] defines all of the behavio
r of an |
| 1525 * [ExecutableElement], with the additional information of an array of |
| 1526 * [ExecutableElement]s from which this element was composed. |
| 1527 * |
| 1528 * @coverage dart.engine.element |
| 1529 */ |
| 1530 abstract class MultiplyInheritedExecutableElement implements ExecutableElement { |
| 1531 /** |
| 1532 * Return an array containing all of the executable elements defined within th
is executable |
| 1533 * element. |
| 1534 * |
| 1535 * @return the elements defined within this executable element |
| 1536 */ |
| 1537 List<ExecutableElement> get inheritedElements; |
| 1538 } |
| 1539 |
| 1540 /** |
1483 * The interface `NamespaceCombinator` defines the behavior common to objects th
at control how | 1541 * The interface `NamespaceCombinator` defines the behavior common to objects th
at control how |
1484 * namespaces are combined. | 1542 * namespaces are combined. |
1485 * | 1543 * |
1486 * @coverage dart.engine.element | 1544 * @coverage dart.engine.element |
1487 */ | 1545 */ |
1488 abstract class NamespaceCombinator { | 1546 abstract class NamespaceCombinator { |
1489 /** | 1547 /** |
1490 * An empty array of namespace combinators. | 1548 * An empty array of namespace combinators. |
1491 */ | 1549 */ |
1492 static final List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombina
tor>(0); | 1550 static final List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombina
tor>(0); |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 */ | 1878 */ |
1821 bool get isFinal; | 1879 bool get isFinal; |
1822 } | 1880 } |
1823 | 1881 |
1824 /** | 1882 /** |
1825 * The interface `AngularControllerElement` defines the Angular component descri
bed by | 1883 * The interface `AngularControllerElement` defines the Angular component descri
bed by |
1826 * <code>NgComponent</code> annotation. | 1884 * <code>NgComponent</code> annotation. |
1827 * | 1885 * |
1828 * @coverage dart.engine.element | 1886 * @coverage dart.engine.element |
1829 */ | 1887 */ |
1830 abstract class AngularComponentElement implements AngularHasSelectorElement { | 1888 abstract class AngularComponentElement implements AngularHasSelectorElement, Ang
ularHasTemplateElement { |
1831 /** | 1889 /** |
1832 * Return an array containing all of the properties declared by this component
. | 1890 * Return an array containing all of the properties declared by this component
. |
1833 */ | 1891 */ |
1834 List<AngularPropertyElement> get properties; | 1892 List<AngularPropertyElement> get properties; |
1835 | 1893 |
1836 /** | 1894 /** |
| 1895 * Return an array containing all of the scope properties set in the implement
ation of this |
| 1896 * component. |
| 1897 */ |
| 1898 List<AngularScopePropertyElement> get scopeProperties; |
| 1899 |
| 1900 /** |
1837 * Returns the CSS file URI. | 1901 * Returns the CSS file URI. |
1838 */ | 1902 */ |
1839 String get styleUri; | 1903 String get styleUri; |
1840 | 1904 |
1841 /** | 1905 /** |
1842 * Return the offset of the [getStyleUri] in the [getSource]. | 1906 * Return the offset of the [getStyleUri] in the [getSource]. |
1843 * | 1907 * |
1844 * @return the offset of the style URI | 1908 * @return the offset of the style URI |
1845 */ | 1909 */ |
1846 int get styleUriOffset; | 1910 int get styleUriOffset; |
1847 | |
1848 /** | |
1849 * Returns the HTML template [Source], `null` if not resolved. | |
1850 */ | |
1851 Source get templateSource; | |
1852 | |
1853 /** | |
1854 * Returns the HTML template URI. | |
1855 */ | |
1856 String get templateUri; | |
1857 | |
1858 /** | |
1859 * Return the offset of the [getTemplateUri] in the [getSource]. | |
1860 * | |
1861 * @return the offset of the template URI | |
1862 */ | |
1863 int get templateUriOffset; | |
1864 } | 1911 } |
1865 | 1912 |
1866 /** | 1913 /** |
1867 * The interface `AngularControllerElement` defines the Angular controller descr
ibed by | 1914 * The interface `AngularControllerElement` defines the Angular controller descr
ibed by |
1868 * <code>NgController</code> annotation. | 1915 * <code>NgController</code> annotation. |
1869 * | 1916 * |
1870 * @coverage dart.engine.element | 1917 * @coverage dart.engine.element |
1871 */ | 1918 */ |
1872 abstract class AngularControllerElement implements AngularHasSelectorElement { | 1919 abstract class AngularControllerElement implements AngularHasSelectorElement { |
1873 } | 1920 } |
(...skipping 20 matching lines...) Expand all Loading... |
1894 * The interface `AngularElement` defines the behavior of objects representing i
nformation | 1941 * The interface `AngularElement` defines the behavior of objects representing i
nformation |
1895 * about an Angular specific element. | 1942 * about an Angular specific element. |
1896 * | 1943 * |
1897 * @coverage dart.engine.element | 1944 * @coverage dart.engine.element |
1898 */ | 1945 */ |
1899 abstract class AngularElement implements ToolkitObjectElement { | 1946 abstract class AngularElement implements ToolkitObjectElement { |
1900 /** | 1947 /** |
1901 * An empty array of angular elements. | 1948 * An empty array of angular elements. |
1902 */ | 1949 */ |
1903 static final List<AngularElement> EMPTY_ARRAY = new List<AngularElement>(0); | 1950 static final List<AngularElement> EMPTY_ARRAY = new List<AngularElement>(0); |
| 1951 |
| 1952 /** |
| 1953 * Returns the [AngularApplication] this element is used in. |
| 1954 * |
| 1955 * @return the [AngularApplication] this element is used in |
| 1956 */ |
| 1957 AngularApplication get application; |
1904 } | 1958 } |
1905 | 1959 |
1906 /** | 1960 /** |
1907 * The interface `AngularFilterElement` defines the Angular filter described by | 1961 * The interface `AngularFilterElement` defines the Angular filter described by |
1908 * <code>NgFilter</code> annotation. | 1962 * <code>NgFilter</code> annotation. |
1909 * | 1963 * |
1910 * @coverage dart.engine.element | 1964 * @coverage dart.engine.element |
1911 */ | 1965 */ |
1912 abstract class AngularFilterElement implements AngularElement { | 1966 abstract class AngularFilterElement implements AngularElement { |
1913 } | 1967 } |
1914 | 1968 |
1915 /** | 1969 /** |
| 1970 * [AngularSelectorElement] based on presence of attribute. |
| 1971 */ |
| 1972 abstract class AngularHasAttributeSelectorElement implements AngularSelectorElem
ent { |
| 1973 } |
| 1974 |
| 1975 /** |
| 1976 * [AngularSelectorElement] based on presence of a class. |
| 1977 */ |
| 1978 abstract class AngularHasClassSelectorElement implements AngularSelectorElement
{ |
| 1979 } |
| 1980 |
| 1981 /** |
1916 * The interface `AngularElement` defines the behavior of objects representing i
nformation | 1982 * The interface `AngularElement` defines the behavior of objects representing i
nformation |
1917 * about an Angular element which is applied conditionally using some [AngularSe
lectorElement]. | 1983 * about an Angular element which is applied conditionally using some [AngularSe
lectorElement]. |
1918 * | 1984 * |
1919 * @coverage dart.engine.element | 1985 * @coverage dart.engine.element |
1920 */ | 1986 */ |
1921 abstract class AngularHasSelectorElement implements AngularElement { | 1987 abstract class AngularHasSelectorElement implements AngularElement { |
1922 /** | 1988 /** |
1923 * Returns the selector specified for this element. | 1989 * Returns the selector specified for this element. |
1924 * | 1990 * |
1925 * @return the [AngularSelectorElement] specified for this element | 1991 * @return the [AngularSelectorElement] specified for this element |
1926 */ | 1992 */ |
1927 AngularSelectorElement get selector; | 1993 AngularSelectorElement get selector; |
1928 } | 1994 } |
1929 | 1995 |
1930 /** | 1996 /** |
| 1997 * The interface `AngularHasTemplateElement` defines common behavior for |
| 1998 * [AngularElement] that have template URI / [Source]. |
| 1999 * |
| 2000 * @coverage dart.engine.element |
| 2001 */ |
| 2002 abstract class AngularHasTemplateElement implements AngularElement { |
| 2003 /** |
| 2004 * Returns the HTML template [Source], `null` if not resolved. |
| 2005 */ |
| 2006 Source get templateSource; |
| 2007 |
| 2008 /** |
| 2009 * Returns the HTML template URI. |
| 2010 */ |
| 2011 String get templateUri; |
| 2012 |
| 2013 /** |
| 2014 * Return the offset of the [getTemplateUri] in the [getSource]. |
| 2015 * |
| 2016 * @return the offset of the template URI |
| 2017 */ |
| 2018 int get templateUriOffset; |
| 2019 } |
| 2020 |
| 2021 /** |
1931 * The interface `AngularPropertyElement` defines a single property in | 2022 * The interface `AngularPropertyElement` defines a single property in |
1932 * [AngularComponentElement]. | 2023 * [AngularComponentElement]. |
1933 * | 2024 * |
1934 * @coverage dart.engine.element | 2025 * @coverage dart.engine.element |
1935 */ | 2026 */ |
1936 abstract class AngularPropertyElement implements AngularElement { | 2027 abstract class AngularPropertyElement implements AngularElement { |
1937 /** | 2028 /** |
1938 * An empty array of property elements. | 2029 * An empty array of property elements. |
1939 */ | 2030 */ |
1940 static final List<AngularPropertyElement> EMPTY_ARRAY = []; | 2031 static final List<AngularPropertyElement> EMPTY_ARRAY = []; |
1941 | 2032 |
1942 /** | 2033 /** |
1943 * Returns the field this property is mapped to. | 2034 * Returns the field this property is mapped to. |
1944 * | 2035 * |
1945 * @return the field this property is mapped to. | 2036 * @return the field this property is mapped to. |
1946 */ | 2037 */ |
1947 FieldElement get field; | 2038 FieldElement get field; |
1948 | 2039 |
1949 /** | 2040 /** |
1950 * Return the offset of the field name of this property in the property map. | 2041 * Return the offset of the field name of this property in the property map, o
r `-1` if |
| 2042 * property was created using annotation on [FieldElement]. |
1951 * | 2043 * |
1952 * @return the offset of the field name of this property | 2044 * @return the offset of the field name of this property |
1953 */ | 2045 */ |
1954 int get fieldNameOffset; | 2046 int get fieldNameOffset; |
1955 | 2047 |
1956 /** | 2048 /** |
1957 * Returns the kind of this property. | 2049 * Returns the kind of this property. |
1958 * | 2050 * |
1959 * @return the kind of this property | 2051 * @return the kind of this property |
1960 */ | 2052 */ |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2015 AngularPropertyKind(String name, int ordinal) : super(name, ordinal); | 2107 AngularPropertyKind(String name, int ordinal) : super(name, ordinal); |
2016 } | 2108 } |
2017 | 2109 |
2018 class AngularPropertyKind_TWO_WAY extends AngularPropertyKind { | 2110 class AngularPropertyKind_TWO_WAY extends AngularPropertyKind { |
2019 AngularPropertyKind_TWO_WAY(String name, int ordinal) : super(name, ordinal); | 2111 AngularPropertyKind_TWO_WAY(String name, int ordinal) : super(name, ordinal); |
2020 | 2112 |
2021 bool callsGetter() => true; | 2113 bool callsGetter() => true; |
2022 } | 2114 } |
2023 | 2115 |
2024 /** | 2116 /** |
| 2117 * The interface `AngularScopeVariableElement` defines the Angular <code>Scope</
code> |
| 2118 * property. They are created for every <code>scope['property'] = value;</code>
code snippet. |
| 2119 * |
| 2120 * @coverage dart.engine.element |
| 2121 */ |
| 2122 abstract class AngularScopePropertyElement implements AngularElement { |
| 2123 /** |
| 2124 * An empty array of scope property elements. |
| 2125 */ |
| 2126 static final List<AngularScopePropertyElement> EMPTY_ARRAY = []; |
| 2127 |
| 2128 /** |
| 2129 * Returns the type of this property, not `null`, maybe <code>dynamic</code>. |
| 2130 * |
| 2131 * @return the type of this property. |
| 2132 */ |
| 2133 Type2 get type; |
| 2134 } |
| 2135 |
| 2136 /** |
2025 * [AngularSelectorElement] is used to decide when Angular object should be appl
ied. | 2137 * [AngularSelectorElement] is used to decide when Angular object should be appl
ied. |
2026 * | 2138 * |
2027 * This class is an [Element] to support renaming component tag names, which are
identifiers | 2139 * This class is an [Element] to support renaming component tag names, which are
identifiers |
2028 * in selectors. | 2140 * in selectors. |
2029 */ | 2141 */ |
2030 abstract class AngularSelectorElement implements AngularElement { | 2142 abstract class AngularSelectorElement implements AngularElement { |
2031 /** | 2143 /** |
2032 * Checks if the given [XmlTagNode] matches this selector. | 2144 * Checks if the given [XmlTagNode] matches this selector. |
2033 * | 2145 * |
2034 * @param node the [XmlTagNode] to check | 2146 * @param node the [XmlTagNode] to check |
2035 * @return `true` if the given [XmlTagNode] matches, or `false` otherwise | 2147 * @return `true` if the given [XmlTagNode] matches, or `false` otherwise |
2036 */ | 2148 */ |
2037 bool apply(XmlTagNode node); | 2149 bool apply(XmlTagNode node); |
2038 } | 2150 } |
2039 | 2151 |
2040 /** | 2152 /** |
| 2153 * [AngularSelectorElement] based on tag name. |
| 2154 */ |
| 2155 abstract class AngularTagSelectorElement implements AngularSelectorElement { |
| 2156 } |
| 2157 |
| 2158 /** |
| 2159 * The interface `AngularViewElement` defines the Angular view defined using inv
ocation like |
| 2160 * <code>view('views/create.html')</code>. |
| 2161 * |
| 2162 * @coverage dart.engine.element |
| 2163 */ |
| 2164 abstract class AngularViewElement implements AngularHasTemplateElement { |
| 2165 /** |
| 2166 * An empty array of view elements. |
| 2167 */ |
| 2168 static final List<AngularViewElement> EMPTY_ARRAY = new List<AngularViewElemen
t>(0); |
| 2169 } |
| 2170 |
| 2171 /** |
2041 * Instances of the class `GeneralizingElementVisitor` implement an element visi
tor that will | 2172 * Instances of the class `GeneralizingElementVisitor` implement an element visi
tor that will |
2042 * recursively visit all of the elements in an element model (like instances of
the class | 2173 * recursively visit all of the elements in an element model (like instances of
the class |
2043 * [RecursiveElementVisitor]). In addition, when an element of a specific type i
s visited not | 2174 * [RecursiveElementVisitor]). In addition, when an element of a specific type i
s visited not |
2044 * only will the visit method for that specific type of element be invoked, but
additional methods | 2175 * only will the visit method for that specific type of element be invoked, but
additional methods |
2045 * for the supertypes of that element will also be invoked. For example, using a
n instance of this | 2176 * for the supertypes of that element will also be invoked. For example, using a
n instance of this |
2046 * class to visit a [MethodElement] will cause the method | 2177 * class to visit a [MethodElement] will cause the method |
2047 * [visitMethodElement] to be invoked but will also cause the methods | 2178 * [visitMethodElement] to be invoked but will also cause the methods |
2048 * [visitExecutableElement] and [visitElement] to be | 2179 * [visitExecutableElement] and [visitElement] to be |
2049 * subsequently invoked. This allows visitors to be written that visit all execu
table elements | 2180 * subsequently invoked. This allows visitors to be written that visit all execu
table elements |
2050 * without needing to override the visit method for each of the specific subclas
ses of | 2181 * without needing to override the visit method for each of the specific subclas
ses of |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2102 R visitAngularDirectiveElement(AngularDirectiveElement element) => visitAngula
rHasSelectorElement(element); | 2233 R visitAngularDirectiveElement(AngularDirectiveElement element) => visitAngula
rHasSelectorElement(element); |
2103 | 2234 |
2104 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele
ment); | 2235 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele
ment); |
2105 | 2236 |
2106 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme
nt(element); | 2237 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme
nt(element); |
2107 | 2238 |
2108 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn
gularElement(element); | 2239 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn
gularElement(element); |
2109 | 2240 |
2110 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE
lement(element); | 2241 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE
lement(element); |
2111 | 2242 |
| 2243 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => vis
itAngularElement(element); |
| 2244 |
2112 R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularE
lement(element); | 2245 R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularE
lement(element); |
2113 | 2246 |
| 2247 R visitAngularViewElement(AngularViewElement element) => visitAngularElement(e
lement); |
| 2248 |
2114 R visitClassElement(ClassElement element) => visitElement(element); | 2249 R visitClassElement(ClassElement element) => visitElement(element); |
2115 | 2250 |
2116 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); | 2251 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); |
2117 | 2252 |
2118 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); | 2253 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); |
2119 | 2254 |
2120 R visitElement(Element element) { | 2255 R visitElement(Element element) { |
2121 element.visitChildren(this); | 2256 element.visitChildren(this); |
2122 return null; | 2257 return null; |
2123 } | 2258 } |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2213 R visitAngularFilterElement(AngularFilterElement element) { | 2348 R visitAngularFilterElement(AngularFilterElement element) { |
2214 element.visitChildren(this); | 2349 element.visitChildren(this); |
2215 return null; | 2350 return null; |
2216 } | 2351 } |
2217 | 2352 |
2218 R visitAngularPropertyElement(AngularPropertyElement element) { | 2353 R visitAngularPropertyElement(AngularPropertyElement element) { |
2219 element.visitChildren(this); | 2354 element.visitChildren(this); |
2220 return null; | 2355 return null; |
2221 } | 2356 } |
2222 | 2357 |
| 2358 R visitAngularScopePropertyElement(AngularScopePropertyElement element) { |
| 2359 element.visitChildren(this); |
| 2360 return null; |
| 2361 } |
| 2362 |
2223 R visitAngularSelectorElement(AngularSelectorElement element) { | 2363 R visitAngularSelectorElement(AngularSelectorElement element) { |
2224 element.visitChildren(this); | 2364 element.visitChildren(this); |
2225 return null; | 2365 return null; |
2226 } | 2366 } |
2227 | 2367 |
| 2368 R visitAngularViewElement(AngularViewElement element) { |
| 2369 element.visitChildren(this); |
| 2370 return null; |
| 2371 } |
| 2372 |
2228 R visitClassElement(ClassElement element) { | 2373 R visitClassElement(ClassElement element) { |
2229 element.visitChildren(this); | 2374 element.visitChildren(this); |
2230 return null; | 2375 return null; |
2231 } | 2376 } |
2232 | 2377 |
2233 R visitCompilationUnitElement(CompilationUnitElement element) { | 2378 R visitCompilationUnitElement(CompilationUnitElement element) { |
2234 element.visitChildren(this); | 2379 element.visitChildren(this); |
2235 return null; | 2380 return null; |
2236 } | 2381 } |
2237 | 2382 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2348 R visitAngularComponentElement(AngularComponentElement element) => null; | 2493 R visitAngularComponentElement(AngularComponentElement element) => null; |
2349 | 2494 |
2350 R visitAngularControllerElement(AngularControllerElement element) => null; | 2495 R visitAngularControllerElement(AngularControllerElement element) => null; |
2351 | 2496 |
2352 R visitAngularDirectiveElement(AngularDirectiveElement element) => null; | 2497 R visitAngularDirectiveElement(AngularDirectiveElement element) => null; |
2353 | 2498 |
2354 R visitAngularFilterElement(AngularFilterElement element) => null; | 2499 R visitAngularFilterElement(AngularFilterElement element) => null; |
2355 | 2500 |
2356 R visitAngularPropertyElement(AngularPropertyElement element) => null; | 2501 R visitAngularPropertyElement(AngularPropertyElement element) => null; |
2357 | 2502 |
| 2503 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => nul
l; |
| 2504 |
2358 R visitAngularSelectorElement(AngularSelectorElement element) => null; | 2505 R visitAngularSelectorElement(AngularSelectorElement element) => null; |
2359 | 2506 |
| 2507 R visitAngularViewElement(AngularViewElement element) => null; |
| 2508 |
2360 R visitClassElement(ClassElement element) => null; | 2509 R visitClassElement(ClassElement element) => null; |
2361 | 2510 |
2362 R visitCompilationUnitElement(CompilationUnitElement element) => null; | 2511 R visitCompilationUnitElement(CompilationUnitElement element) => null; |
2363 | 2512 |
2364 R visitConstructorElement(ConstructorElement element) => null; | 2513 R visitConstructorElement(ConstructorElement element) => null; |
2365 | 2514 |
2366 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => null; | 2515 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => null; |
2367 | 2516 |
2368 R visitExportElement(ExportElement element) => null; | 2517 R visitExportElement(ExportElement element) => null; |
2369 | 2518 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2482 * The type defined by the class. | 2631 * The type defined by the class. |
2483 */ | 2632 */ |
2484 InterfaceType type; | 2633 InterfaceType type; |
2485 | 2634 |
2486 /** | 2635 /** |
2487 * An array containing all of the type parameters defined for this class. | 2636 * An array containing all of the type parameters defined for this class. |
2488 */ | 2637 */ |
2489 List<TypeParameterElement> _typeParameters = TypeParameterElementImpl.EMPTY_AR
RAY; | 2638 List<TypeParameterElement> _typeParameters = TypeParameterElementImpl.EMPTY_AR
RAY; |
2490 | 2639 |
2491 /** | 2640 /** |
2492 * An empty array of type elements. | 2641 * An empty array of class elements. |
2493 */ | 2642 */ |
2494 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0); | 2643 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0); |
2495 | 2644 |
2496 /** | 2645 /** |
2497 * Initialize a newly created class element to have the given name. | 2646 * Initialize a newly created class element to have the given name. |
2498 * | 2647 * |
2499 * @param name the name of this element | 2648 * @param name the name of this element |
2500 */ | 2649 */ |
2501 ClassElementImpl(Identifier name) : super.con1(name); | 2650 ClassElementImpl(Identifier name) : super.con1(name); |
2502 | 2651 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 } | 2796 } |
2648 } | 2797 } |
2649 // not found | 2798 // not found |
2650 return false; | 2799 return false; |
2651 } | 2800 } |
2652 | 2801 |
2653 bool hasReferenceToSuper() => hasModifier(Modifier.REFERENCES_SUPER); | 2802 bool hasReferenceToSuper() => hasModifier(Modifier.REFERENCES_SUPER); |
2654 | 2803 |
2655 bool get isAbstract => hasModifier(Modifier.ABSTRACT); | 2804 bool get isAbstract => hasModifier(Modifier.ABSTRACT); |
2656 | 2805 |
| 2806 bool get isOrInheritsProxy => isOrInheritsProxy2(this, new Set<ClassElement>()
); |
| 2807 |
2657 bool get isProxy { | 2808 bool get isProxy { |
2658 for (ElementAnnotation annotation in metadata) { | 2809 for (ElementAnnotation annotation in metadata) { |
2659 if (annotation.isProxy) { | 2810 if (annotation.isProxy) { |
2660 return true; | 2811 return true; |
2661 } | 2812 } |
2662 } | 2813 } |
2663 return false; | 2814 return false; |
2664 } | 2815 } |
2665 | 2816 |
2666 bool get isTypedef => hasModifier(Modifier.TYPEDEF); | 2817 bool get isTypedef => hasModifier(Modifier.TYPEDEF); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2907 } | 3058 } |
2908 for (InterfaceType type in currentElement.mixins) { | 3059 for (InterfaceType type in currentElement.mixins) { |
2909 ClassElement element = type.element; | 3060 ClassElement element = type.element; |
2910 if (!visitedClasses.contains(element)) { | 3061 if (!visitedClasses.contains(element)) { |
2911 supertypes.add(type); | 3062 supertypes.add(type); |
2912 } | 3063 } |
2913 } | 3064 } |
2914 } | 3065 } |
2915 } | 3066 } |
2916 } | 3067 } |
| 3068 |
| 3069 bool isOrInheritsProxy2(ClassElement classElt, Set<ClassElement> visitedClassE
lts) { |
| 3070 if (visitedClassElts.contains(classElt)) { |
| 3071 return false; |
| 3072 } |
| 3073 visitedClassElts.add(classElt); |
| 3074 if (classElt.isProxy) { |
| 3075 return true; |
| 3076 } else if (classElt.supertype != null && isOrInheritsProxy2(classElt.superty
pe.element, visitedClassElts)) { |
| 3077 return true; |
| 3078 } |
| 3079 List<InterfaceType> supertypes = classElt.interfaces; |
| 3080 for (int i = 0; i < supertypes.length; i++) { |
| 3081 if (isOrInheritsProxy2(supertypes[i].element, visitedClassElts)) { |
| 3082 return true; |
| 3083 } |
| 3084 } |
| 3085 supertypes = classElt.mixins; |
| 3086 for (int i = 0; i < supertypes.length; i++) { |
| 3087 if (isOrInheritsProxy2(supertypes[i].element, visitedClassElts)) { |
| 3088 return true; |
| 3089 } |
| 3090 } |
| 3091 return false; |
| 3092 } |
2917 } | 3093 } |
2918 | 3094 |
2919 /** | 3095 /** |
2920 * Instances of the class `CompilationUnitElementImpl` implement a | 3096 * Instances of the class `CompilationUnitElementImpl` implement a |
2921 * [CompilationUnitElement]. | 3097 * [CompilationUnitElement]. |
2922 * | 3098 * |
2923 * @coverage dart.engine.element | 3099 * @coverage dart.engine.element |
2924 */ | 3100 */ |
2925 class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
lement { | 3101 class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
lement { |
2926 /** | 3102 /** |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2964 */ | 3140 */ |
2965 List<TopLevelVariableElement> _variables = TopLevelVariableElementImpl.EMPTY_A
RRAY; | 3141 List<TopLevelVariableElement> _variables = TopLevelVariableElementImpl.EMPTY_A
RRAY; |
2966 | 3142 |
2967 /** | 3143 /** |
2968 * The URI that is specified by the "part" directive in the enclosing library,
or `null` if | 3144 * The URI that is specified by the "part" directive in the enclosing library,
or `null` if |
2969 * this is the defining compilation unit of a library. | 3145 * this is the defining compilation unit of a library. |
2970 */ | 3146 */ |
2971 String uri; | 3147 String uri; |
2972 | 3148 |
2973 /** | 3149 /** |
| 3150 * An array containing all of the Angular views contained in this compilation
unit. |
| 3151 */ |
| 3152 List<AngularViewElement> _angularViews = AngularViewElement.EMPTY_ARRAY; |
| 3153 |
| 3154 /** |
2974 * Initialize a newly created compilation unit element to have the given name. | 3155 * Initialize a newly created compilation unit element to have the given name. |
2975 * | 3156 * |
2976 * @param name the name of this element | 3157 * @param name the name of this element |
2977 */ | 3158 */ |
2978 CompilationUnitElementImpl(String name) : super.con2(name, -1); | 3159 CompilationUnitElementImpl(String name) : super.con2(name, -1); |
2979 | 3160 |
2980 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); | 3161 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); |
2981 | 3162 |
2982 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && source == (object as CompilationUnitElementImpl).source; | 3163 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && source == (object as CompilationUnitElementImpl).source; |
2983 | 3164 |
2984 List<PropertyAccessorElement> get accessors => _accessors; | 3165 List<PropertyAccessorElement> get accessors => _accessors; |
2985 | 3166 |
| 3167 List<AngularViewElement> get angularViews => _angularViews; |
| 3168 |
2986 ElementImpl getChild(String identifier) { | 3169 ElementImpl getChild(String identifier) { |
2987 // | 3170 // |
2988 // The casts in this method are safe because the set methods would have thro
wn a CCE if any of | 3171 // The casts in this method are safe because the set methods would have thro
wn a CCE if any of |
2989 // the elements in the arrays were not of the expected types. | 3172 // the elements in the arrays were not of the expected types. |
2990 // | 3173 // |
2991 for (PropertyAccessorElement accessor in _accessors) { | 3174 for (PropertyAccessorElement accessor in _accessors) { |
2992 if ((accessor as PropertyAccessorElementImpl).identifier == identifier) { | 3175 if ((accessor as PropertyAccessorElementImpl).identifier == identifier) { |
2993 return accessor as PropertyAccessorElementImpl; | 3176 return accessor as PropertyAccessorElementImpl; |
2994 } | 3177 } |
2995 } | 3178 } |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3048 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit | 3231 * @param the top-level accessors (getters and setters) contained in this comp
ilation unit |
3049 */ | 3232 */ |
3050 void set accessors(List<PropertyAccessorElement> accessors) { | 3233 void set accessors(List<PropertyAccessorElement> accessors) { |
3051 for (PropertyAccessorElement accessor in accessors) { | 3234 for (PropertyAccessorElement accessor in accessors) { |
3052 (accessor as PropertyAccessorElementImpl).enclosingElement = this; | 3235 (accessor as PropertyAccessorElementImpl).enclosingElement = this; |
3053 } | 3236 } |
3054 this._accessors = accessors; | 3237 this._accessors = accessors; |
3055 } | 3238 } |
3056 | 3239 |
3057 /** | 3240 /** |
| 3241 * Set the Angular views defined in this compilation unit. |
| 3242 * |
| 3243 * @param angularViews the Angular views defined in this compilation unit |
| 3244 */ |
| 3245 void set angularViews(List<AngularViewElement> angularViews) { |
| 3246 for (AngularViewElement view in angularViews) { |
| 3247 (view as AngularViewElementImpl).enclosingElement = this; |
| 3248 } |
| 3249 this._angularViews = angularViews; |
| 3250 } |
| 3251 |
| 3252 /** |
3058 * Set the top-level functions contained in this compilation unit to the given
functions. | 3253 * Set the top-level functions contained in this compilation unit to the given
functions. |
3059 * | 3254 * |
3060 * @param functions the top-level functions contained in this compilation unit | 3255 * @param functions the top-level functions contained in this compilation unit |
3061 */ | 3256 */ |
3062 void set functions(List<FunctionElement> functions) { | 3257 void set functions(List<FunctionElement> functions) { |
3063 for (FunctionElement function in functions) { | 3258 for (FunctionElement function in functions) { |
3064 (function as FunctionElementImpl).enclosingElement = this; | 3259 (function as FunctionElementImpl).enclosingElement = this; |
3065 } | 3260 } |
3066 this._functions = functions; | 3261 this._functions = functions; |
3067 } | 3262 } |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3102 this._types = types; | 3297 this._types = types; |
3103 } | 3298 } |
3104 | 3299 |
3105 void visitChildren(ElementVisitor visitor) { | 3300 void visitChildren(ElementVisitor visitor) { |
3106 super.visitChildren(visitor); | 3301 super.visitChildren(visitor); |
3107 safelyVisitChildren(_accessors, visitor); | 3302 safelyVisitChildren(_accessors, visitor); |
3108 safelyVisitChildren(_functions, visitor); | 3303 safelyVisitChildren(_functions, visitor); |
3109 safelyVisitChildren(_typeAliases, visitor); | 3304 safelyVisitChildren(_typeAliases, visitor); |
3110 safelyVisitChildren(_types, visitor); | 3305 safelyVisitChildren(_types, visitor); |
3111 safelyVisitChildren(_variables, visitor); | 3306 safelyVisitChildren(_variables, visitor); |
| 3307 safelyVisitChildren(_angularViews, visitor); |
3112 } | 3308 } |
3113 | 3309 |
3114 void appendTo(JavaStringBuilder builder) { | 3310 void appendTo(JavaStringBuilder builder) { |
3115 if (source == null) { | 3311 if (source == null) { |
3116 builder.append("{compilation unit}"); | 3312 builder.append("{compilation unit}"); |
3117 } else { | 3313 } else { |
3118 builder.append(source.fullName); | 3314 builder.append(source.fullName); |
3119 } | 3315 } |
3120 } | 3316 } |
3121 | 3317 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3234 /** | 3430 /** |
3235 * The constructor to which this constructor is redirecting. | 3431 * The constructor to which this constructor is redirecting. |
3236 */ | 3432 */ |
3237 ConstructorElement redirectedConstructor; | 3433 ConstructorElement redirectedConstructor; |
3238 | 3434 |
3239 /** | 3435 /** |
3240 * Initialize a newly created constructor element to have the given name. | 3436 * Initialize a newly created constructor element to have the given name. |
3241 * | 3437 * |
3242 * @param name the name of this element | 3438 * @param name the name of this element |
3243 */ | 3439 */ |
3244 ConstructorElementImpl(Identifier name) : super.con1(name); | 3440 ConstructorElementImpl.con1(Identifier name) : super.con1(name); |
| 3441 |
| 3442 /** |
| 3443 * Initialize a newly created constructor element to have the given name. |
| 3444 * |
| 3445 * @param name the name of this element |
| 3446 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3447 * declaration of this element |
| 3448 */ |
| 3449 ConstructorElementImpl.con2(String name, int nameOffset) : super.con2(name, na
meOffset); |
3245 | 3450 |
3246 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this); | 3451 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this); |
3247 | 3452 |
3248 ClassElement get enclosingElement => super.enclosingElement as ClassElement; | 3453 ClassElement get enclosingElement => super.enclosingElement as ClassElement; |
3249 | 3454 |
3250 ElementKind get kind => ElementKind.CONSTRUCTOR; | 3455 ElementKind get kind => ElementKind.CONSTRUCTOR; |
3251 | 3456 |
3252 ConstructorDeclaration get node => getNode2(ConstructorDeclaration); | 3457 ConstructorDeclaration get node => getNode2(ConstructorDeclaration); |
3253 | 3458 |
3254 bool get isConst => hasModifier(Modifier.CONST); | 3459 bool get isConst => hasModifier(Modifier.CONST); |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3614 | 3819 |
3615 bool get isDeprecated { | 3820 bool get isDeprecated { |
3616 for (ElementAnnotation annotation in metadata) { | 3821 for (ElementAnnotation annotation in metadata) { |
3617 if (annotation.isDeprecated) { | 3822 if (annotation.isDeprecated) { |
3618 return true; | 3823 return true; |
3619 } | 3824 } |
3620 } | 3825 } |
3621 return false; | 3826 return false; |
3622 } | 3827 } |
3623 | 3828 |
| 3829 bool get isOverride { |
| 3830 for (ElementAnnotation annotation in metadata) { |
| 3831 if (annotation.isOverride) { |
| 3832 return true; |
| 3833 } |
| 3834 } |
| 3835 return false; |
| 3836 } |
| 3837 |
3624 bool get isPrivate { | 3838 bool get isPrivate { |
3625 String name = displayName; | 3839 String name = displayName; |
3626 if (name == null) { | 3840 if (name == null) { |
3627 return true; | 3841 return true; |
3628 } | 3842 } |
3629 return Identifier.isPrivateName(name); | 3843 return Identifier.isPrivateName(name); |
3630 } | 3844 } |
3631 | 3845 |
3632 bool get isPublic => !isPrivate; | 3846 bool get isPublic => !isPrivate; |
3633 | 3847 |
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4855 /** | 5069 /** |
4856 * Determine if the given library is up to date with respect to the given time
stamp. | 5070 * Determine if the given library is up to date with respect to the given time
stamp. |
4857 * | 5071 * |
4858 * @param library the library to process | 5072 * @param library the library to process |
4859 * @param timeStamp the time stamp to check against | 5073 * @param timeStamp the time stamp to check against |
4860 * @param visitedLibraries the set of visited libraries | 5074 * @param visitedLibraries the set of visited libraries |
4861 */ | 5075 */ |
4862 static bool isUpToDate(LibraryElement library, int timeStamp, Set<LibraryEleme
nt> visitedLibraries) { | 5076 static bool isUpToDate(LibraryElement library, int timeStamp, Set<LibraryEleme
nt> visitedLibraries) { |
4863 if (!visitedLibraries.contains(library)) { | 5077 if (!visitedLibraries.contains(library)) { |
4864 visitedLibraries.add(library); | 5078 visitedLibraries.add(library); |
| 5079 AnalysisContext context = library.context; |
4865 // Check the defining compilation unit. | 5080 // Check the defining compilation unit. |
4866 if (timeStamp < library.definingCompilationUnit.source.modificationStamp)
{ | 5081 if (timeStamp < context.getModificationStamp(library.definingCompilationUn
it.source)) { |
4867 return false; | 5082 return false; |
4868 } | 5083 } |
4869 // Check the parted compilation units. | 5084 // Check the parted compilation units. |
4870 for (CompilationUnitElement element in library.parts) { | 5085 for (CompilationUnitElement element in library.parts) { |
4871 if (timeStamp < element.source.modificationStamp) { | 5086 if (timeStamp < context.getModificationStamp(element.source)) { |
4872 return false; | 5087 return false; |
4873 } | 5088 } |
4874 } | 5089 } |
4875 // Check the imported libraries. | 5090 // Check the imported libraries. |
4876 for (LibraryElement importedLibrary in library.importedLibraries) { | 5091 for (LibraryElement importedLibrary in library.importedLibraries) { |
4877 if (!isUpToDate(importedLibrary, timeStamp, visitedLibraries)) { | 5092 if (!isUpToDate(importedLibrary, timeStamp, visitedLibraries)) { |
4878 return false; | 5093 return false; |
4879 } | 5094 } |
4880 } | 5095 } |
4881 // Check the exported libraries. | 5096 // Check the exported libraries. |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5577 for (Element element in conflictingElements) { | 5792 for (Element element in conflictingElements) { |
5578 if (element.isAccessibleIn(library)) { | 5793 if (element.isAccessibleIn(library)) { |
5579 return true; | 5794 return true; |
5580 } | 5795 } |
5581 } | 5796 } |
5582 return false; | 5797 return false; |
5583 } | 5798 } |
5584 | 5799 |
5585 bool get isDeprecated => false; | 5800 bool get isDeprecated => false; |
5586 | 5801 |
| 5802 bool get isOverride => false; |
| 5803 |
5587 bool get isPrivate { | 5804 bool get isPrivate { |
5588 String name = displayName; | 5805 String name = displayName; |
5589 if (name == null) { | 5806 if (name == null) { |
5590 return false; | 5807 return false; |
5591 } | 5808 } |
5592 return Identifier.isPrivateName(name); | 5809 return Identifier.isPrivateName(name); |
5593 } | 5810 } |
5594 | 5811 |
5595 bool get isPublic => !isPrivate; | 5812 bool get isPublic => !isPrivate; |
5596 | 5813 |
(...skipping 11 matching lines...) Expand all Loading... |
5608 } | 5825 } |
5609 builder.append("]"); | 5826 builder.append("]"); |
5610 return builder.toString(); | 5827 return builder.toString(); |
5611 } | 5828 } |
5612 | 5829 |
5613 void visitChildren(ElementVisitor visitor) { | 5830 void visitChildren(ElementVisitor visitor) { |
5614 } | 5831 } |
5615 } | 5832 } |
5616 | 5833 |
5617 /** | 5834 /** |
| 5835 * The interface [MultiplyInheritedMethodElementImpl] defines all of the behavio
r of an |
| 5836 * [MethodElementImpl], with the additional information of an array of |
| 5837 * [ExecutableElement]s from which this element was composed. |
| 5838 * |
| 5839 * @coverage dart.engine.element |
| 5840 */ |
| 5841 class MultiplyInheritedMethodElementImpl extends MethodElementImpl implements Mu
ltiplyInheritedExecutableElement { |
| 5842 /** |
| 5843 * An array the array of executable elements that were used to compose this el
ement. |
| 5844 */ |
| 5845 List<ExecutableElement> _elements = MethodElementImpl.EMPTY_ARRAY; |
| 5846 |
| 5847 MultiplyInheritedMethodElementImpl(Identifier name) : super.con1(name) { |
| 5848 synthetic = true; |
| 5849 } |
| 5850 |
| 5851 List<ExecutableElement> get inheritedElements => _elements; |
| 5852 |
| 5853 void set inheritedElements(List<ExecutableElement> elements) { |
| 5854 this._elements = elements; |
| 5855 } |
| 5856 } |
| 5857 |
| 5858 /** |
| 5859 * The interface [MultiplyInheritedPropertyAccessorElementImpl] defines all of t
he behavior of |
| 5860 * an [PropertyAccessorElementImpl], with the additional information of an array
of |
| 5861 * [ExecutableElement]s from which this element was composed. |
| 5862 * |
| 5863 * @coverage dart.engine.element |
| 5864 */ |
| 5865 class MultiplyInheritedPropertyAccessorElementImpl extends PropertyAccessorEleme
ntImpl implements MultiplyInheritedExecutableElement { |
| 5866 /** |
| 5867 * An array the array of executable elements that were used to compose this el
ement. |
| 5868 */ |
| 5869 List<ExecutableElement> _elements = PropertyAccessorElementImpl.EMPTY_ARRAY; |
| 5870 |
| 5871 MultiplyInheritedPropertyAccessorElementImpl(Identifier name) : super.con1(nam
e) { |
| 5872 synthetic = true; |
| 5873 } |
| 5874 |
| 5875 List<ExecutableElement> get inheritedElements => _elements; |
| 5876 |
| 5877 void set inheritedElements(List<ExecutableElement> elements) { |
| 5878 this._elements = elements; |
| 5879 } |
| 5880 } |
| 5881 |
| 5882 /** |
5618 * Instances of the class `ParameterElementImpl` implement a `ParameterElement`. | 5883 * Instances of the class `ParameterElementImpl` implement a `ParameterElement`. |
5619 * | 5884 * |
5620 * @coverage dart.engine.element | 5885 * @coverage dart.engine.element |
5621 */ | 5886 */ |
5622 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { | 5887 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { |
5623 /** | 5888 /** |
5624 * Is `true` if this variable is potentially mutated somewhere in its scope. | 5889 * Is `true` if this variable is potentially mutated somewhere in its scope. |
5625 */ | 5890 */ |
5626 bool _isPotentiallyMutatedInScope3 = false; | 5891 bool _isPotentiallyMutatedInScope3 = false; |
5627 | 5892 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5770 void appendTo(JavaStringBuilder builder) { | 6035 void appendTo(JavaStringBuilder builder) { |
5771 String left = ""; | 6036 String left = ""; |
5772 String right = ""; | 6037 String right = ""; |
5773 while (true) { | 6038 while (true) { |
5774 if (parameterKind == ParameterKind.NAMED) { | 6039 if (parameterKind == ParameterKind.NAMED) { |
5775 left = "{"; | 6040 left = "{"; |
5776 right = "}"; | 6041 right = "}"; |
5777 } else if (parameterKind == ParameterKind.POSITIONAL) { | 6042 } else if (parameterKind == ParameterKind.POSITIONAL) { |
5778 left = "["; | 6043 left = "["; |
5779 right = "]"; | 6044 right = "]"; |
| 6045 } else if (parameterKind == ParameterKind.REQUIRED) { |
5780 } | 6046 } |
5781 break; | 6047 break; |
5782 } | 6048 } |
5783 builder.append(left); | 6049 builder.append(left); |
5784 appendToWithoutDelimiters(builder); | 6050 appendToWithoutDelimiters(builder); |
5785 builder.append(right); | 6051 builder.append(right); |
5786 } | 6052 } |
5787 | 6053 |
5788 /** | 6054 /** |
5789 * Append the type and name of this parameter to the given builder. | 6055 * Append the type and name of this parameter to the given builder. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6182 * Initialize a newly created variable element to have the given name. | 6448 * Initialize a newly created variable element to have the given name. |
6183 * | 6449 * |
6184 * @param name the name of this element | 6450 * @param name the name of this element |
6185 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 6451 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
6186 * declaration of this element | 6452 * declaration of this element |
6187 */ | 6453 */ |
6188 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset); | 6454 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset); |
6189 | 6455 |
6190 /** | 6456 /** |
6191 * Return the result of evaluating this variable's initializer as a compile-ti
me constant | 6457 * Return the result of evaluating this variable's initializer as a compile-ti
me constant |
6192 * expression, or `null` if this variable is not a 'const' variable or does no
t have an | 6458 * expression, or `null` if this variable is not a 'const' variable, if it doe
s not have an |
6193 * initializer. | 6459 * initializer, or if the compilation unit containing the variable has not bee
n resolved. |
6194 * | 6460 * |
6195 * @return the result of evaluating this variable's initializer | 6461 * @return the result of evaluating this variable's initializer |
6196 */ | 6462 */ |
6197 EvaluationResultImpl get evaluationResult => null; | 6463 EvaluationResultImpl get evaluationResult => null; |
6198 | 6464 |
6199 FunctionElement get initializer => _initializer; | 6465 FunctionElement get initializer => _initializer; |
6200 | 6466 |
6201 VariableDeclaration get node => getNode2(VariableDeclaration); | 6467 VariableDeclaration get node => getNode2(VariableDeclaration); |
6202 | 6468 |
6203 bool get isConst => hasModifier(Modifier.CONST); | 6469 bool get isConst => hasModifier(Modifier.CONST); |
6204 | 6470 |
6205 bool get isFinal => hasModifier(Modifier.FINAL); | 6471 bool get isFinal => hasModifier(Modifier.FINAL); |
6206 | 6472 |
6207 /** | 6473 /** |
6208 * Return `true` if this variable is potentially mutated somewhere in closure.
This | 6474 * Return `true` if this variable is potentially mutated somewhere in a closur
e. This |
6209 * information is only available for local variables (including parameters). | 6475 * information is only available for local variables (including parameters) an
d only after the |
| 6476 * compilation unit containing the variable has been resolved. |
6210 * | 6477 * |
6211 * @return `true` if this variable is potentially mutated somewhere in closure | 6478 * @return `true` if this variable is potentially mutated somewhere in closure |
6212 */ | 6479 */ |
6213 bool get isPotentiallyMutatedInClosure => false; | 6480 bool get isPotentiallyMutatedInClosure => false; |
6214 | 6481 |
6215 /** | 6482 /** |
6216 * Return `true` if this variable is potentially mutated somewhere in its scop
e. This | 6483 * Return `true` if this variable is potentially mutated somewhere in its scop
e. This |
6217 * information is only available for local variables (including parameters). | 6484 * information is only available for local variables (including parameters) an
d only after the |
| 6485 * compilation unit containing the variable has been resolved. |
6218 * | 6486 * |
6219 * @return `true` if this variable is potentially mutated somewhere in its sco
pe | 6487 * @return `true` if this variable is potentially mutated somewhere in its sco
pe |
6220 */ | 6488 */ |
6221 bool get isPotentiallyMutatedInScope => false; | 6489 bool get isPotentiallyMutatedInScope => false; |
6222 | 6490 |
6223 /** | 6491 /** |
6224 * Set whether this variable is const to correspond to the given value. | 6492 * Set whether this variable is const to correspond to the given value. |
6225 * | 6493 * |
6226 * @param isConst `true` if the variable is const | 6494 * @param isConst `true` if the variable is const |
6227 */ | 6495 */ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6266 } | 6534 } |
6267 | 6535 |
6268 void appendTo(JavaStringBuilder builder) { | 6536 void appendTo(JavaStringBuilder builder) { |
6269 builder.append(type); | 6537 builder.append(type); |
6270 builder.append(" "); | 6538 builder.append(" "); |
6271 builder.append(displayName); | 6539 builder.append(displayName); |
6272 } | 6540 } |
6273 } | 6541 } |
6274 | 6542 |
6275 /** | 6543 /** |
| 6544 * Information about Angular application. |
| 6545 */ |
| 6546 class AngularApplication { |
| 6547 final Source entryPoint; |
| 6548 |
| 6549 Set<Source> _librarySources; |
| 6550 |
| 6551 final List<AngularElement> elements; |
| 6552 |
| 6553 final List<Source> elementSources; |
| 6554 |
| 6555 AngularApplication(this.entryPoint, Set<Source> librarySources, this.elements,
this.elementSources) { |
| 6556 this._librarySources = librarySources; |
| 6557 } |
| 6558 |
| 6559 /** |
| 6560 * Checks if this application depends on the library with the given [Source]. |
| 6561 */ |
| 6562 bool dependsOn(Source librarySource) => _librarySources.contains(librarySource
); |
| 6563 } |
| 6564 |
| 6565 /** |
6276 * Implementation of `AngularComponentElement`. | 6566 * Implementation of `AngularComponentElement`. |
6277 * | 6567 * |
6278 * @coverage dart.engine.element | 6568 * @coverage dart.engine.element |
6279 */ | 6569 */ |
6280 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen
ts AngularComponentElement { | 6570 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen
ts AngularComponentElement { |
6281 /** | 6571 /** |
6282 * The offset of the defining <code>NgComponent</code> annotation. | 6572 * The offset of the defining <code>NgComponent</code> annotation. |
6283 */ | 6573 */ |
6284 int _annotationOffset = 0; | 6574 int _annotationOffset = 0; |
6285 | 6575 |
6286 /** | 6576 /** |
6287 * The array containing all of the properties declared by this component. | 6577 * The array containing all of the properties declared by this component. |
6288 */ | 6578 */ |
6289 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; | 6579 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; |
6290 | 6580 |
6291 /** | 6581 /** |
| 6582 * The array containing all of the scope properties set by this component. |
| 6583 */ |
| 6584 List<AngularScopePropertyElement> _scopeProperties = AngularScopePropertyEleme
nt.EMPTY_ARRAY; |
| 6585 |
| 6586 /** |
6292 * The the CSS file URI. | 6587 * The the CSS file URI. |
6293 */ | 6588 */ |
6294 String styleUri; | 6589 String styleUri; |
6295 | 6590 |
6296 /** | 6591 /** |
6297 * The offset of the [styleUri] in the [getSource]. | 6592 * The offset of the [styleUri] in the [getSource]. |
6298 */ | 6593 */ |
6299 int styleUriOffset = 0; | 6594 int styleUriOffset = 0; |
6300 | 6595 |
6301 /** | 6596 /** |
(...skipping 21 matching lines...) Expand all Loading... |
6323 AngularComponentElementImpl(String name, int nameOffset, int annotationOffset)
: super(name, nameOffset) { | 6618 AngularComponentElementImpl(String name, int nameOffset, int annotationOffset)
: super(name, nameOffset) { |
6324 this._annotationOffset = annotationOffset; | 6619 this._annotationOffset = annotationOffset; |
6325 } | 6620 } |
6326 | 6621 |
6327 accept(ElementVisitor visitor) => visitor.visitAngularComponentElement(this); | 6622 accept(ElementVisitor visitor) => visitor.visitAngularComponentElement(this); |
6328 | 6623 |
6329 ElementKind get kind => ElementKind.ANGULAR_COMPONENT; | 6624 ElementKind get kind => ElementKind.ANGULAR_COMPONENT; |
6330 | 6625 |
6331 List<AngularPropertyElement> get properties => _properties; | 6626 List<AngularPropertyElement> get properties => _properties; |
6332 | 6627 |
| 6628 List<AngularScopePropertyElement> get scopeProperties => _scopeProperties; |
| 6629 |
6333 /** | 6630 /** |
6334 * Set an array containing all of the properties declared by this component. | 6631 * Set an array containing all of the properties declared by this component. |
6335 * | 6632 * |
6336 * @param properties the properties to set | 6633 * @param properties the properties to set |
6337 */ | 6634 */ |
6338 void set properties(List<AngularPropertyElement> properties) { | 6635 void set properties(List<AngularPropertyElement> properties) { |
6339 for (AngularPropertyElement property in properties) { | 6636 for (AngularPropertyElement property in properties) { |
6340 encloseElement(property as AngularPropertyElementImpl); | 6637 encloseElement(property as AngularPropertyElementImpl); |
6341 } | 6638 } |
6342 this._properties = properties; | 6639 this._properties = properties; |
6343 } | 6640 } |
6344 | 6641 |
| 6642 /** |
| 6643 * Set an array containing all of the scope properties declared by this compon
ent. |
| 6644 * |
| 6645 * @param properties the properties to set |
| 6646 */ |
| 6647 void set scopeProperties(List<AngularScopePropertyElement> properties) { |
| 6648 for (AngularScopePropertyElement property in properties) { |
| 6649 encloseElement(property as AngularScopePropertyElementImpl); |
| 6650 } |
| 6651 this._scopeProperties = properties; |
| 6652 } |
| 6653 |
6345 void visitChildren(ElementVisitor visitor) { | 6654 void visitChildren(ElementVisitor visitor) { |
6346 safelyVisitChildren(_properties, visitor); | 6655 safelyVisitChildren(_properties, visitor); |
| 6656 safelyVisitChildren(_scopeProperties, visitor); |
6347 super.visitChildren(visitor); | 6657 super.visitChildren(visitor); |
6348 } | 6658 } |
6349 | 6659 |
6350 String get identifier => "AngularComponent@${_annotationOffset}"; | 6660 String get identifier => "AngularComponent@${_annotationOffset}"; |
6351 } | 6661 } |
6352 | 6662 |
6353 /** | 6663 /** |
6354 * Implementation of `AngularControllerElement`. | 6664 * Implementation of `AngularControllerElement`. |
6355 * | 6665 * |
6356 * @coverage dart.engine.element | 6666 * @coverage dart.engine.element |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6428 String get identifier => "NgDirective@${_offset}"; | 6738 String get identifier => "NgDirective@${_offset}"; |
6429 } | 6739 } |
6430 | 6740 |
6431 /** | 6741 /** |
6432 * Implementation of `AngularElement`. | 6742 * Implementation of `AngularElement`. |
6433 * | 6743 * |
6434 * @coverage dart.engine.element | 6744 * @coverage dart.engine.element |
6435 */ | 6745 */ |
6436 abstract class AngularElementImpl extends ToolkitObjectElementImpl implements An
gularElement { | 6746 abstract class AngularElementImpl extends ToolkitObjectElementImpl implements An
gularElement { |
6437 /** | 6747 /** |
| 6748 * The [AngularApplication] this element is used in. |
| 6749 */ |
| 6750 AngularApplication _application; |
| 6751 |
| 6752 /** |
6438 * Initialize a newly created Angular element to have the given name. | 6753 * Initialize a newly created Angular element to have the given name. |
6439 * | 6754 * |
6440 * @param name the name of this element | 6755 * @param name the name of this element |
6441 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 6756 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
6442 * declaration of this element | 6757 * declaration of this element |
6443 */ | 6758 */ |
6444 AngularElementImpl(String name, int nameOffset) : super(name, nameOffset); | 6759 AngularElementImpl(String name, int nameOffset) : super(name, nameOffset); |
| 6760 |
| 6761 AngularApplication get application => _application; |
| 6762 |
| 6763 /** |
| 6764 * Set the [AngularApplication] this element is used in. |
| 6765 */ |
| 6766 void set application(AngularApplication application) { |
| 6767 this._application = application; |
| 6768 } |
6445 } | 6769 } |
6446 | 6770 |
6447 /** | 6771 /** |
6448 * Implementation of `AngularFilterElement`. | 6772 * Implementation of `AngularFilterElement`. |
6449 * | 6773 * |
6450 * @coverage dart.engine.element | 6774 * @coverage dart.engine.element |
6451 */ | 6775 */ |
6452 class AngularFilterElementImpl extends AngularElementImpl implements AngularFilt
erElement { | 6776 class AngularFilterElementImpl extends AngularElementImpl implements AngularFilt
erElement { |
6453 /** | 6777 /** |
6454 * Initialize a newly created Angular filter to have the given name. | 6778 * Initialize a newly created Angular filter to have the given name. |
6455 * | 6779 * |
6456 * @param name the name of this element | 6780 * @param name the name of this element |
6457 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 6781 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
6458 * declaration of this element | 6782 * declaration of this element |
6459 */ | 6783 */ |
6460 AngularFilterElementImpl(String name, int nameOffset) : super(name, nameOffset
); | 6784 AngularFilterElementImpl(String name, int nameOffset) : super(name, nameOffset
); |
6461 | 6785 |
6462 accept(ElementVisitor visitor) => visitor.visitAngularFilterElement(this); | 6786 accept(ElementVisitor visitor) => visitor.visitAngularFilterElement(this); |
6463 | 6787 |
6464 ElementKind get kind => ElementKind.ANGULAR_FILTER; | 6788 ElementKind get kind => ElementKind.ANGULAR_FILTER; |
6465 } | 6789 } |
6466 | 6790 |
6467 /** | 6791 /** |
| 6792 * Implementation of [AngularSelectorElement] based on presence of a class. |
| 6793 */ |
| 6794 class AngularHasClassSelectorElementImpl extends AngularSelectorElementImpl impl
ements AngularHasClassSelectorElement { |
| 6795 AngularHasClassSelectorElementImpl(String name, int offset) : super(name, offs
et); |
| 6796 |
| 6797 bool apply(XmlTagNode node) { |
| 6798 XmlAttributeNode attribute = node.getAttribute("class"); |
| 6799 if (attribute != null) { |
| 6800 String text = attribute.text; |
| 6801 if (text != null) { |
| 6802 String name = this.name; |
| 6803 for (String className in StringUtils.split(text)) { |
| 6804 if (className == name) { |
| 6805 return true; |
| 6806 } |
| 6807 } |
| 6808 } |
| 6809 } |
| 6810 return false; |
| 6811 } |
| 6812 |
| 6813 void appendTo(JavaStringBuilder builder) { |
| 6814 builder.append("."); |
| 6815 builder.append(name); |
| 6816 } |
| 6817 } |
| 6818 |
| 6819 /** |
6468 * Implementation of `AngularSelectorElement`. | 6820 * Implementation of `AngularSelectorElement`. |
6469 * | 6821 * |
6470 * @coverage dart.engine.element | 6822 * @coverage dart.engine.element |
6471 */ | 6823 */ |
6472 abstract class AngularHasSelectorElementImpl extends AngularElementImpl implemen
ts AngularHasSelectorElement { | 6824 abstract class AngularHasSelectorElementImpl extends AngularElementImpl implemen
ts AngularHasSelectorElement { |
6473 /** | 6825 /** |
6474 * The selector of this element. | 6826 * The selector of this element. |
6475 */ | 6827 */ |
6476 AngularSelectorElement _selector; | 6828 AngularSelectorElement _selector; |
6477 | 6829 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6528 * declaration of this element | 6880 * declaration of this element |
6529 */ | 6881 */ |
6530 AngularPropertyElementImpl(String name, int nameOffset) : super(name, nameOffs
et); | 6882 AngularPropertyElementImpl(String name, int nameOffset) : super(name, nameOffs
et); |
6531 | 6883 |
6532 accept(ElementVisitor visitor) => visitor.visitAngularPropertyElement(this); | 6884 accept(ElementVisitor visitor) => visitor.visitAngularPropertyElement(this); |
6533 | 6885 |
6534 ElementKind get kind => ElementKind.ANGULAR_PROPERTY; | 6886 ElementKind get kind => ElementKind.ANGULAR_PROPERTY; |
6535 } | 6887 } |
6536 | 6888 |
6537 /** | 6889 /** |
| 6890 * Implementation of `AngularScopePropertyElement`. |
| 6891 * |
| 6892 * @coverage dart.engine.element |
| 6893 */ |
| 6894 class AngularScopePropertyElementImpl extends AngularElementImpl implements Angu
larScopePropertyElement { |
| 6895 /** |
| 6896 * The type of the property |
| 6897 */ |
| 6898 final Type2 type; |
| 6899 |
| 6900 /** |
| 6901 * Initialize a newly created Angular scope property to have the given name. |
| 6902 * |
| 6903 * @param name the name of this element |
| 6904 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6905 * declaration of this element |
| 6906 */ |
| 6907 AngularScopePropertyElementImpl(String name, int nameOffset, this.type) : supe
r(name, nameOffset); |
| 6908 |
| 6909 accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(thi
s); |
| 6910 |
| 6911 ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY; |
| 6912 } |
| 6913 |
| 6914 /** |
6538 * Implementation of `AngularFilterElement`. | 6915 * Implementation of `AngularFilterElement`. |
6539 * | 6916 * |
6540 * @coverage dart.engine.element | 6917 * @coverage dart.engine.element |
6541 */ | 6918 */ |
6542 abstract class AngularSelectorElementImpl extends AngularElementImpl implements
AngularSelectorElement { | 6919 abstract class AngularSelectorElementImpl extends AngularElementImpl implements
AngularSelectorElement { |
6543 /** | 6920 /** |
6544 * Initialize a newly created Angular selector to have the given name. | 6921 * Initialize a newly created Angular selector to have the given name. |
6545 * | 6922 * |
6546 * @param name the name of this element | 6923 * @param name the name of this element |
6547 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 6924 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
6548 * declaration of this element | 6925 * declaration of this element |
6549 */ | 6926 */ |
6550 AngularSelectorElementImpl(String name, int nameOffset) : super(name, nameOffs
et); | 6927 AngularSelectorElementImpl(String name, int nameOffset) : super(name, nameOffs
et); |
6551 | 6928 |
6552 accept(ElementVisitor visitor) => visitor.visitAngularSelectorElement(this); | 6929 accept(ElementVisitor visitor) => visitor.visitAngularSelectorElement(this); |
6553 | 6930 |
6554 ElementKind get kind => ElementKind.ANGULAR_SELECTOR; | 6931 ElementKind get kind => ElementKind.ANGULAR_SELECTOR; |
6555 } | 6932 } |
6556 | 6933 |
6557 /** | 6934 /** |
| 6935 * Implementation of [AngularSelectorElement] based on tag name. |
| 6936 */ |
| 6937 class AngularTagSelectorElementImpl extends AngularSelectorElementImpl implement
s AngularTagSelectorElement { |
| 6938 AngularTagSelectorElementImpl(String name, int offset) : super(name, offset); |
| 6939 |
| 6940 bool apply(XmlTagNode node) { |
| 6941 String tagName = name; |
| 6942 return node.tag == tagName; |
| 6943 } |
| 6944 |
| 6945 AngularApplication get application => (enclosingElement as AngularElementImpl)
.application; |
| 6946 } |
| 6947 |
| 6948 /** |
| 6949 * Implementation of `AngularViewElement`. |
| 6950 * |
| 6951 * @coverage dart.engine.element |
| 6952 */ |
| 6953 class AngularViewElementImpl extends AngularElementImpl implements AngularViewEl
ement { |
| 6954 /** |
| 6955 * The HTML template URI. |
| 6956 */ |
| 6957 final String templateUri; |
| 6958 |
| 6959 /** |
| 6960 * The offset of the [templateUri] in the [getSource]. |
| 6961 */ |
| 6962 final int templateUriOffset; |
| 6963 |
| 6964 /** |
| 6965 * The HTML template source. |
| 6966 */ |
| 6967 Source templateSource; |
| 6968 |
| 6969 /** |
| 6970 * Initialize a newly created Angular view. |
| 6971 */ |
| 6972 AngularViewElementImpl(this.templateUri, this.templateUriOffset) : super(null,
-1); |
| 6973 |
| 6974 accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this); |
| 6975 |
| 6976 ElementKind get kind => ElementKind.ANGULAR_VIEW; |
| 6977 |
| 6978 String get identifier => "AngularView@${templateUriOffset}"; |
| 6979 } |
| 6980 |
| 6981 /** |
6558 * Implementation of [AngularSelectorElement] based on presence of attribute. | 6982 * Implementation of [AngularSelectorElement] based on presence of attribute. |
6559 */ | 6983 */ |
6560 class HasAttributeSelectorElementImpl extends AngularSelectorElementImpl { | 6984 class HasAttributeSelectorElementImpl extends AngularSelectorElementImpl impleme
nts AngularHasAttributeSelectorElement { |
6561 HasAttributeSelectorElementImpl(String attributeName, int offset) : super(attr
ibuteName, offset); | 6985 HasAttributeSelectorElementImpl(String attributeName, int offset) : super(attr
ibuteName, offset); |
6562 | 6986 |
6563 bool apply(XmlTagNode node) { | 6987 bool apply(XmlTagNode node) { |
6564 String attributeName = name; | 6988 String attributeName = name; |
6565 return node.getAttribute(attributeName) != null; | 6989 return node.getAttribute(attributeName) != null; |
6566 } | 6990 } |
6567 | 6991 |
6568 String get displayName => "[${super.displayName}]"; | 6992 void appendTo(JavaStringBuilder builder) { |
| 6993 builder.append("["); |
| 6994 builder.append(name); |
| 6995 builder.append("]"); |
| 6996 } |
6569 } | 6997 } |
6570 | 6998 |
6571 /** | 6999 /** |
6572 * Combination of [IsTagSelectorElementImpl] and [HasAttributeSelectorElementImp
l]. | 7000 * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorEleme
ntImpl]. |
6573 */ | 7001 */ |
6574 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl { | 7002 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl { |
6575 final String tagName; | 7003 final String tagName; |
6576 | 7004 |
6577 final String attributeName; | 7005 final String attributeName; |
6578 | 7006 |
6579 IsTagHasAttributeSelectorElementImpl(this.tagName, this.attributeName) : super
(null, -1); | 7007 IsTagHasAttributeSelectorElementImpl(this.tagName, this.attributeName) : super
(null, -1); |
6580 | 7008 |
6581 bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attrib
uteName) != null; | 7009 bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attrib
uteName) != null; |
6582 } | 7010 } |
6583 | 7011 |
6584 /** | 7012 /** |
6585 * Implementation of [AngularSelectorElement] based on tag name. | |
6586 */ | |
6587 class IsTagSelectorElementImpl extends AngularSelectorElementImpl { | |
6588 IsTagSelectorElementImpl(String name, int offset) : super(name, offset); | |
6589 | |
6590 bool apply(XmlTagNode node) { | |
6591 String tagName = name; | |
6592 return node.tag == tagName; | |
6593 } | |
6594 } | |
6595 | |
6596 /** | |
6597 * Instances of the class `ConstructorMember` represent a constructor element de
fined in a | 7013 * Instances of the class `ConstructorMember` represent a constructor element de
fined in a |
6598 * parameterized type where the values of the type parameters are known. | 7014 * parameterized type where the values of the type parameters are known. |
6599 */ | 7015 */ |
6600 class ConstructorMember extends ExecutableMember implements ConstructorElement { | 7016 class ConstructorMember extends ExecutableMember implements ConstructorElement { |
6601 /** | 7017 /** |
6602 * If the given constructor's type is different when any type parameters from
the defining type's | 7018 * If the given constructor's type is different when any type parameters from
the defining type's |
6603 * declaration are replaced with the actual type arguments from the defining t
ype, create a | 7019 * declaration are replaced with the actual type arguments from the defining t
ype, create a |
6604 * constructor member representing the given constructor. Return the member th
at was created, or | 7020 * constructor member representing the given constructor. Return the member th
at was created, or |
6605 * the base constructor if no member was created. | 7021 * the base constructor if no member was created. |
6606 * | 7022 * |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6880 ASTNode get node => _baseElement.node; | 7296 ASTNode get node => _baseElement.node; |
6881 | 7297 |
6882 Source get source => _baseElement.source; | 7298 Source get source => _baseElement.source; |
6883 | 7299 |
6884 CompilationUnit get unit => _baseElement.unit; | 7300 CompilationUnit get unit => _baseElement.unit; |
6885 | 7301 |
6886 bool isAccessibleIn(LibraryElement library) => _baseElement.isAccessibleIn(lib
rary); | 7302 bool isAccessibleIn(LibraryElement library) => _baseElement.isAccessibleIn(lib
rary); |
6887 | 7303 |
6888 bool get isDeprecated => _baseElement.isDeprecated; | 7304 bool get isDeprecated => _baseElement.isDeprecated; |
6889 | 7305 |
| 7306 bool get isOverride => _baseElement.isOverride; |
| 7307 |
6890 bool get isPrivate => _baseElement.isPrivate; | 7308 bool get isPrivate => _baseElement.isPrivate; |
6891 | 7309 |
6892 bool get isPublic => _baseElement.isPublic; | 7310 bool get isPublic => _baseElement.isPublic; |
6893 | 7311 |
6894 bool get isSynthetic => _baseElement.isSynthetic; | 7312 bool get isSynthetic => _baseElement.isSynthetic; |
6895 | 7313 |
6896 void visitChildren(ElementVisitor visitor) { | 7314 void visitChildren(ElementVisitor visitor) { |
6897 } | 7315 } |
6898 | 7316 |
6899 /** | 7317 /** |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7129 ParameterElement baseElement = this.baseElement; | 7547 ParameterElement baseElement = this.baseElement; |
7130 String left = ""; | 7548 String left = ""; |
7131 String right = ""; | 7549 String right = ""; |
7132 while (true) { | 7550 while (true) { |
7133 if (baseElement.parameterKind == ParameterKind.NAMED) { | 7551 if (baseElement.parameterKind == ParameterKind.NAMED) { |
7134 left = "{"; | 7552 left = "{"; |
7135 right = "}"; | 7553 right = "}"; |
7136 } else if (baseElement.parameterKind == ParameterKind.POSITIONAL) { | 7554 } else if (baseElement.parameterKind == ParameterKind.POSITIONAL) { |
7137 left = "["; | 7555 left = "["; |
7138 right = "]"; | 7556 right = "]"; |
| 7557 } else if (baseElement.parameterKind == ParameterKind.REQUIRED) { |
7139 } | 7558 } |
7140 break; | 7559 break; |
7141 } | 7560 } |
7142 JavaStringBuilder builder = new JavaStringBuilder(); | 7561 JavaStringBuilder builder = new JavaStringBuilder(); |
7143 builder.append(left); | 7562 builder.append(left); |
7144 builder.append(type); | 7563 builder.append(type); |
7145 builder.append(" "); | 7564 builder.append(" "); |
7146 builder.append(baseElement.displayName); | 7565 builder.append(baseElement.displayName); |
7147 builder.append(right); | 7566 builder.append(right); |
7148 return builder.toString(); | 7567 return builder.toString(); |
(...skipping 2498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9647 | 10066 |
9648 /** | 10067 /** |
9649 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 10068 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
9650 * `void`. | 10069 * `void`. |
9651 * | 10070 * |
9652 * @coverage dart.engine.type | 10071 * @coverage dart.engine.type |
9653 */ | 10072 */ |
9654 abstract class VoidType implements Type2 { | 10073 abstract class VoidType implements Type2 { |
9655 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 10074 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
9656 } | 10075 } |
OLD | NEW |