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

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

Issue 247053004: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // 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 XmlAttributeNode, XmlTagNode; 18 import 'html.dart' show XmlAttributeNode, XmlTagNode;
19 import 'engine.dart' show AnalysisContext; 19 import 'engine.dart' show AnalysisContext, AnalysisEngine, AnalysisException;
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 abstract class ClassElement implements Element { 26 abstract class ClassElement implements Element {
27 /** 27 /**
28 * Return an array containing all of the accessors (getters and setters) decla red in this class. 28 * Return an array containing all of the accessors (getters and setters) decla red in this class.
29 * 29 *
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 * @return `true` if this annotation marks the associated class as implementin g a proxy 733 * @return `true` if this annotation marks the associated class as implementin g a proxy
734 * object 734 * object
735 */ 735 */
736 bool get isProxy; 736 bool get isProxy;
737 } 737 }
738 738
739 /** 739 /**
740 * The enumeration `ElementKind` defines the various kinds of elements in the el ement model. 740 * The enumeration `ElementKind` defines the various kinds of elements in the el ement model.
741 */ 741 */
742 class ElementKind extends Enum<ElementKind> { 742 class ElementKind extends Enum<ElementKind> {
743 static const ElementKind ANGULAR_FILTER = const ElementKind('ANGULAR_FILTER', 0, "Angular filter"); 743 static const ElementKind ANGULAR_FORMATTER = const ElementKind('ANGULAR_FORMAT TER', 0, "Angular formatter");
744 744
745 static const ElementKind ANGULAR_COMPONENT = const ElementKind('ANGULAR_COMPON ENT', 1, "Angular component"); 745 static const ElementKind ANGULAR_COMPONENT = const ElementKind('ANGULAR_COMPON ENT', 1, "Angular component");
746 746
747 static const ElementKind ANGULAR_CONTROLLER = const ElementKind('ANGULAR_CONTR OLLER', 2, "Angular controller"); 747 static const ElementKind ANGULAR_CONTROLLER = const ElementKind('ANGULAR_CONTR OLLER', 2, "Angular controller");
748 748
749 static const ElementKind ANGULAR_DIRECTIVE = const ElementKind('ANGULAR_DIRECT IVE', 3, "Angular directive"); 749 static const ElementKind ANGULAR_DIRECTIVE = const ElementKind('ANGULAR_DIRECT IVE', 3, "Angular directive");
750 750
751 static const ElementKind ANGULAR_PROPERTY = const ElementKind('ANGULAR_PROPERT Y', 4, "Angular property"); 751 static const ElementKind ANGULAR_PROPERTY = const ElementKind('ANGULAR_PROPERT Y', 4, "Angular property");
752 752
753 static const ElementKind ANGULAR_SCOPE_PROPERTY = const ElementKind('ANGULAR_S COPE_PROPERTY', 5, "Angular scope property"); 753 static const ElementKind ANGULAR_SCOPE_PROPERTY = const ElementKind('ANGULAR_S COPE_PROPERTY', 5, "Angular scope property");
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 806
807 static const ElementKind TOP_LEVEL_VARIABLE = const ElementKind('TOP_LEVEL_VAR IABLE', 32, "top level variable"); 807 static const ElementKind TOP_LEVEL_VARIABLE = const ElementKind('TOP_LEVEL_VAR IABLE', 32, "top level variable");
808 808
809 static const ElementKind FUNCTION_TYPE_ALIAS = const ElementKind('FUNCTION_TYP E_ALIAS', 33, "function type alias"); 809 static const ElementKind FUNCTION_TYPE_ALIAS = const ElementKind('FUNCTION_TYP E_ALIAS', 33, "function type alias");
810 810
811 static const ElementKind TYPE_PARAMETER = const ElementKind('TYPE_PARAMETER', 34, "type parameter"); 811 static const ElementKind TYPE_PARAMETER = const ElementKind('TYPE_PARAMETER', 34, "type parameter");
812 812
813 static const ElementKind UNIVERSE = const ElementKind('UNIVERSE', 35, "<univer se>"); 813 static const ElementKind UNIVERSE = const ElementKind('UNIVERSE', 35, "<univer se>");
814 814
815 static const List<ElementKind> values = const [ 815 static const List<ElementKind> values = const [
816 ANGULAR_FILTER, 816 ANGULAR_FORMATTER,
817 ANGULAR_COMPONENT, 817 ANGULAR_COMPONENT,
818 ANGULAR_CONTROLLER, 818 ANGULAR_CONTROLLER,
819 ANGULAR_DIRECTIVE, 819 ANGULAR_DIRECTIVE,
820 ANGULAR_PROPERTY, 820 ANGULAR_PROPERTY,
821 ANGULAR_SCOPE_PROPERTY, 821 ANGULAR_SCOPE_PROPERTY,
822 ANGULAR_SELECTOR, 822 ANGULAR_SELECTOR,
823 ANGULAR_VIEW, 823 ANGULAR_VIEW,
824 CLASS, 824 CLASS,
825 COMPILATION_UNIT, 825 COMPILATION_UNIT,
826 CONSTRUCTOR, 826 CONSTRUCTOR,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 893
894 /** 894 /**
895 * The interface `ElementVisitor` defines the behavior of objects that can be us ed to visit an 895 * The interface `ElementVisitor` defines the behavior of objects that can be us ed to visit an
896 * element structure. 896 * element structure.
897 */ 897 */
898 abstract class ElementVisitor<R> { 898 abstract class ElementVisitor<R> {
899 R visitAngularComponentElement(AngularComponentElement element); 899 R visitAngularComponentElement(AngularComponentElement element);
900 900
901 R visitAngularControllerElement(AngularControllerElement element); 901 R visitAngularControllerElement(AngularControllerElement element);
902 902
903 R visitAngularDirectiveElement(AngularDirectiveElement element); 903 R visitAngularDirectiveElement(AngularDecoratorElement element);
904 904
905 R visitAngularFilterElement(AngularFilterElement element); 905 R visitAngularFormatterElement(AngularFormatterElement element);
906 906
907 R visitAngularPropertyElement(AngularPropertyElement element); 907 R visitAngularPropertyElement(AngularPropertyElement element);
908 908
909 R visitAngularScopePropertyElement(AngularScopePropertyElement element); 909 R visitAngularScopePropertyElement(AngularScopePropertyElement element);
910 910
911 R visitAngularSelectorElement(AngularSelectorElement element); 911 R visitAngularSelectorElement(AngularSelectorElement element);
912 912
913 R visitAngularViewElement(AngularViewElement element); 913 R visitAngularViewElement(AngularViewElement element);
914 914
915 R visitClassElement(ClassElement element); 915 R visitClassElement(ClassElement element);
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 List<LibraryElement> get importedLibraries; 1339 List<LibraryElement> get importedLibraries;
1340 1340
1341 /** 1341 /**
1342 * Return an array containing all of the imports defined in this library. 1342 * Return an array containing all of the imports defined in this library.
1343 * 1343 *
1344 * @return the imports defined in this library 1344 * @return the imports defined in this library
1345 */ 1345 */
1346 List<ImportElement> get imports; 1346 List<ImportElement> get imports;
1347 1347
1348 /** 1348 /**
1349 * Return an array containing all of the imports that share the given prefix, or an empty array if
1350 * there are no such imports.
1351 *
1352 * @param prefixElement the prefix element shared by the returned imports
1353 */
1354 List<ImportElement> getImportsWithPrefix(PrefixElement prefixElement);
1355
1356 /**
1357 * Return the element representing the synthetic function `loadLibrary` that i s implicitly
1358 * defined for this library if the library is imported using a deferred import .
1359 */
1360 FunctionElement get loadLibraryFunction;
1361
1362 /**
1349 * Return an array containing all of the compilation units that are included i n this library using 1363 * Return an array containing all of the compilation units that are included i n this library using
1350 * a `part` directive. This does not include the defining compilation unit tha t contains the 1364 * a `part` directive. This does not include the defining compilation unit tha t contains the
1351 * `part` directives. 1365 * `part` directives.
1352 * 1366 *
1353 * @return the compilation units that are included in this library 1367 * @return the compilation units that are included in this library
1354 */ 1368 */
1355 List<CompilationUnitElement> get parts; 1369 List<CompilationUnitElement> get parts;
1356 1370
1357 /** 1371 /**
1358 * Return an array containing elements for each of the prefixes used to `impor t` libraries 1372 * Return an array containing elements for each of the prefixes used to `impor t` libraries
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1401 1415
1402 /** 1416 /**
1403 * Return `true` if this library is created for Angular analysis. If this libr ary has not 1417 * Return `true` if this library is created for Angular analysis. If this libr ary has not
1404 * yet had toolkit references resolved, then `false` will be returned. 1418 * yet had toolkit references resolved, then `false` will be returned.
1405 * 1419 *
1406 * @return `true` if this library is created for Angular analysis 1420 * @return `true` if this library is created for Angular analysis
1407 */ 1421 */
1408 bool get isAngularHtml; 1422 bool get isAngularHtml;
1409 1423
1410 /** 1424 /**
1411 * Answer `true` if this library is an application that can be run in the brow ser. 1425 * Return `true` if this library is an application that can be run in the brow ser.
1412 * 1426 *
1413 * @return `true` if this library is an application that can be run in the bro wser 1427 * @return `true` if this library is an application that can be run in the bro wser
1414 */ 1428 */
1415 bool get isBrowserApplication; 1429 bool get isBrowserApplication;
1416 1430
1417 /** 1431 /**
1418 * Return `true` if this library is the dart:core library. 1432 * Return `true` if this library is the dart:core library.
1419 * 1433 *
1420 * @return `true` if this library is the dart:core library 1434 * @return `true` if this library is the dart:core library
1421 */ 1435 */
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 * declared with the 'const' modifier will return `false` even though they are implicitly 1878 * declared with the 'const' modifier will return `false` even though they are implicitly
1865 * final. 1879 * final.
1866 * 1880 *
1867 * @return `true` if this variable was declared with the 'final' modifier 1881 * @return `true` if this variable was declared with the 'final' modifier
1868 */ 1882 */
1869 bool get isFinal; 1883 bool get isFinal;
1870 } 1884 }
1871 1885
1872 /** 1886 /**
1873 * The interface `AngularControllerElement` defines the Angular component descri bed by 1887 * The interface `AngularControllerElement` defines the Angular component descri bed by
1874 * <code>NgComponent</code> annotation. 1888 * <code>Component</code> annotation.
1875 */ 1889 */
1876 abstract class AngularComponentElement implements AngularHasSelectorElement, Ang ularHasTemplateElement { 1890 abstract class AngularComponentElement implements AngularHasSelectorElement, Ang ularHasTemplateElement {
1877 /** 1891 /**
1878 * Return an array containing all of the properties declared by this component . 1892 * Return an array containing all of the properties declared by this component .
1879 */ 1893 */
1880 List<AngularPropertyElement> get properties; 1894 List<AngularPropertyElement> get properties;
1881 1895
1882 /** 1896 /**
1883 * Return an array containing all of the scope properties set in the implement ation of this 1897 * Return an array containing all of the scope properties set in the implement ation of this
1884 * component. 1898 * component.
1885 */ 1899 */
1886 List<AngularScopePropertyElement> get scopeProperties; 1900 List<AngularScopePropertyElement> get scopeProperties;
1887 1901
1888 /** 1902 /**
1889 * Returns the CSS file URI. 1903 * Returns the CSS file URI.
1890 */ 1904 */
1891 String get styleUri; 1905 String get styleUri;
1892 1906
1893 /** 1907 /**
1894 * Return the offset of the [getStyleUri] in the [getSource]. 1908 * Return the offset of the [getStyleUri] in the [getSource].
1895 * 1909 *
1896 * @return the offset of the style URI 1910 * @return the offset of the style URI
1897 */ 1911 */
1898 int get styleUriOffset; 1912 int get styleUriOffset;
1899 } 1913 }
1900 1914
1901 /** 1915 /**
1902 * The interface `AngularControllerElement` defines the Angular controller descr ibed by 1916 * The interface `AngularControllerElement` defines the Angular controller descr ibed by
1903 * <code>NgController</code> annotation. 1917 * <code>Controller</code> annotation.
1904 */ 1918 */
1905 abstract class AngularControllerElement implements AngularHasSelectorElement { 1919 abstract class AngularControllerElement implements AngularHasSelectorElement {
1906 } 1920 }
1907 1921
1908 /** 1922 /**
1909 * The interface `AngularDirectiveElement` defines the Angular controller descri bed by 1923 * The interface `AngularDirectiveElement` defines the Angular controller descri bed by
1910 * <code>NgDirective</code> annotation. 1924 * <code>Decorator</code> annotation.
1911 */ 1925 */
1912 abstract class AngularDirectiveElement implements AngularHasSelectorElement { 1926 abstract class AngularDecoratorElement implements AngularHasSelectorElement {
1913 /** 1927 /**
1914 * Return an array containing all of the properties declared by this directive . 1928 * Return an array containing all of the properties declared by this directive .
1915 */ 1929 */
1916 List<AngularPropertyElement> get properties; 1930 List<AngularPropertyElement> get properties;
1917 1931
1918 /** 1932 /**
1919 * Checks if this directive is implemented by the class with given name. 1933 * Checks if this directive is implemented by the class with given name.
1920 */ 1934 */
1921 bool isClass(String name); 1935 bool isClass(String name);
1922 } 1936 }
(...skipping 10 matching lines...) Expand all
1933 1947
1934 /** 1948 /**
1935 * Returns the [AngularApplication] this element is used in. 1949 * Returns the [AngularApplication] this element is used in.
1936 * 1950 *
1937 * @return the [AngularApplication] this element is used in 1951 * @return the [AngularApplication] this element is used in
1938 */ 1952 */
1939 AngularApplication get application; 1953 AngularApplication get application;
1940 } 1954 }
1941 1955
1942 /** 1956 /**
1943 * The interface `AngularFilterElement` defines the Angular filter described by 1957 * The interface `AngularFormatterElement` defines the Angular formatter describ ed by
1944 * <code>NgFilter</code> annotation. 1958 * <code>Formatter</code> annotation.
1945 */ 1959 */
1946 abstract class AngularFilterElement implements AngularElement { 1960 abstract class AngularFormatterElement implements AngularElement {
1947 } 1961 }
1948 1962
1949 /** 1963 /**
1950 * [AngularSelectorElement] based on presence of attribute. 1964 * [AngularSelectorElement] based on presence of attribute.
1951 */ 1965 */
1952 abstract class AngularHasAttributeSelectorElement implements AngularSelectorElem ent { 1966 abstract class AngularHasAttributeSelectorElement implements AngularSelectorElem ent {
1953 } 1967 }
1954 1968
1955 /** 1969 /**
1956 * [AngularSelectorElement] based on presence of a class. 1970 * [AngularSelectorElement] based on presence of a class.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 * to not be visited. 2288 * to not be visited.
2275 */ 2289 */
2276 class GeneralizingElementVisitor<R> implements ElementVisitor<R> { 2290 class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
2277 @override 2291 @override
2278 R visitAngularComponentElement(AngularComponentElement element) => visitAngula rHasSelectorElement(element); 2292 R visitAngularComponentElement(AngularComponentElement element) => visitAngula rHasSelectorElement(element);
2279 2293
2280 @override 2294 @override
2281 R visitAngularControllerElement(AngularControllerElement element) => visitAngu larHasSelectorElement(element); 2295 R visitAngularControllerElement(AngularControllerElement element) => visitAngu larHasSelectorElement(element);
2282 2296
2283 @override 2297 @override
2284 R visitAngularDirectiveElement(AngularDirectiveElement element) => visitAngula rHasSelectorElement(element); 2298 R visitAngularDirectiveElement(AngularDecoratorElement element) => visitAngula rHasSelectorElement(element);
2285 2299
2286 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele ment); 2300 R visitAngularElement(AngularElement element) => visitToolkitObjectElement(ele ment);
2287 2301
2288 @override 2302 @override
2289 R visitAngularFilterElement(AngularFilterElement element) => visitAngularEleme nt(element); 2303 R visitAngularFormatterElement(AngularFormatterElement element) => visitAngula rElement(element);
2290 2304
2291 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn gularElement(element); 2305 R visitAngularHasSelectorElement(AngularHasSelectorElement element) => visitAn gularElement(element);
2292 2306
2293 @override 2307 @override
2294 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE lement(element); 2308 R visitAngularPropertyElement(AngularPropertyElement element) => visitAngularE lement(element);
2295 2309
2296 @override 2310 @override
2297 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => vis itAngularElement(element); 2311 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => vis itAngularElement(element);
2298 2312
2299 @override 2313 @override
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2423 return null; 2437 return null;
2424 } 2438 }
2425 2439
2426 @override 2440 @override
2427 R visitAngularControllerElement(AngularControllerElement element) { 2441 R visitAngularControllerElement(AngularControllerElement element) {
2428 element.visitChildren(this); 2442 element.visitChildren(this);
2429 return null; 2443 return null;
2430 } 2444 }
2431 2445
2432 @override 2446 @override
2433 R visitAngularDirectiveElement(AngularDirectiveElement element) { 2447 R visitAngularDirectiveElement(AngularDecoratorElement element) {
2434 element.visitChildren(this); 2448 element.visitChildren(this);
2435 return null; 2449 return null;
2436 } 2450 }
2437 2451
2438 @override 2452 @override
2439 R visitAngularFilterElement(AngularFilterElement element) { 2453 R visitAngularFormatterElement(AngularFormatterElement element) {
2440 element.visitChildren(this); 2454 element.visitChildren(this);
2441 return null; 2455 return null;
2442 } 2456 }
2443 2457
2444 @override 2458 @override
2445 R visitAngularPropertyElement(AngularPropertyElement element) { 2459 R visitAngularPropertyElement(AngularPropertyElement element) {
2446 element.visitChildren(this); 2460 element.visitChildren(this);
2447 return null; 2461 return null;
2448 } 2462 }
2449 2463
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
2623 * whole structure) and that only need to visit a small number of element types. 2637 * whole structure) and that only need to visit a small number of element types.
2624 */ 2638 */
2625 class SimpleElementVisitor<R> implements ElementVisitor<R> { 2639 class SimpleElementVisitor<R> implements ElementVisitor<R> {
2626 @override 2640 @override
2627 R visitAngularComponentElement(AngularComponentElement element) => null; 2641 R visitAngularComponentElement(AngularComponentElement element) => null;
2628 2642
2629 @override 2643 @override
2630 R visitAngularControllerElement(AngularControllerElement element) => null; 2644 R visitAngularControllerElement(AngularControllerElement element) => null;
2631 2645
2632 @override 2646 @override
2633 R visitAngularDirectiveElement(AngularDirectiveElement element) => null; 2647 R visitAngularDirectiveElement(AngularDecoratorElement element) => null;
2634 2648
2635 @override 2649 @override
2636 R visitAngularFilterElement(AngularFilterElement element) => null; 2650 R visitAngularFormatterElement(AngularFormatterElement element) => null;
2637 2651
2638 @override 2652 @override
2639 R visitAngularPropertyElement(AngularPropertyElement element) => null; 2653 R visitAngularPropertyElement(AngularPropertyElement element) => null;
2640 2654
2641 @override 2655 @override
2642 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => nul l; 2656 R visitAngularScopePropertyElement(AngularScopePropertyElement element) => nul l;
2643 2657
2644 @override 2658 @override
2645 R visitAngularSelectorElement(AngularSelectorElement element) => null; 2659 R visitAngularSelectorElement(AngularSelectorElement element) => null;
2646 2660
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 /** 3677 /**
3664 * The constructor to which this constructor is redirecting. 3678 * The constructor to which this constructor is redirecting.
3665 */ 3679 */
3666 ConstructorElement redirectedConstructor; 3680 ConstructorElement redirectedConstructor;
3667 3681
3668 /** 3682 /**
3669 * Initialize a newly created constructor element to have the given name. 3683 * Initialize a newly created constructor element to have the given name.
3670 * 3684 *
3671 * @param name the name of this element 3685 * @param name the name of this element
3672 */ 3686 */
3673 ConstructorElementImpl.con1(Identifier name) : super.con1(name); 3687 ConstructorElementImpl.forNode(Identifier name) : super.forNode(name);
3674 3688
3675 /** 3689 /**
3676 * Initialize a newly created constructor element to have the given name. 3690 * Initialize a newly created constructor element to have the given name.
3677 * 3691 *
3678 * @param name the name of this element 3692 * @param name the name of this element
3679 * @param nameOffset the offset of the name of this element in the file that c ontains the 3693 * @param nameOffset the offset of the name of this element in the file that c ontains the
3680 * declaration of this element 3694 * declaration of this element
3681 */ 3695 */
3682 ConstructorElementImpl.con2(String name, int nameOffset) : super.con2(name, na meOffset); 3696 ConstructorElementImpl(String name, int nameOffset) : super(name, nameOffset);
3683 3697
3684 @override 3698 @override
3685 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this); 3699 accept(ElementVisitor visitor) => visitor.visitConstructorElement(this);
3686 3700
3687 @override 3701 @override
3688 ClassElement get enclosingElement => super.enclosingElement as ClassElement; 3702 ClassElement get enclosingElement => super.enclosingElement as ClassElement;
3689 3703
3690 @override 3704 @override
3691 ElementKind get kind => ElementKind.CONSTRUCTOR; 3705 ElementKind get kind => ElementKind.CONSTRUCTOR;
3692 3706
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
4565 /** 4579 /**
4566 * An empty array of executable elements. 4580 * An empty array of executable elements.
4567 */ 4581 */
4568 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); 4582 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0);
4569 4583
4570 /** 4584 /**
4571 * Initialize a newly created executable element to have the given name. 4585 * Initialize a newly created executable element to have the given name.
4572 * 4586 *
4573 * @param name the name of this element 4587 * @param name the name of this element
4574 */ 4588 */
4575 ExecutableElementImpl.con1(Identifier name) : super.forNode(name); 4589 ExecutableElementImpl.forNode(Identifier name) : super.forNode(name);
4576 4590
4577 /** 4591 /**
4578 * Initialize a newly created executable element to have the given name. 4592 * Initialize a newly created executable element to have the given name.
4579 * 4593 *
4580 * @param name the name of this element 4594 * @param name the name of this element
4581 * @param nameOffset the offset of the name of this element in the file that c ontains the 4595 * @param nameOffset the offset of the name of this element in the file that c ontains the
4582 * declaration of this element 4596 * declaration of this element
4583 */ 4597 */
4584 ExecutableElementImpl.con2(String name, int nameOffset) : super(name, nameOffs et); 4598 ExecutableElementImpl(String name, int nameOffset) : super(name, nameOffset);
4585 4599
4586 @override 4600 @override
4587 ElementImpl getChild(String identifier) { 4601 ElementImpl getChild(String identifier) {
4588 for (ExecutableElement function in _functions) { 4602 for (ExecutableElement function in _functions) {
4589 if ((function as ExecutableElementImpl).identifier == identifier) { 4603 if ((function as ExecutableElementImpl).identifier == identifier) {
4590 return function as ExecutableElementImpl; 4604 return function as ExecutableElementImpl;
4591 } 4605 }
4592 } 4606 }
4593 for (LabelElement label in _labels) { 4607 for (LabelElement label in _labels) {
4594 if ((label as LabelElementImpl).identifier == identifier) { 4608 if ((label as LabelElementImpl).identifier == identifier) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
4870 /** 4884 /**
4871 * An empty array of function elements. 4885 * An empty array of function elements.
4872 */ 4886 */
4873 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); 4887 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0);
4874 4888
4875 /** 4889 /**
4876 * Initialize a newly created function element to have the given name. 4890 * Initialize a newly created function element to have the given name.
4877 * 4891 *
4878 * @param name the name of this element 4892 * @param name the name of this element
4879 */ 4893 */
4880 FunctionElementImpl.con1(Identifier name) : super.con1(name); 4894 FunctionElementImpl.forNode(Identifier name) : super.forNode(name);
4881 4895
4882 /** 4896 /**
4883 * Initialize a newly created function element to have no name and the given o ffset. This is used 4897 * Initialize a newly created function element to have no name and the given o ffset. This is used
4884 * for function expressions, which have no name. 4898 * for function expressions, which have no name.
4885 * 4899 *
4886 * @param nameOffset the offset of the name of this element in the file that c ontains the 4900 * @param nameOffset the offset of the name of this element in the file that c ontains the
4887 * declaration of this element 4901 * declaration of this element
4888 */ 4902 */
4889 FunctionElementImpl.con2(int nameOffset) : super.con2("", nameOffset); 4903 FunctionElementImpl.forOffset(int nameOffset) : super("", nameOffset);
4904
4905 /**
4906 * Initialize a newly created function element to have the given name and offs et.
4907 *
4908 * @param name the name of this element
4909 * @param nameOffset the offset of the name of this element in the file that c ontains the
4910 * declaration of this element
4911 */
4912 FunctionElementImpl(String name, int nameOffset) : super(name, nameOffset);
4890 4913
4891 @override 4914 @override
4892 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); 4915 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this);
4893 4916
4894 @override 4917 @override
4895 ElementKind get kind => ElementKind.FUNCTION; 4918 ElementKind get kind => ElementKind.FUNCTION;
4896 4919
4897 @override 4920 @override
4898 FunctionDeclaration get node => getNodeMatching((node) => node is FunctionDecl aration); 4921 FunctionDeclaration get node => getNodeMatching((node) => node is FunctionDecl aration);
4899 4922
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
5448 * `part` directive. 5471 * `part` directive.
5449 */ 5472 */
5450 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY; 5473 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY;
5451 5474
5452 /** 5475 /**
5453 * Is `true` if this library is created for Angular analysis. 5476 * Is `true` if this library is created for Angular analysis.
5454 */ 5477 */
5455 bool _isAngularHtml = false; 5478 bool _isAngularHtml = false;
5456 5479
5457 /** 5480 /**
5481 * The element representing the synthetic function `loadLibrary` that is defin ed for this
5482 * library, or `null` if the element has not yet been created.
5483 */
5484 FunctionElement _loadLibraryFunction;
5485
5486 /**
5458 * Initialize a newly created library element to have the given name. 5487 * Initialize a newly created library element to have the given name.
5459 * 5488 *
5460 * @param context the analysis context in which the library is defined 5489 * @param context the analysis context in which the library is defined
5461 * @param name the name of this element 5490 * @param name the name of this element
5462 */ 5491 */
5463 LibraryElementImpl(this.context, LibraryIdentifier name) : super.forNode(name) ; 5492 LibraryElementImpl(this.context, LibraryIdentifier name) : super.forNode(name) ;
5464 5493
5465 @override 5494 @override
5466 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); 5495 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
5467 5496
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
5518 libraries.add(library); 5547 libraries.add(library);
5519 } 5548 }
5520 } 5549 }
5521 return new List.from(libraries); 5550 return new List.from(libraries);
5522 } 5551 }
5523 5552
5524 @override 5553 @override
5525 List<ImportElement> get imports => _imports; 5554 List<ImportElement> get imports => _imports;
5526 5555
5527 @override 5556 @override
5557 List<ImportElement> getImportsWithPrefix(PrefixElement prefixElement) {
5558 int count = _imports.length;
5559 List<ImportElement> importList = new List<ImportElement>();
5560 for (int i = 0; i < count; i++) {
5561 if (identical(_imports[i].prefix, prefixElement)) {
5562 importList.add(_imports[i]);
5563 }
5564 }
5565 return new List.from(importList);
5566 }
5567
5568 @override
5528 ElementKind get kind => ElementKind.LIBRARY; 5569 ElementKind get kind => ElementKind.LIBRARY;
5529 5570
5530 @override 5571 @override
5531 LibraryElement get library => this; 5572 LibraryElement get library => this;
5532 5573
5533 @override 5574 @override
5575 FunctionElement get loadLibraryFunction {
5576 if (_loadLibraryFunction == null) {
5577 FunctionElementImpl function = new FunctionElementImpl(FunctionElement.LOA D_LIBRARY_NAME, -1);
5578 function.synthetic = true;
5579 function.enclosingElement = this;
5580 function.returnType = loadLibraryReturnType;
5581 function.type = new FunctionTypeImpl.con1(function);
5582 _loadLibraryFunction = function;
5583 }
5584 return _loadLibraryFunction;
5585 }
5586
5587 @override
5534 List<CompilationUnitElement> get parts => _parts; 5588 List<CompilationUnitElement> get parts => _parts;
5535 5589
5536 @override 5590 @override
5537 List<PrefixElement> get prefixes { 5591 List<PrefixElement> get prefixes {
5538 Set<PrefixElement> prefixes = new Set<PrefixElement>(); 5592 Set<PrefixElement> prefixes = new Set<PrefixElement>();
5539 for (ImportElement element in _imports) { 5593 for (ImportElement element in _imports) {
5540 PrefixElement prefix = element.prefix; 5594 PrefixElement prefix = element.prefix;
5541 if (prefix != null) { 5595 if (prefix != null) {
5542 prefixes.add(prefix); 5596 prefixes.add(prefix);
5543 } 5597 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5719 for (ExportElement exportElement in _exports) { 5773 for (ExportElement exportElement in _exports) {
5720 LibraryElement exportedLibrary = exportElement.exportedLibrary; 5774 LibraryElement exportedLibrary = exportElement.exportedLibrary;
5721 if (exportedLibrary != null) { 5775 if (exportedLibrary != null) {
5722 (exportedLibrary as LibraryElementImpl)._addVisibleLibraries(visibleLi braries, true); 5776 (exportedLibrary as LibraryElementImpl)._addVisibleLibraries(visibleLi braries, true);
5723 } 5777 }
5724 } 5778 }
5725 } 5779 }
5726 } 5780 }
5727 5781
5728 /** 5782 /**
5783 * Return the object representing the type "Future" from the dart:async librar y, or the type
5784 * "void" if the type "Future" cannot be accessed.
5785 *
5786 * @return the type "Future" from the dart:async library
5787 */
5788 DartType get loadLibraryReturnType {
5789 try {
5790 Source asyncSource = context.sourceFactory.forUri(DartSdk.DART_ASYNC);
5791 if (asyncSource == null) {
5792 AnalysisEngine.instance.logger.logError("Could not create a source for d art:async");
5793 return VoidTypeImpl.instance;
5794 }
5795 LibraryElement asyncElement = context.computeLibraryElement(asyncSource);
5796 if (asyncElement == null) {
5797 AnalysisEngine.instance.logger.logError("Could not build the element mod el for dart:async");
5798 return VoidTypeImpl.instance;
5799 }
5800 ClassElement futureElement = asyncElement.getType("Future");
5801 if (futureElement == null) {
5802 AnalysisEngine.instance.logger.logError("Could not find type Future in d art:async");
5803 return VoidTypeImpl.instance;
5804 }
5805 InterfaceType futureType = futureElement.type;
5806 return futureType.substitute4(<DartType> [DynamicTypeImpl.instance]);
5807 } on AnalysisException catch (exception) {
5808 AnalysisEngine.instance.logger.logError2("Could not build the element mode l for dart:async", exception);
5809 return VoidTypeImpl.instance;
5810 }
5811 }
5812
5813 /**
5729 * Answer `true` if the receiver directly or indirectly imports the dart:html libraries. 5814 * Answer `true` if the receiver directly or indirectly imports the dart:html libraries.
5730 * 5815 *
5731 * @return `true` if the receiver directly or indirectly imports the dart:html libraries 5816 * @return `true` if the receiver directly or indirectly imports the dart:html libraries
5732 */ 5817 */
5733 bool get isOrImportsBrowserLibrary { 5818 bool get isOrImportsBrowserLibrary {
5734 List<LibraryElement> visited = new List<LibraryElement>(); 5819 List<LibraryElement> visited = new List<LibraryElement>();
5735 Source htmlLibSource = context.sourceFactory.forUri(DartSdk.DART_HTML); 5820 Source htmlLibSource = context.sourceFactory.forUri(DartSdk.DART_HTML);
5736 visited.add(this); 5821 visited.add(this);
5737 for (int index = 0; index < visited.length; index++) { 5822 for (int index = 0; index < visited.length; index++) {
5738 LibraryElement library = visited[index]; 5823 LibraryElement library = visited[index];
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 /** 5868 /**
5784 * An empty array of field elements. 5869 * An empty array of field elements.
5785 */ 5870 */
5786 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0); 5871 static List<LocalVariableElement> EMPTY_ARRAY = new List<LocalVariableElement> (0);
5787 5872
5788 /** 5873 /**
5789 * Initialize a newly created local variable element to have the given name. 5874 * Initialize a newly created local variable element to have the given name.
5790 * 5875 *
5791 * @param name the name of this element 5876 * @param name the name of this element
5792 */ 5877 */
5793 LocalVariableElementImpl(Identifier name) : super.con1(name); 5878 LocalVariableElementImpl(Identifier name) : super.forNode(name);
5794 5879
5795 @override 5880 @override
5796 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this); 5881 accept(ElementVisitor visitor) => visitor.visitLocalVariableElement(this);
5797 5882
5798 @override 5883 @override
5799 ElementKind get kind => ElementKind.LOCAL_VARIABLE; 5884 ElementKind get kind => ElementKind.LOCAL_VARIABLE;
5800 5885
5801 @override 5886 @override
5802 List<ToolkitObjectElement> get toolkitObjects { 5887 List<ToolkitObjectElement> get toolkitObjects {
5803 CompilationUnitElementImpl unit = getAncestor((element) => element is Compil ationUnitElementImpl); 5888 CompilationUnitElementImpl unit = getAncestor((element) => element is Compil ationUnitElementImpl);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5879 /** 5964 /**
5880 * An empty array of method elements. 5965 * An empty array of method elements.
5881 */ 5966 */
5882 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); 5967 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0);
5883 5968
5884 /** 5969 /**
5885 * Initialize a newly created method element to have the given name. 5970 * Initialize a newly created method element to have the given name.
5886 * 5971 *
5887 * @param name the name of this element 5972 * @param name the name of this element
5888 */ 5973 */
5889 MethodElementImpl.con1(Identifier name) : super.con1(name); 5974 MethodElementImpl.forNode(Identifier name) : super.forNode(name);
5890 5975
5891 /** 5976 /**
5892 * Initialize a newly created method element to have the given name. 5977 * Initialize a newly created method element to have the given name.
5893 * 5978 *
5894 * @param name the name of this element 5979 * @param name the name of this element
5895 * @param nameOffset the offset of the name of this element in the file that c ontains the 5980 * @param nameOffset the offset of the name of this element in the file that c ontains the
5896 * declaration of this element 5981 * declaration of this element
5897 */ 5982 */
5898 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff set); 5983 MethodElementImpl(String name, int nameOffset) : super(name, nameOffset);
5899 5984
5900 @override 5985 @override
5901 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); 5986 accept(ElementVisitor visitor) => visitor.visitMethodElement(this);
5902 5987
5903 @override 5988 @override
5904 String get displayName { 5989 String get displayName {
5905 String displayName = super.displayName; 5990 String displayName = super.displayName;
5906 if ("unary-" == displayName) { 5991 if ("unary-" == displayName) {
5907 return "-"; 5992 return "-";
5908 } 5993 }
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
6235 * The interface [MultiplyInheritedMethodElementImpl] defines all of the behavio r of an 6320 * The interface [MultiplyInheritedMethodElementImpl] defines all of the behavio r of an
6236 * [MethodElementImpl], with the additional information of an array of 6321 * [MethodElementImpl], with the additional information of an array of
6237 * [ExecutableElement]s from which this element was composed. 6322 * [ExecutableElement]s from which this element was composed.
6238 */ 6323 */
6239 class MultiplyInheritedMethodElementImpl extends MethodElementImpl implements Mu ltiplyInheritedExecutableElement { 6324 class MultiplyInheritedMethodElementImpl extends MethodElementImpl implements Mu ltiplyInheritedExecutableElement {
6240 /** 6325 /**
6241 * An array the array of executable elements that were used to compose this el ement. 6326 * An array the array of executable elements that were used to compose this el ement.
6242 */ 6327 */
6243 List<ExecutableElement> _elements = MethodElementImpl.EMPTY_ARRAY; 6328 List<ExecutableElement> _elements = MethodElementImpl.EMPTY_ARRAY;
6244 6329
6245 MultiplyInheritedMethodElementImpl(Identifier name) : super.con1(name) { 6330 MultiplyInheritedMethodElementImpl(Identifier name) : super.forNode(name) {
6246 synthetic = true; 6331 synthetic = true;
6247 } 6332 }
6248 6333
6249 @override 6334 @override
6250 List<ExecutableElement> get inheritedElements => _elements; 6335 List<ExecutableElement> get inheritedElements => _elements;
6251 6336
6252 void set inheritedElements(List<ExecutableElement> elements) { 6337 void set inheritedElements(List<ExecutableElement> elements) {
6253 this._elements = elements; 6338 this._elements = elements;
6254 } 6339 }
6255 } 6340 }
6256 6341
6257 /** 6342 /**
6258 * The interface [MultiplyInheritedPropertyAccessorElementImpl] defines all of t he behavior of 6343 * The interface [MultiplyInheritedPropertyAccessorElementImpl] defines all of t he behavior of
6259 * an [PropertyAccessorElementImpl], with the additional information of an array of 6344 * an [PropertyAccessorElementImpl], with the additional information of an array of
6260 * [ExecutableElement]s from which this element was composed. 6345 * [ExecutableElement]s from which this element was composed.
6261 */ 6346 */
6262 class MultiplyInheritedPropertyAccessorElementImpl extends PropertyAccessorEleme ntImpl implements MultiplyInheritedExecutableElement { 6347 class MultiplyInheritedPropertyAccessorElementImpl extends PropertyAccessorEleme ntImpl implements MultiplyInheritedExecutableElement {
6263 /** 6348 /**
6264 * An array the array of executable elements that were used to compose this el ement. 6349 * An array the array of executable elements that were used to compose this el ement.
6265 */ 6350 */
6266 List<ExecutableElement> _elements = PropertyAccessorElementImpl.EMPTY_ARRAY; 6351 List<ExecutableElement> _elements = PropertyAccessorElementImpl.EMPTY_ARRAY;
6267 6352
6268 MultiplyInheritedPropertyAccessorElementImpl(Identifier name) : super.con1(nam e) { 6353 MultiplyInheritedPropertyAccessorElementImpl(Identifier name) : super.forNode( name) {
6269 synthetic = true; 6354 synthetic = true;
6270 } 6355 }
6271 6356
6272 @override 6357 @override
6273 List<ExecutableElement> get inheritedElements => _elements; 6358 List<ExecutableElement> get inheritedElements => _elements;
6274 6359
6275 void set inheritedElements(List<ExecutableElement> elements) { 6360 void set inheritedElements(List<ExecutableElement> elements) {
6276 this._elements = elements; 6361 this._elements = elements;
6277 } 6362 }
6278 } 6363 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
6327 /** 6412 /**
6328 * An empty array of field elements. 6413 * An empty array of field elements.
6329 */ 6414 */
6330 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0); 6415 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0);
6331 6416
6332 /** 6417 /**
6333 * Initialize a newly created parameter element to have the given name. 6418 * Initialize a newly created parameter element to have the given name.
6334 * 6419 *
6335 * @param name the name of this element 6420 * @param name the name of this element
6336 */ 6421 */
6337 ParameterElementImpl.con1(Identifier name) : super.con1(name); 6422 ParameterElementImpl.con1(Identifier name) : super.forNode(name);
6338 6423
6339 /** 6424 /**
6340 * Initialize a newly created parameter element to have the given name. 6425 * Initialize a newly created parameter element to have the given name.
6341 * 6426 *
6342 * @param name the name of this element 6427 * @param name the name of this element
6343 * @param nameOffset the offset of the name of this element in the file that c ontains the 6428 * @param nameOffset the offset of the name of this element in the file that c ontains the
6344 * declaration of this element 6429 * declaration of this element
6345 */ 6430 */
6346 ParameterElementImpl.con2(String name, int nameOffset) : super.con2(name, name Offset); 6431 ParameterElementImpl.con2(String name, int nameOffset) : super(name, nameOffse t);
6347 6432
6348 @override 6433 @override
6349 accept(ElementVisitor visitor) => visitor.visitParameterElement(this); 6434 accept(ElementVisitor visitor) => visitor.visitParameterElement(this);
6350 6435
6351 @override 6436 @override
6352 SourceRange get defaultValueRange { 6437 SourceRange get defaultValueRange {
6353 if (_defaultValueRangeLength < 0) { 6438 if (_defaultValueRangeLength < 0) {
6354 return null; 6439 return null;
6355 } 6440 }
6356 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength); 6441 return new SourceRange(_defaultValueRangeOffset, _defaultValueRangeLength);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
6537 /** 6622 /**
6538 * An empty array of property accessor elements. 6623 * An empty array of property accessor elements.
6539 */ 6624 */
6540 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0); 6625 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl ement>(0);
6541 6626
6542 /** 6627 /**
6543 * Initialize a newly created property accessor element to have the given name . 6628 * Initialize a newly created property accessor element to have the given name .
6544 * 6629 *
6545 * @param name the name of this element 6630 * @param name the name of this element
6546 */ 6631 */
6547 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name); 6632 PropertyAccessorElementImpl.forNode(Identifier name) : super.forNode(name);
6548 6633
6549 /** 6634 /**
6550 * Initialize a newly created synthetic property accessor element to be associ ated with the given 6635 * Initialize a newly created synthetic property accessor element to be associ ated with the given
6551 * variable. 6636 * variable.
6552 * 6637 *
6553 * @param variable the variable with which this access is associated 6638 * @param variable the variable with which this access is associated
6554 */ 6639 */
6555 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable) : super .con2(variable.name, variable.nameOffset) { 6640 PropertyAccessorElementImpl(PropertyInducingElementImpl variable) : super(vari able.name, variable.nameOffset) {
6556 this.variable = variable; 6641 this.variable = variable;
6557 synthetic = true; 6642 synthetic = true;
6558 } 6643 }
6559 6644
6560 @override 6645 @override
6561 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); 6646 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this);
6562 6647
6563 @override 6648 @override
6564 bool operator ==(Object object) => super == object && isGetter == (object as P ropertyAccessorElement).isGetter; 6649 bool operator ==(Object object) => super == object && isGetter == (object as P ropertyAccessorElement).isGetter;
6565 6650
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
6687 /** 6772 /**
6688 * An empty array of elements. 6773 * An empty array of elements.
6689 */ 6774 */
6690 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0); 6775 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl ement>(0);
6691 6776
6692 /** 6777 /**
6693 * Initialize a newly created element to have the given name. 6778 * Initialize a newly created element to have the given name.
6694 * 6779 *
6695 * @param name the name of this element 6780 * @param name the name of this element
6696 */ 6781 */
6697 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name); 6782 PropertyInducingElementImpl.con1(Identifier name) : super.forNode(name);
6698 6783
6699 /** 6784 /**
6700 * Initialize a newly created synthetic element to have the given name. 6785 * Initialize a newly created synthetic element to have the given name.
6701 * 6786 *
6702 * @param name the name of this element 6787 * @param name the name of this element
6703 */ 6788 */
6704 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { 6789 PropertyInducingElementImpl.con2(String name) : super(name, -1) {
6705 synthetic = true; 6790 synthetic = true;
6706 } 6791 }
6707 } 6792 }
6708 6793
6709 /** 6794 /**
6710 * Instances of the class `ShowElementCombinatorImpl` implement a 6795 * Instances of the class `ShowElementCombinatorImpl` implement a
6711 * [ShowElementCombinator]. 6796 * [ShowElementCombinator].
6712 */ 6797 */
6713 class ShowElementCombinatorImpl implements ShowElementCombinator { 6798 class ShowElementCombinatorImpl implements ShowElementCombinator {
6714 /** 6799 /**
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
6881 /** 6966 /**
6882 * An empty array of variable elements. 6967 * An empty array of variable elements.
6883 */ 6968 */
6884 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); 6969 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0);
6885 6970
6886 /** 6971 /**
6887 * Initialize a newly created variable element to have the given name. 6972 * Initialize a newly created variable element to have the given name.
6888 * 6973 *
6889 * @param name the name of this element 6974 * @param name the name of this element
6890 */ 6975 */
6891 VariableElementImpl.con1(Identifier name) : super.forNode(name); 6976 VariableElementImpl.forNode(Identifier name) : super.forNode(name);
6892 6977
6893 /** 6978 /**
6894 * Initialize a newly created variable element to have the given name. 6979 * Initialize a newly created variable element to have the given name.
6895 * 6980 *
6896 * @param name the name of this element 6981 * @param name the name of this element
6897 * @param nameOffset the offset of the name of this element in the file that c ontains the 6982 * @param nameOffset the offset of the name of this element in the file that c ontains the
6898 * declaration of this element 6983 * declaration of this element
6899 */ 6984 */
6900 VariableElementImpl.con2(String name, int nameOffset) : super(name, nameOffset ); 6985 VariableElementImpl(String name, int nameOffset) : super(name, nameOffset);
6901 6986
6902 /** 6987 /**
6903 * Return the result of evaluating this variable's initializer as a compile-ti me constant 6988 * Return the result of evaluating this variable's initializer as a compile-ti me constant
6904 * expression, or `null` if this variable is not a 'const' variable, if it doe s not have an 6989 * expression, or `null` if this variable is not a 'const' variable, if it doe s not have an
6905 * initializer, or if the compilation unit containing the variable has not bee n resolved. 6990 * initializer, or if the compilation unit containing the variable has not bee n resolved.
6906 * 6991 *
6907 * @return the result of evaluating this variable's initializer 6992 * @return the result of evaluating this variable's initializer
6908 */ 6993 */
6909 EvaluationResultImpl get evaluationResult => null; 6994 EvaluationResultImpl get evaluationResult => null;
6910 6995
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
7010 * Checks if this application depends on the library with the given [Source]. 7095 * Checks if this application depends on the library with the given [Source].
7011 */ 7096 */
7012 bool dependsOn(Source librarySource) => _librarySources.contains(librarySource ); 7097 bool dependsOn(Source librarySource) => _librarySources.contains(librarySource );
7013 } 7098 }
7014 7099
7015 /** 7100 /**
7016 * Implementation of `AngularComponentElement`. 7101 * Implementation of `AngularComponentElement`.
7017 */ 7102 */
7018 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen ts AngularComponentElement { 7103 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen ts AngularComponentElement {
7019 /** 7104 /**
7020 * The offset of the defining <code>NgComponent</code> annotation. 7105 * The offset of the defining <code>Component</code> annotation.
7021 */ 7106 */
7022 final int _annotationOffset; 7107 final int _annotationOffset;
7023 7108
7024 /** 7109 /**
7025 * The array containing all of the properties declared by this component. 7110 * The array containing all of the properties declared by this component.
7026 */ 7111 */
7027 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; 7112 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY;
7028 7113
7029 /** 7114 /**
7030 * The array containing all of the scope properties set by this component. 7115 * The array containing all of the scope properties set by this component.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
7128 @override 7213 @override
7129 accept(ElementVisitor visitor) => visitor.visitAngularControllerElement(this); 7214 accept(ElementVisitor visitor) => visitor.visitAngularControllerElement(this);
7130 7215
7131 @override 7216 @override
7132 ElementKind get kind => ElementKind.ANGULAR_CONTROLLER; 7217 ElementKind get kind => ElementKind.ANGULAR_CONTROLLER;
7133 } 7218 }
7134 7219
7135 /** 7220 /**
7136 * Implementation of `AngularDirectiveElement`. 7221 * Implementation of `AngularDirectiveElement`.
7137 */ 7222 */
7138 class AngularDirectiveElementImpl extends AngularHasSelectorElementImpl implemen ts AngularDirectiveElement { 7223 class AngularDecoratorElementImpl extends AngularHasSelectorElementImpl implemen ts AngularDecoratorElement {
7139 /** 7224 /**
7140 * The offset of the annotation that defines this directive. 7225 * The offset of the annotation that defines this directive.
7141 */ 7226 */
7142 final int _offset; 7227 final int _offset;
7143 7228
7144 /** 7229 /**
7145 * The array containing all of the properties declared by this directive. 7230 * The array containing all of the properties declared by this directive.
7146 */ 7231 */
7147 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; 7232 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY;
7148 7233
7149 /** 7234 /**
7150 * Initialize a newly created Angular directive to have the given name. 7235 * Initialize a newly created Angular directive to have the given name.
7151 * 7236 *
7152 * @param offset the offset of the annotation that defines this directive 7237 * @param offset the offset of the annotation that defines this directive
7153 */ 7238 */
7154 AngularDirectiveElementImpl(this._offset) : super(null, -1); 7239 AngularDecoratorElementImpl(this._offset) : super(null, -1);
7155 7240
7156 @override 7241 @override
7157 accept(ElementVisitor visitor) => visitor.visitAngularDirectiveElement(this); 7242 accept(ElementVisitor visitor) => visitor.visitAngularDirectiveElement(this);
7158 7243
7159 @override 7244 @override
7160 String get displayName => selector.displayName; 7245 String get displayName => selector.displayName;
7161 7246
7162 @override 7247 @override
7163 ElementKind get kind => ElementKind.ANGULAR_DIRECTIVE; 7248 ElementKind get kind => ElementKind.ANGULAR_DIRECTIVE;
7164 7249
(...skipping 18 matching lines...) Expand all
7183 this._properties = properties; 7268 this._properties = properties;
7184 } 7269 }
7185 7270
7186 @override 7271 @override
7187 void visitChildren(ElementVisitor visitor) { 7272 void visitChildren(ElementVisitor visitor) {
7188 safelyVisitChildren(_properties, visitor); 7273 safelyVisitChildren(_properties, visitor);
7189 super.visitChildren(visitor); 7274 super.visitChildren(visitor);
7190 } 7275 }
7191 7276
7192 @override 7277 @override
7193 String get identifier => "NgDirective@${_offset}"; 7278 String get identifier => "Decorator@${_offset}";
7194 } 7279 }
7195 7280
7196 /** 7281 /**
7197 * Implementation of `AngularElement`. 7282 * Implementation of `AngularElement`.
7198 */ 7283 */
7199 abstract class AngularElementImpl extends ToolkitObjectElementImpl implements An gularElement { 7284 abstract class AngularElementImpl extends ToolkitObjectElementImpl implements An gularElement {
7200 /** 7285 /**
7201 * The [AngularApplication] this element is used in. 7286 * The [AngularApplication] this element is used in.
7202 */ 7287 */
7203 AngularApplication _application; 7288 AngularApplication _application;
(...skipping 12 matching lines...) Expand all
7216 7301
7217 /** 7302 /**
7218 * Set the [AngularApplication] this element is used in. 7303 * Set the [AngularApplication] this element is used in.
7219 */ 7304 */
7220 void set application(AngularApplication application) { 7305 void set application(AngularApplication application) {
7221 this._application = application; 7306 this._application = application;
7222 } 7307 }
7223 } 7308 }
7224 7309
7225 /** 7310 /**
7226 * Implementation of `AngularFilterElement`. 7311 * Implementation of `AngularFormatterElement`.
7227 */ 7312 */
7228 class AngularFilterElementImpl extends AngularElementImpl implements AngularFilt erElement { 7313 class AngularFormatterElementImpl extends AngularElementImpl implements AngularF ormatterElement {
7229 /** 7314 /**
7230 * Initialize a newly created Angular filter to have the given name. 7315 * Initialize a newly created Angular formatter to have the given name.
7231 * 7316 *
7232 * @param name the name of this element 7317 * @param name the name of this element
7233 * @param nameOffset the offset of the name of this element in the file that c ontains the 7318 * @param nameOffset the offset of the name of this element in the file that c ontains the
7234 * declaration of this element 7319 * declaration of this element
7235 */ 7320 */
7236 AngularFilterElementImpl(String name, int nameOffset) : super(name, nameOffset ); 7321 AngularFormatterElementImpl(String name, int nameOffset) : super(name, nameOff set);
7237 7322
7238 @override 7323 @override
7239 accept(ElementVisitor visitor) => visitor.visitAngularFilterElement(this); 7324 accept(ElementVisitor visitor) => visitor.visitAngularFormatterElement(this);
7240 7325
7241 @override 7326 @override
7242 ElementKind get kind => ElementKind.ANGULAR_FILTER; 7327 ElementKind get kind => ElementKind.ANGULAR_FORMATTER;
7243 } 7328 }
7244 7329
7245 /** 7330 /**
7246 * Implementation of [AngularSelectorElement] based on presence of a class. 7331 * Implementation of [AngularSelectorElement] based on presence of a class.
7247 */ 7332 */
7248 class AngularHasClassSelectorElementImpl extends AngularSelectorElementImpl impl ements AngularHasClassSelectorElement { 7333 class AngularHasClassSelectorElementImpl extends AngularSelectorElementImpl impl ements AngularHasClassSelectorElement {
7249 AngularHasClassSelectorElementImpl(String name, int offset) : super(name, offs et); 7334 AngularHasClassSelectorElementImpl(String name, int offset) : super(name, offs et);
7250 7335
7251 @override 7336 @override
7252 bool apply(XmlTagNode node) { 7337 bool apply(XmlTagNode node) {
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
7361 AngularScopePropertyElementImpl(String name, int nameOffset, this.type) : supe r(name, nameOffset); 7446 AngularScopePropertyElementImpl(String name, int nameOffset, this.type) : supe r(name, nameOffset);
7362 7447
7363 @override 7448 @override
7364 accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(thi s); 7449 accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(thi s);
7365 7450
7366 @override 7451 @override
7367 ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY; 7452 ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY;
7368 } 7453 }
7369 7454
7370 /** 7455 /**
7371 * Implementation of `AngularFilterElement`. 7456 * Implementation of `AngularFormatterElement`.
7372 */ 7457 */
7373 abstract class AngularSelectorElementImpl extends AngularElementImpl implements AngularSelectorElement { 7458 abstract class AngularSelectorElementImpl extends AngularElementImpl implements AngularSelectorElement {
7374 /** 7459 /**
7375 * Initialize a newly created Angular selector to have the given name. 7460 * Initialize a newly created Angular selector to have the given name.
7376 * 7461 *
7377 * @param name the name of this element 7462 * @param name the name of this element
7378 * @param nameOffset the offset of the name of this element in the file that c ontains the 7463 * @param nameOffset the offset of the name of this element in the file that c ontains the
7379 * declaration of this element 7464 * declaration of this element
7380 */ 7465 */
7381 AngularSelectorElementImpl(String name, int nameOffset) : super(name, nameOffs et); 7466 AngularSelectorElementImpl(String name, int nameOffset) : super(name, nameOffs et);
(...skipping 3384 matching lines...) Expand 10 before | Expand all | Expand 10 after
10766 } 10851 }
10767 10852
10768 /** 10853 /**
10769 * The interface `VoidType` defines the behavior of the unique object representi ng the type 10854 * The interface `VoidType` defines the behavior of the unique object representi ng the type
10770 * `void`. 10855 * `void`.
10771 */ 10856 */
10772 abstract class VoidType implements DartType { 10857 abstract class VoidType implements DartType {
10773 @override 10858 @override
10774 VoidType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es); 10859 VoidType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es);
10775 } 10860 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698