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

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

Issue 137143010: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.element; 8 library engine.element;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 */ 708 */
709 class ElementKind extends Enum<ElementKind> { 709 class ElementKind extends Enum<ElementKind> {
710 static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0, "Angular filter"); 710 static final ElementKind ANGULAR_FILTER = new ElementKind('ANGULAR_FILTER', 0, "Angular filter");
711 711
712 static final ElementKind ANGULAR_COMPONENT = new ElementKind('ANGULAR_COMPONEN T', 1, "Angular component"); 712 static final ElementKind ANGULAR_COMPONENT = new ElementKind('ANGULAR_COMPONEN T', 1, "Angular component");
713 713
714 static final ElementKind ANGULAR_CONTROLLER = new ElementKind('ANGULAR_CONTROL LER', 2, "Angular controller"); 714 static final ElementKind ANGULAR_CONTROLLER = new ElementKind('ANGULAR_CONTROL LER', 2, "Angular controller");
715 715
716 static final ElementKind ANGULAR_DIRECTIVE = new ElementKind('ANGULAR_DIRECTIV E', 3, "Angular directive"); 716 static final ElementKind ANGULAR_DIRECTIVE = new ElementKind('ANGULAR_DIRECTIV E', 3, "Angular directive");
717 717
718 static final ElementKind ANGULAR_MODULE = new ElementKind('ANGULAR_MODULE', 4, "Angular module"); 718 static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY' , 4, "Angular property");
719 719
720 static final ElementKind ANGULAR_PROPERTY = new ElementKind('ANGULAR_PROPERTY' , 5, "Angular property"); 720 static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR' , 5, "Angular selector");
721 721
722 static final ElementKind ANGULAR_SELECTOR = new ElementKind('ANGULAR_SELECTOR' , 6, "Angular selector"); 722 static final ElementKind CLASS = new ElementKind('CLASS', 6, "class");
723 723
724 static final ElementKind CLASS = new ElementKind('CLASS', 7, "class"); 724 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT' , 7, "compilation unit");
725 725
726 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT' , 8, "compilation unit"); 726 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 8, "cons tructor");
727 727
728 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 9, "cons tructor"); 728 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 9, "<dynamic>");
729 729
730 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 10, "<dynamic>") ; 730 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML _SCRIPT', 10, "embedded html script");
731 731
732 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML _SCRIPT', 11, "embedded html script"); 732 static final ElementKind ERROR = new ElementKind('ERROR', 11, "<error>");
733 733
734 static final ElementKind ERROR = new ElementKind('ERROR', 12, "<error>"); 734 static final ElementKind EXPORT = new ElementKind('EXPORT', 12, "export direct ive");
735 735
736 static final ElementKind EXPORT = new ElementKind('EXPORT', 13, "export direct ive"); 736 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML _SCRIPT', 13, "external html script");
737 737
738 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML _SCRIPT', 14, "external html script"); 738 static final ElementKind FIELD = new ElementKind('FIELD', 14, "field");
739 739
740 static final ElementKind FIELD = new ElementKind('FIELD', 15, "field"); 740 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 15, "function" );
741 741
742 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 16, "function" ); 742 static final ElementKind GETTER = new ElementKind('GETTER', 16, "getter");
743 743
744 static final ElementKind GETTER = new ElementKind('GETTER', 17, "getter"); 744 static final ElementKind HTML = new ElementKind('HTML', 17, "html");
745 745
746 static final ElementKind HTML = new ElementKind('HTML', 18, "html"); 746 static final ElementKind IMPORT = new ElementKind('IMPORT', 18, "import direct ive");
747 747
748 static final ElementKind IMPORT = new ElementKind('IMPORT', 19, "import direct ive"); 748 static final ElementKind LABEL = new ElementKind('LABEL', 19, "label");
749 749
750 static final ElementKind LABEL = new ElementKind('LABEL', 20, "label"); 750 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 20, "library");
751 751
752 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 21, "library"); 752 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 21 , "local variable");
753 753
754 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 22 , "local variable"); 754 static final ElementKind METHOD = new ElementKind('METHOD', 22, "method");
755 755
756 static final ElementKind METHOD = new ElementKind('METHOD', 23, "method"); 756 static final ElementKind NAME = new ElementKind('NAME', 23, "<name>");
757 757
758 static final ElementKind NAME = new ElementKind('NAME', 24, "<name>"); 758 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 24, "paramet er");
759 759
760 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 25, "paramet er"); 760 static final ElementKind PREFIX = new ElementKind('PREFIX', 25, "import prefix ");
761 761
762 static final ElementKind PREFIX = new ElementKind('PREFIX', 26, "import prefix "); 762 static final ElementKind SETTER = new ElementKind('SETTER', 26, "setter");
763 763
764 static final ElementKind SETTER = new ElementKind('SETTER', 27, "setter"); 764 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 27, "top level variable");
765 765
766 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 28, "top level variable"); 766 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 28, "function type alias");
767 767
768 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 29, "function type alias"); 768 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 29 , "type parameter");
769 769
770 static final ElementKind TYPE_PARAMETER = new ElementKind('TYPE_PARAMETER', 30 , "type parameter"); 770 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 30, "<universe >");
771
772 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 31, "<universe >");
773 771
774 static final List<ElementKind> values = [ 772 static final List<ElementKind> values = [
775 ANGULAR_FILTER, 773 ANGULAR_FILTER,
776 ANGULAR_COMPONENT, 774 ANGULAR_COMPONENT,
777 ANGULAR_CONTROLLER, 775 ANGULAR_CONTROLLER,
778 ANGULAR_DIRECTIVE, 776 ANGULAR_DIRECTIVE,
779 ANGULAR_MODULE,
780 ANGULAR_PROPERTY, 777 ANGULAR_PROPERTY,
781 ANGULAR_SELECTOR, 778 ANGULAR_SELECTOR,
782 CLASS, 779 CLASS,
783 COMPILATION_UNIT, 780 COMPILATION_UNIT,
784 CONSTRUCTOR, 781 CONSTRUCTOR,
785 DYNAMIC, 782 DYNAMIC,
786 EMBEDDED_HTML_SCRIPT, 783 EMBEDDED_HTML_SCRIPT,
787 ERROR, 784 ERROR,
788 EXPORT, 785 EXPORT,
789 EXTERNAL_HTML_SCRIPT, 786 EXTERNAL_HTML_SCRIPT,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 */ 853 */
857 abstract class ElementVisitor<R> { 854 abstract class ElementVisitor<R> {
858 R visitAngularComponentElement(AngularComponentElement element); 855 R visitAngularComponentElement(AngularComponentElement element);
859 856
860 R visitAngularControllerElement(AngularControllerElement element); 857 R visitAngularControllerElement(AngularControllerElement element);
861 858
862 R visitAngularDirectiveElement(AngularDirectiveElement element); 859 R visitAngularDirectiveElement(AngularDirectiveElement element);
863 860
864 R visitAngularFilterElement(AngularFilterElement element); 861 R visitAngularFilterElement(AngularFilterElement element);
865 862
866 R visitAngularModuleElement(AngularModuleElement element);
867
868 R visitAngularPropertyElement(AngularPropertyElement element); 863 R visitAngularPropertyElement(AngularPropertyElement element);
869 864
870 R visitAngularSelectorElement(AngularSelectorElement element); 865 R visitAngularSelectorElement(AngularSelectorElement element);
871 866
872 R visitClassElement(ClassElement element); 867 R visitClassElement(ClassElement element);
873 868
874 R visitCompilationUnitElement(CompilationUnitElement element); 869 R visitCompilationUnitElement(CompilationUnitElement element);
875 870
876 R visitConstructorElement(ConstructorElement element); 871 R visitConstructorElement(ConstructorElement element);
877 872
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 /** 1314 /**
1320 * Return the class defined in this library that has the given name, or `null` if this 1315 * Return the class defined in this library that has the given name, or `null` if this
1321 * library does not define a class with the given name. 1316 * library does not define a class with the given name.
1322 * 1317 *
1323 * @param className the name of the class to be returned 1318 * @param className the name of the class to be returned
1324 * @return the class with the given name that is defined in this library 1319 * @return the class with the given name that is defined in this library
1325 */ 1320 */
1326 ClassElement getType(String className); 1321 ClassElement getType(String className);
1327 1322
1328 /** 1323 /**
1324 * Return an array containing all of the compilation units this library consis ts of. This includes
1325 * the defining compilation unit and units included using the `part` directive .
1326 *
1327 * @return the compilation units this library consists of
1328 */
1329 List<CompilationUnitElement> get units;
1330
1331 /**
1329 * Return an array containing all directly and indirectly imported libraries. 1332 * Return an array containing all directly and indirectly imported libraries.
1330 * 1333 *
1331 * @return all directly and indirectly imported libraries 1334 * @return all directly and indirectly imported libraries
1332 */ 1335 */
1333 List<LibraryElement> get visibleLibraries; 1336 List<LibraryElement> get visibleLibraries;
1334 1337
1335 /** 1338 /**
1339 * Return `true` if the defining compilation unit of this library contains at least one
1340 * import directive whose URI uses the "dart-ext" scheme.
1341 */
1342 bool hasExtUri();
1343
1344 /**
1336 * Answer `true` if this library is an application that can be run in the brow ser. 1345 * Answer `true` if this library is an application that can be run in the brow ser.
1337 * 1346 *
1338 * @return `true` if this library is an application that can be run in the bro wser 1347 * @return `true` if this library is an application that can be run in the bro wser
1339 */ 1348 */
1340 bool get isBrowserApplication; 1349 bool get isBrowserApplication;
1341 1350
1342 /** 1351 /**
1343 * Return `true` if this library is the dart:core library. 1352 * Return `true` if this library is the dart:core library.
1344 * 1353 *
1345 * @return `true` if this library is the dart:core library 1354 * @return `true` if this library is the dart:core library
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1817 String get styleUri; 1826 String get styleUri;
1818 1827
1819 /** 1828 /**
1820 * Return the offset of the [getStyleUri] in the [getSource]. 1829 * Return the offset of the [getStyleUri] in the [getSource].
1821 * 1830 *
1822 * @return the offset of the style URI 1831 * @return the offset of the style URI
1823 */ 1832 */
1824 int get styleUriOffset; 1833 int get styleUriOffset;
1825 1834
1826 /** 1835 /**
1836 * Returns the HTML template [Source], `null` if not resolved.
1837 */
1838 Source get templateSource;
1839
1840 /**
1827 * Returns the HTML template URI. 1841 * Returns the HTML template URI.
1828 */ 1842 */
1829 String get templateUri; 1843 String get templateUri;
1830 1844
1831 /** 1845 /**
1832 * Return the offset of the [getTemplateUri] in the [getSource]. 1846 * Return the offset of the [getTemplateUri] in the [getSource].
1833 * 1847 *
1834 * @return the offset of the template URI 1848 * @return the offset of the template URI
1835 */ 1849 */
1836 int get templateUriOffset; 1850 int get templateUriOffset;
(...skipping 21 matching lines...) Expand all
1858 List<AngularPropertyElement> get properties; 1872 List<AngularPropertyElement> get properties;
1859 } 1873 }
1860 1874
1861 /** 1875 /**
1862 * The interface `AngularElement` defines the behavior of objects representing i nformation 1876 * The interface `AngularElement` defines the behavior of objects representing i nformation
1863 * about an Angular specific element. 1877 * about an Angular specific element.
1864 * 1878 *
1865 * @coverage dart.engine.element 1879 * @coverage dart.engine.element
1866 */ 1880 */
1867 abstract class AngularElement implements ToolkitObjectElement { 1881 abstract class AngularElement implements ToolkitObjectElement {
1882 /**
1883 * An empty array of angular elements.
1884 */
1885 static final List<AngularElement> EMPTY_ARRAY = new List<AngularElement>(0);
1868 } 1886 }
1869 1887
1870 /** 1888 /**
1871 * The interface `AngularFilterElement` defines the Angular filter described by 1889 * The interface `AngularFilterElement` defines the Angular filter described by
1872 * <code>NgFilter</code> annotation. 1890 * <code>NgFilter</code> annotation.
1873 * 1891 *
1874 * @coverage dart.engine.element 1892 * @coverage dart.engine.element
1875 */ 1893 */
1876 abstract class AngularFilterElement implements AngularElement { 1894 abstract class AngularFilterElement implements AngularElement {
1877 } 1895 }
1878 1896
1879 /** 1897 /**
1880 * The interface `AngularElement` defines the behavior of objects representing i nformation 1898 * The interface `AngularElement` defines the behavior of objects representing i nformation
1881 * about an Angular element which is applied conditionally using some [AngularSe lectorElement]. 1899 * about an Angular element which is applied conditionally using some [AngularSe lectorElement].
1882 * 1900 *
1883 * @coverage dart.engine.element 1901 * @coverage dart.engine.element
1884 */ 1902 */
1885 abstract class AngularHasSelectorElement implements AngularElement { 1903 abstract class AngularHasSelectorElement implements AngularElement {
1886 /** 1904 /**
1887 * Returns the selector specified for this element. 1905 * Returns the selector specified for this element.
1888 * 1906 *
1889 * @return the [AngularSelectorElement] specified for this element 1907 * @return the [AngularSelectorElement] specified for this element
1890 */ 1908 */
1891 AngularSelectorElement get selector; 1909 AngularSelectorElement get selector;
1892 } 1910 }
1893 1911
1894 /** 1912 /**
1895 * The interface `AngularModuleElement` defines a single DI <code>Module</code>.
1896 *
1897 * @coverage dart.engine.element
1898 */
1899 abstract class AngularModuleElement implements AngularElement {
1900 /**
1901 * An empty array of module elements.
1902 */
1903 static final List<AngularModuleElement> EMPTY_ARRAY = [];
1904
1905 /**
1906 * Returns the child modules installed into this module using <code>install</c ode>.
1907 *
1908 * @return the installed child modules
1909 */
1910 List<AngularModuleElement> get childModules;
1911
1912 /**
1913 * Returns the keys injected into this module using <code>type()</code> and <c ode>value()</code>
1914 * invocations.
1915 *
1916 * @return the injected types
1917 */
1918 List<ClassElement> get keyTypes;
1919 }
1920
1921 /**
1922 * The interface `AngularPropertyElement` defines a single property in 1913 * The interface `AngularPropertyElement` defines a single property in
1923 * [AngularComponentElement]. 1914 * [AngularComponentElement].
1924 * 1915 *
1925 * @coverage dart.engine.element 1916 * @coverage dart.engine.element
1926 */ 1917 */
1927 abstract class AngularPropertyElement implements AngularElement { 1918 abstract class AngularPropertyElement implements AngularElement {
1928 /** 1919 /**
1929 * An empty array of property elements. 1920 * An empty array of property elements.
1930 */ 1921 */
1931 static final List<AngularPropertyElement> EMPTY_ARRAY = []; 1922 static final List<AngularPropertyElement> EMPTY_ARRAY = [];
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 R visitAngularControllerElement(AngularControllerElement element) => visitAngu larHasSelectorElement(element); 2082 R visitAngularControllerElement(AngularControllerElement element) => visitAngu larHasSelectorElement(element);
2092 2083
2093 R visitAngularDirectiveElement(AngularDirectiveElement element) => visitAngula rHasSelectorElement(element); 2084 R visitAngularDirectiveElement(AngularDirectiveElement element) => visitAngula rHasSelectorElement(element);
2094 2085
2095 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele ment); 2086 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele ment);
2096 2087
2097 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme nt(element); 2088 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme nt(element);
2098 2089
2099 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn gularElement(element); 2090 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn gularElement(element);
2100 2091
2101 R visitAngularModuleElement(AngularModuleElement element) => visitAngularEleme nt(element);
2102
2103 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE lement(element); 2092 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE lement(element);
2104 2093
2105 R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularE lement(element); 2094 R visitAngularSelectorElement(AngularSelectorElement element) => visitAngularE lement(element);
2106 2095
2107 R visitClassElement(ClassElement element) => visitElement(element); 2096 R visitClassElement(ClassElement element) => visitElement(element);
2108 2097
2109 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement( element); 2098 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement( element);
2110 2099
2111 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen t(element); 2100 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen t(element);
2112 2101
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
2201 R visitAngularDirectiveElement(AngularDirectiveElement element) { 2190 R visitAngularDirectiveElement(AngularDirectiveElement element) {
2202 element.visitChildren(this); 2191 element.visitChildren(this);
2203 return null; 2192 return null;
2204 } 2193 }
2205 2194
2206 R visitAngularFilterElement(AngularFilterElement element) { 2195 R visitAngularFilterElement(AngularFilterElement element) {
2207 element.visitChildren(this); 2196 element.visitChildren(this);
2208 return null; 2197 return null;
2209 } 2198 }
2210 2199
2211 R visitAngularModuleElement(AngularModuleElement element) {
2212 element.visitChildren(this);
2213 return null;
2214 }
2215
2216 R visitAngularPropertyElement(AngularPropertyElement element) { 2200 R visitAngularPropertyElement(AngularPropertyElement element) {
2217 element.visitChildren(this); 2201 element.visitChildren(this);
2218 return null; 2202 return null;
2219 } 2203 }
2220 2204
2221 R visitAngularSelectorElement(AngularSelectorElement element) { 2205 R visitAngularSelectorElement(AngularSelectorElement element) {
2222 element.visitChildren(this); 2206 element.visitChildren(this);
2223 return null; 2207 return null;
2224 } 2208 }
2225 2209
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2344 */ 2328 */
2345 class SimpleElementVisitor<R> implements ElementVisitor<R> { 2329 class SimpleElementVisitor<R> implements ElementVisitor<R> {
2346 R visitAngularComponentElement(AngularComponentElement element) => null; 2330 R visitAngularComponentElement(AngularComponentElement element) => null;
2347 2331
2348 R visitAngularControllerElement(AngularControllerElement element) => null; 2332 R visitAngularControllerElement(AngularControllerElement element) => null;
2349 2333
2350 R visitAngularDirectiveElement(AngularDirectiveElement element) => null; 2334 R visitAngularDirectiveElement(AngularDirectiveElement element) => null;
2351 2335
2352 R visitAngularFilterElement(AngularFilterElement element) => null; 2336 R visitAngularFilterElement(AngularFilterElement element) => null;
2353 2337
2354 R visitAngularModuleElement(AngularModuleElement element) => null;
2355
2356 R visitAngularPropertyElement(AngularPropertyElement element) => null; 2338 R visitAngularPropertyElement(AngularPropertyElement element) => null;
2357 2339
2358 R visitAngularSelectorElement(AngularSelectorElement element) => null; 2340 R visitAngularSelectorElement(AngularSelectorElement element) => null;
2359 2341
2360 R visitClassElement(ClassElement element) => null; 2342 R visitClassElement(ClassElement element) => null;
2361 2343
2362 R visitCompilationUnitElement(CompilationUnitElement element) => null; 2344 R visitCompilationUnitElement(CompilationUnitElement element) => null;
2363 2345
2364 R visitConstructorElement(ConstructorElement element) => null; 2346 R visitConstructorElement(ConstructorElement element) => null;
2365 2347
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 } 2568 }
2587 } 2569 }
2588 return null; 2570 return null;
2589 } 2571 }
2590 2572
2591 ClassDeclaration get node => getNode2(ClassDeclaration); 2573 ClassDeclaration get node => getNode2(ClassDeclaration);
2592 2574
2593 PropertyAccessorElement getSetter(String setterName) { 2575 PropertyAccessorElement getSetter(String setterName) {
2594 // TODO (jwren) revisit- should we append '=' here or require clients to inc lude it? 2576 // TODO (jwren) revisit- should we append '=' here or require clients to inc lude it?
2595 // Do we need the check for isSetter below? 2577 // Do we need the check for isSetter below?
2596 if (!setterName.endsWith("=")) { 2578 if (!StringUtilities.endsWithChar(setterName, 0x3D)) {
2597 setterName += '='; 2579 setterName += '=';
2598 } 2580 }
2599 for (PropertyAccessorElement accessor in _accessors) { 2581 for (PropertyAccessorElement accessor in _accessors) {
2600 if (accessor.isSetter && accessor.name == setterName) { 2582 if (accessor.isSetter && accessor.name == setterName) {
2601 return accessor; 2583 return accessor;
2602 } 2584 }
2603 } 2585 }
2604 return null; 2586 return null;
2605 } 2587 }
2606 2588
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
3135 return ToolkitObjectElement.EMPTY_ARRAY; 3117 return ToolkitObjectElement.EMPTY_ARRAY;
3136 } 3118 }
3137 3119
3138 /** 3120 /**
3139 * Sets the toolkit objects that are associated with the given [Element]. 3121 * Sets the toolkit objects that are associated with the given [Element].
3140 * 3122 *
3141 * @param element the [Element] to associate toolkit objects with 3123 * @param element the [Element] to associate toolkit objects with
3142 * @param objects the toolkit objects to associate 3124 * @param objects the toolkit objects to associate
3143 */ 3125 */
3144 void setToolkitObjects(Element element, List<ToolkitObjectElement> objects) { 3126 void setToolkitObjects(Element element, List<ToolkitObjectElement> objects) {
3145 for (ToolkitObjectElement toolkitObject in objects) {
3146 (toolkitObject as ToolkitObjectElementImpl).enclosingElement = element;
3147 }
3148 _toolkitObjects[element] = objects; 3127 _toolkitObjects[element] = objects;
3149 } 3128 }
3150 } 3129 }
3151 3130
3152 /** 3131 /**
3153 * Instances of the class `ConstFieldElementImpl` implement a `FieldElement` for a 3132 * Instances of the class `ConstFieldElementImpl` implement a `FieldElement` for a
3154 * 'const' field that has an initializer. 3133 * 'const' field that has an initializer.
3155 */ 3134 */
3156 class ConstFieldElementImpl extends FieldElementImpl { 3135 class ConstFieldElementImpl extends FieldElementImpl {
3157 /** 3136 /**
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4644 /** 4623 /**
4645 * Initialize a newly created HTML element to have the given name. 4624 * Initialize a newly created HTML element to have the given name.
4646 * 4625 *
4647 * @param context the analysis context in which the HTML file is defined 4626 * @param context the analysis context in which the HTML file is defined
4648 * @param name the name of this element 4627 * @param name the name of this element
4649 */ 4628 */
4650 HtmlElementImpl(this.context, String name) : super.con2(name, -1); 4629 HtmlElementImpl(this.context, String name) : super.con2(name, -1);
4651 4630
4652 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); 4631 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this);
4653 4632
4654 bool operator ==(Object object) => runtimeType == object.runtimeType && source == (object as CompilationUnitElementImpl).source; 4633 bool operator ==(Object object) {
4634 if (identical(object, this)) {
4635 return true;
4636 }
4637 if (object == null) {
4638 return false;
4639 }
4640 return runtimeType == object.runtimeType && source == (object as HtmlElement Impl).source;
4641 }
4655 4642
4656 ElementKind get kind => ElementKind.HTML; 4643 ElementKind get kind => ElementKind.HTML;
4657 4644
4658 List<HtmlScriptElement> get scripts => _scripts; 4645 List<HtmlScriptElement> get scripts => _scripts;
4659 4646
4660 int get hashCode => source.hashCode; 4647 int get hashCode => source.hashCode;
4661 4648
4662 /** 4649 /**
4663 * Set the scripts contained in the HTML file to the given scripts. 4650 * Set the scripts contained in the HTML file to the given scripts.
4664 * 4651 *
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
4999 } 4986 }
5000 for (CompilationUnitElement part in _parts) { 4987 for (CompilationUnitElement part in _parts) {
5001 type = part.getType(className); 4988 type = part.getType(className);
5002 if (type != null) { 4989 if (type != null) {
5003 return type; 4990 return type;
5004 } 4991 }
5005 } 4992 }
5006 return null; 4993 return null;
5007 } 4994 }
5008 4995
4996 List<CompilationUnitElement> get units {
4997 List<CompilationUnitElement> units = new List<CompilationUnitElement>(1 + _p arts.length);
4998 units[0] = _definingCompilationUnit;
4999 JavaSystem.arraycopy(_parts, 0, units, 1, _parts.length);
5000 return units;
5001 }
5002
5009 List<LibraryElement> get visibleLibraries { 5003 List<LibraryElement> get visibleLibraries {
5010 Set<LibraryElement> visibleLibraries = new Set(); 5004 Set<LibraryElement> visibleLibraries = new Set();
5011 addVisibleLibraries(visibleLibraries, false); 5005 addVisibleLibraries(visibleLibraries, false);
5012 return new List.from(visibleLibraries); 5006 return new List.from(visibleLibraries);
5013 } 5007 }
5014 5008
5009 bool hasExtUri() => hasModifier(Modifier.HAS_EXT_URI);
5010
5015 int get hashCode => _definingCompilationUnit.hashCode; 5011 int get hashCode => _definingCompilationUnit.hashCode;
5016 5012
5017 bool get isBrowserApplication => entryPoint != null && isOrImportsBrowserLibra ry; 5013 bool get isBrowserApplication => entryPoint != null && isOrImportsBrowserLibra ry;
5018 5014
5019 bool get isDartCore => name == "dart.core"; 5015 bool get isDartCore => name == "dart.core";
5020 5016
5021 bool get isInSdk => name.startsWith("dart."); 5017 bool get isInSdk => StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x7 4, 0x2E);
5022 5018
5023 bool isUpToDate2(int timeStamp) { 5019 bool isUpToDate2(int timeStamp) {
5024 Set<LibraryElement> visitedLibraries = new Set(); 5020 Set<LibraryElement> visitedLibraries = new Set();
5025 return isUpToDate(this, timeStamp, visitedLibraries); 5021 return isUpToDate(this, timeStamp, visitedLibraries);
5026 } 5022 }
5027 5023
5028 /** 5024 /**
5029 * Set the compilation unit that defines this library to the given compilation unit. 5025 * Set the compilation unit that defines this library to the given compilation unit.
5030 * 5026 *
5031 * @param definingCompilationUnit the compilation unit that defines this libra ry 5027 * @param definingCompilationUnit the compilation unit that defines this libra ry
5032 */ 5028 */
5033 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni t) { 5029 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni t) {
5034 (definingCompilationUnit as CompilationUnitElementImpl).enclosingElement = t his; 5030 (definingCompilationUnit as CompilationUnitElementImpl).enclosingElement = t his;
5035 this._definingCompilationUnit = definingCompilationUnit; 5031 this._definingCompilationUnit = definingCompilationUnit;
5036 } 5032 }
5037 5033
5038 /** 5034 /**
5039 * Set the specifications of all of the exports defined in this library to the given array. 5035 * Set the specifications of all of the exports defined in this library to the given array.
5040 * 5036 *
5041 * @param exports the specifications of all of the exports defined in this lib rary 5037 * @param exports the specifications of all of the exports defined in this lib rary
5042 */ 5038 */
5043 void set exports(List<ExportElement> exports) { 5039 void set exports(List<ExportElement> exports) {
5044 for (ExportElement exportElement in exports) { 5040 for (ExportElement exportElement in exports) {
5045 (exportElement as ExportElementImpl).enclosingElement = this; 5041 (exportElement as ExportElementImpl).enclosingElement = this;
5046 } 5042 }
5047 this._exports = exports; 5043 this._exports = exports;
5048 } 5044 }
5049 5045
5050 /** 5046 /**
5047 * Set whether this library has an import of a "dart-ext" URI to the given val ue.
5048 *
5049 * @param hasExtUri `true` if this library has an import of a "dart-ext" URI
5050 */
5051 void set hasExtUri2(bool hasExtUri) {
Brian Wilkerson 2014/01/27 22:58:27 For future consideration: I'm not sure how often I
5052 setModifier(Modifier.HAS_EXT_URI, hasExtUri);
5053 }
5054
5055 /**
5051 * Set the specifications of all of the imports defined in this library to the given array. 5056 * Set the specifications of all of the imports defined in this library to the given array.
5052 * 5057 *
5053 * @param imports the specifications of all of the imports defined in this lib rary 5058 * @param imports the specifications of all of the imports defined in this lib rary
5054 */ 5059 */
5055 void set imports(List<ImportElement> imports) { 5060 void set imports(List<ImportElement> imports) {
5056 for (ImportElement importElement in imports) { 5061 for (ImportElement importElement in imports) {
5057 (importElement as ImportElementImpl).enclosingElement = this; 5062 (importElement as ImportElementImpl).enclosingElement = this;
5058 PrefixElementImpl prefix = importElement.prefix as PrefixElementImpl; 5063 PrefixElementImpl prefix = importElement.prefix as PrefixElementImpl;
5059 if (prefix != null) { 5064 if (prefix != null) {
5060 prefix.enclosingElement = this; 5065 prefix.enclosingElement = this;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
5337 } 5342 }
5338 } 5343 }
5339 5344
5340 /** 5345 /**
5341 * The enumeration `Modifier` defines constants for all of the modifiers defined by the Dart 5346 * The enumeration `Modifier` defines constants for all of the modifiers defined by the Dart
5342 * language and for a few additional flags that are useful. 5347 * language and for a few additional flags that are useful.
5343 * 5348 *
5344 * @coverage dart.engine.element 5349 * @coverage dart.engine.element
5345 */ 5350 */
5346 class Modifier extends Enum<Modifier> { 5351 class Modifier extends Enum<Modifier> {
5352 /**
5353 * Indicates that the modifier 'abstract' was applied to the element.
5354 */
5347 static final Modifier ABSTRACT = new Modifier('ABSTRACT', 0); 5355 static final Modifier ABSTRACT = new Modifier('ABSTRACT', 0);
5348 5356
5357 /**
5358 * Indicates that the modifier 'const' was applied to the element.
5359 */
5349 static final Modifier CONST = new Modifier('CONST', 1); 5360 static final Modifier CONST = new Modifier('CONST', 1);
5350 5361
5362 /**
5363 * Indicates that the modifier 'factory' was applied to the element.
5364 */
5351 static final Modifier FACTORY = new Modifier('FACTORY', 2); 5365 static final Modifier FACTORY = new Modifier('FACTORY', 2);
5352 5366
5367 /**
5368 * Indicates that the modifier 'final' was applied to the element.
5369 */
5353 static final Modifier FINAL = new Modifier('FINAL', 3); 5370 static final Modifier FINAL = new Modifier('FINAL', 3);
5354 5371
5372 /**
5373 * Indicates that the pseudo-modifier 'get' was applied to the element.
5374 */
5355 static final Modifier GETTER = new Modifier('GETTER', 4); 5375 static final Modifier GETTER = new Modifier('GETTER', 4);
5356 5376
5357 static final Modifier MIXIN = new Modifier('MIXIN', 5); 5377 /**
5378 * A flag used for libraries indicating that the defining compilation unit con tains at least one
5379 * import directive whose URI uses the "dart-ext" scheme.
5380 */
5381 static final Modifier HAS_EXT_URI = new Modifier('HAS_EXT_URI', 5);
5358 5382
5359 static final Modifier REFERENCES_SUPER = new Modifier('REFERENCES_SUPER', 6); 5383 static final Modifier MIXIN = new Modifier('MIXIN', 6);
5360 5384
5361 static final Modifier SETTER = new Modifier('SETTER', 7); 5385 static final Modifier REFERENCES_SUPER = new Modifier('REFERENCES_SUPER', 7);
5362 5386
5363 static final Modifier STATIC = new Modifier('STATIC', 8); 5387 /**
5388 * Indicates that the pseudo-modifier 'set' was applied to the element.
5389 */
5390 static final Modifier SETTER = new Modifier('SETTER', 8);
5364 5391
5365 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9); 5392 /**
5393 * Indicates that the modifier 'static' was applied to the element.
5394 */
5395 static final Modifier STATIC = new Modifier('STATIC', 9);
5366 5396
5367 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10); 5397 /**
5398 * Indicates that the element does not appear in the source code but was impli citly created. For
5399 * example, if a class does not define any constructors, an implicit zero-argu ment constructor
5400 * will be created and it will be marked as being synthetic.
5401 */
5402 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 10);
5403
5404 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 11);
5368 5405
5369 static final List<Modifier> values = [ 5406 static final List<Modifier> values = [
5370 ABSTRACT, 5407 ABSTRACT,
5371 CONST, 5408 CONST,
5372 FACTORY, 5409 FACTORY,
5373 FINAL, 5410 FINAL,
5374 GETTER, 5411 GETTER,
5412 HAS_EXT_URI,
5375 MIXIN, 5413 MIXIN,
5376 REFERENCES_SUPER, 5414 REFERENCES_SUPER,
5377 SETTER, 5415 SETTER,
5378 STATIC, 5416 STATIC,
5379 SYNTHETIC, 5417 SYNTHETIC,
5380 TYPEDEF]; 5418 TYPEDEF];
5381 5419
5382 Modifier(String name, int ordinal) : super(name, ordinal); 5420 Modifier(String name, int ordinal) : super(name, ordinal);
5383 } 5421 }
5384 5422
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
6214 * The offset of the [styleUri] in the [getSource]. 6252 * The offset of the [styleUri] in the [getSource].
6215 */ 6253 */
6216 int styleUriOffset = 0; 6254 int styleUriOffset = 0;
6217 6255
6218 /** 6256 /**
6219 * The HTML template URI. 6257 * The HTML template URI.
6220 */ 6258 */
6221 String templateUri; 6259 String templateUri;
6222 6260
6223 /** 6261 /**
6262 * The HTML template source.
6263 */
6264 Source templateSource;
6265
6266 /**
6224 * The offset of the [templateUri] in the [getSource]. 6267 * The offset of the [templateUri] in the [getSource].
6225 */ 6268 */
6226 int templateUriOffset = 0; 6269 int templateUriOffset = 0;
6227 6270
6228 /** 6271 /**
6229 * Initialize a newly created Angular component to have the given name. 6272 * Initialize a newly created Angular component to have the given name.
6230 * 6273 *
6231 * @param name the name of this element 6274 * @param name the name of this element
6232 * @param nameOffset the offset of the name of this element in the file that c ontains the 6275 * @param nameOffset the offset of the name of this element in the file that c ontains the
6233 * declaration of this element 6276 * declaration of this element
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
6399 this._selector = selector; 6442 this._selector = selector;
6400 } 6443 }
6401 6444
6402 void visitChildren(ElementVisitor visitor) { 6445 void visitChildren(ElementVisitor visitor) {
6403 safelyVisitChild(_selector, visitor); 6446 safelyVisitChild(_selector, visitor);
6404 super.visitChildren(visitor); 6447 super.visitChildren(visitor);
6405 } 6448 }
6406 } 6449 }
6407 6450
6408 /** 6451 /**
6409 * Implementation of `AngularModuleElement`.
6410 *
6411 * @coverage dart.engine.element
6412 */
6413 class AngularModuleElementImpl extends AngularElementImpl implements AngularModu leElement {
6414 /**
6415 * The array containing all of the child modules.
6416 */
6417 List<AngularModuleElement> childModules = AngularModuleElement.EMPTY_ARRAY;
6418
6419 /**
6420 * The array containing all of the types used as injection keys.
6421 */
6422 List<ClassElement> keyTypes = ClassElementImpl.EMPTY_ARRAY;
6423
6424 /**
6425 * Initialize a newly created Angular module.
6426 */
6427 AngularModuleElementImpl() : super(null, -1);
6428
6429 accept(ElementVisitor visitor) => visitor.visitAngularModuleElement(this);
6430
6431 ElementKind get kind => ElementKind.ANGULAR_MODULE;
6432 }
6433
6434 /**
6435 * Implementation of `AngularPropertyElement`. 6452 * Implementation of `AngularPropertyElement`.
6436 * 6453 *
6437 * @coverage dart.engine.element 6454 * @coverage dart.engine.element
6438 */ 6455 */
6439 class AngularPropertyElementImpl extends AngularElementImpl implements AngularPr opertyElement { 6456 class AngularPropertyElementImpl extends AngularElementImpl implements AngularPr opertyElement {
6440 /** 6457 /**
6441 * The [FieldElement] to which this property is bound. 6458 * The [FieldElement] to which this property is bound.
6442 */ 6459 */
6443 FieldElement field; 6460 FieldElement field;
6444 6461
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
9563 9580
9564 /** 9581 /**
9565 * The interface `VoidType` defines the behavior of the unique object representi ng the type 9582 * The interface `VoidType` defines the behavior of the unique object representi ng the type
9566 * `void`. 9583 * `void`.
9567 * 9584 *
9568 * @coverage dart.engine.type 9585 * @coverage dart.engine.type
9569 */ 9586 */
9570 abstract class VoidType implements Type2 { 9587 abstract class VoidType implements Type2 {
9571 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 9588 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
9572 } 9589 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698