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

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

Issue 200583002: Analyzer snapshot with disabled 'this.field' generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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';
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 * @return the offset of the name of this element 596 * @return the offset of the name of this element
597 */ 597 */
598 int get nameOffset; 598 int get nameOffset;
599 599
600 /** 600 /**
601 * Return the resolved [AstNode] node that declares this [Element]. 601 * Return the resolved [AstNode] node that declares this [Element].
602 * 602 *
603 * This method is expensive, because resolved AST might be evicted from cache, so parsing and 603 * This method is expensive, because resolved AST might be evicted from cache, so parsing and
604 * resolving will be performed. 604 * resolving will be performed.
605 * 605 *
606 * <b>Note:</b> This method cannot be used in an async environment.
607 *
606 * @return the resolved [AstNode], maybe `null` if [Element] is synthetic or 608 * @return the resolved [AstNode], maybe `null` if [Element] is synthetic or
607 * isn't contained in a compilation unit, such as a [LibraryElement]. 609 * isn't contained in a compilation unit, such as a [LibraryElement].
608 */ 610 */
609 AstNode get node; 611 AstNode get node;
610 612
611 /** 613 /**
612 * Return the source that contains this element, or `null` if this element is not contained 614 * Return the source that contains this element, or `null` if this element is not contained
613 * in a source. 615 * in a source.
614 * 616 *
615 * @return the source that contains this element 617 * @return the source that contains this element
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 static ElementKind of(Element element) { 842 static ElementKind of(Element element) {
841 if (element == null) { 843 if (element == null) {
842 return ERROR; 844 return ERROR;
843 } 845 }
844 return element.kind; 846 return element.kind;
845 } 847 }
846 848
847 /** 849 /**
848 * The name displayed in the UI for this kind of element. 850 * The name displayed in the UI for this kind of element.
849 */ 851 */
850 final String displayName; 852 String displayName;
851 853
852 /** 854 /**
853 * Initialize a newly created element kind to have the given display name. 855 * Initialize a newly created element kind to have the given display name.
854 * 856 *
855 * @param displayName the name displayed in the UI for this kind of element 857 * @param displayName the name displayed in the UI for this kind of element
856 */ 858 */
857 ElementKind(String name, int ordinal, this.displayName) : super(name, ordinal) ; 859 ElementKind(String name, int ordinal, String displayName) : super(name, ordina l) {
860 this.displayName = displayName;
861 }
858 } 862 }
859 863
860 /** 864 /**
861 * The interface `ElementLocation` defines the behavior of objects that represen t the location 865 * The interface `ElementLocation` defines the behavior of objects that represen t the location
862 * of an element within the element model. 866 * of an element within the element model.
863 */ 867 */
864 abstract class ElementLocation { 868 abstract class ElementLocation {
865 /** 869 /**
866 * Return an encoded representation of this location that can be used to creat e a location that is 870 * Return an encoded representation of this location that can be used to creat e a location that is
867 * equal to this location. 871 * equal to this location.
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 abstract class UriReferencedElement implements Element { 1747 abstract class UriReferencedElement implements Element {
1744 /** 1748 /**
1745 * Return the offset of the character immediately following the last character of this node's URI, 1749 * Return the offset of the character immediately following the last character of this node's URI,
1746 * or `-1` for synthetic import. 1750 * or `-1` for synthetic import.
1747 * 1751 *
1748 * @return the offset of the character just past the node's URI 1752 * @return the offset of the character just past the node's URI
1749 */ 1753 */
1750 int get uriEnd; 1754 int get uriEnd;
1751 1755
1752 /** 1756 /**
1753 * Return the offset of the URU in the file, or `-1` if this element is synthe tic. 1757 * Return the offset of the URI in the file, or `-1` if this element is synthe tic.
1754 * 1758 *
1755 * @return the offset of the URI 1759 * @return the offset of the URI
1756 */ 1760 */
1757 int get uriOffset; 1761 int get uriOffset;
1758 1762
1759 /** 1763 /**
1760 * Return the URI that is used to include this element into the enclosing libr ary, or `null` 1764 * Return the URI that is used to include this element into the enclosing libr ary, or `null`
1761 * if this is the defining compilation unit of a library. 1765 * if this is the defining compilation unit of a library.
1762 * 1766 *
1763 * @return the URI that is used to include this element into the enclosing lib rary 1767 * @return the URI that is used to include this element into the enclosing lib rary
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 * [SimpleIdentifier]s), the additional resolved elements are stored in the AST node, in an 2560 * [SimpleIdentifier]s), the additional resolved elements are stored in the AST node, in an
2557 * [AuxiliaryElements]. Since resolved elements are either statically resolved o r resolved 2561 * [AuxiliaryElements]. Since resolved elements are either statically resolved o r resolved
2558 * using propagated type information, this class is a wrapper for a pair of 2562 * using propagated type information, this class is a wrapper for a pair of
2559 * [ExecutableElement]s, not just a single [ExecutableElement]. 2563 * [ExecutableElement]s, not just a single [ExecutableElement].
2560 */ 2564 */
2561 class AuxiliaryElements { 2565 class AuxiliaryElements {
2562 /** 2566 /**
2563 * The element based on propagated type information, or `null` if the AST stru cture has not 2567 * The element based on propagated type information, or `null` if the AST stru cture has not
2564 * been resolved or if this identifier could not be resolved. 2568 * been resolved or if this identifier could not be resolved.
2565 */ 2569 */
2566 final ExecutableElement propagatedElement; 2570 ExecutableElement propagatedElement;
2567 2571
2568 /** 2572 /**
2569 * The element associated with this identifier based on static type informatio n, or `null` 2573 * The element associated with this identifier based on static type informatio n, or `null`
2570 * if the AST structure has not been resolved or if this identifier could not be resolved. 2574 * if the AST structure has not been resolved or if this identifier could not be resolved.
2571 */ 2575 */
2572 final ExecutableElement staticElement; 2576 ExecutableElement staticElement;
2573 2577
2574 /** 2578 /**
2575 * Create the [AuxiliaryElements] with a static and propagated [ExecutableElem ent]. 2579 * Create the [AuxiliaryElements] with a static and propagated [ExecutableElem ent].
2576 * 2580 *
2577 * @param staticElement the static element 2581 * @param staticElement the static element
2578 * @param propagatedElement the propagated element 2582 * @param propagatedElement the propagated element
2579 */ 2583 */
2580 AuxiliaryElements(this.staticElement, this.propagatedElement); 2584 AuxiliaryElements(ExecutableElement staticElement, ExecutableElement propagate dElement) {
2585 this.staticElement = staticElement;
2586 this.propagatedElement = propagatedElement;
2587 }
2581 } 2588 }
2582 2589
2583 /** 2590 /**
2584 * Instances of the class `ClassElementImpl` implement a `ClassElement`. 2591 * Instances of the class `ClassElementImpl` implement a `ClassElement`.
2585 */ 2592 */
2586 class ClassElementImpl extends ElementImpl implements ClassElement { 2593 class ClassElementImpl extends ElementImpl implements ClassElement {
2587 /** 2594 /**
2588 * An array containing all of the accessors (getters and setters) contained in this class. 2595 * An array containing all of the accessors (getters and setters) contained in this class.
2589 */ 2596 */
2590 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A RRAY; 2597 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A RRAY;
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
3654 ElementKind get kind => ElementKind.DYNAMIC; 3661 ElementKind get kind => ElementKind.DYNAMIC;
3655 } 3662 }
3656 3663
3657 /** 3664 /**
3658 * Instances of the class `ElementAnnotationImpl` implement an [ElementAnnotatio n]. 3665 * Instances of the class `ElementAnnotationImpl` implement an [ElementAnnotatio n].
3659 */ 3666 */
3660 class ElementAnnotationImpl implements ElementAnnotation { 3667 class ElementAnnotationImpl implements ElementAnnotation {
3661 /** 3668 /**
3662 * The element representing the field, variable, or constructor being used as an annotation. 3669 * The element representing the field, variable, or constructor being used as an annotation.
3663 */ 3670 */
3664 final Element element; 3671 Element element;
3665 3672
3666 /** 3673 /**
3667 * An empty array of annotations. 3674 * An empty array of annotations.
3668 */ 3675 */
3669 static List<ElementAnnotationImpl> EMPTY_ARRAY = new List<ElementAnnotationImp l>(0); 3676 static List<ElementAnnotationImpl> EMPTY_ARRAY = new List<ElementAnnotationImp l>(0);
3670 3677
3671 /** 3678 /**
3672 * The name of the class used to mark an element as being deprecated. 3679 * The name of the class used to mark an element as being deprecated.
3673 */ 3680 */
3674 static String _DEPRECATED_CLASS_NAME = "Deprecated"; 3681 static String _DEPRECATED_CLASS_NAME = "Deprecated";
(...skipping 13 matching lines...) Expand all
3688 * The name of the top-level variable used to mark a class as implementing a p roxy object. 3695 * The name of the top-level variable used to mark a class as implementing a p roxy object.
3689 */ 3696 */
3690 static String _PROXY_VARIABLE_NAME = "proxy"; 3697 static String _PROXY_VARIABLE_NAME = "proxy";
3691 3698
3692 /** 3699 /**
3693 * Initialize a newly created annotation. 3700 * Initialize a newly created annotation.
3694 * 3701 *
3695 * @param element the element representing the field, variable, or constructor being used as an 3702 * @param element the element representing the field, variable, or constructor being used as an
3696 * annotation 3703 * annotation
3697 */ 3704 */
3698 ElementAnnotationImpl(this.element); 3705 ElementAnnotationImpl(Element element) {
3706 this.element = element;
3707 }
3699 3708
3700 @override 3709 @override
3701 bool get isDeprecated { 3710 bool get isDeprecated {
3702 if (element != null) { 3711 if (element != null) {
3703 LibraryElement library = element.library; 3712 LibraryElement library = element.library;
3704 if (library != null && library.isDartCore) { 3713 if (library != null && library.isDartCore) {
3705 if (element is ConstructorElement) { 3714 if (element is ConstructorElement) {
3706 ConstructorElement constructorElement = element as ConstructorElement; 3715 ConstructorElement constructorElement = element as ConstructorElement;
3707 if (constructorElement.enclosingElement.name == _DEPRECATED_CLASS_NAME ) { 3716 if (constructorElement.enclosingElement.name == _DEPRECATED_CLASS_NAME ) {
3708 return true; 3717 return true;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3789 */ 3798 */
3790 ElementImpl.forNode(Identifier name) : this(name == null ? "" : name.name, nam e == null ? -1 : name.offset); 3799 ElementImpl.forNode(Identifier name) : this(name == null ? "" : name.name, nam e == null ? -1 : name.offset);
3791 3800
3792 /** 3801 /**
3793 * Initialize a newly created element to have the given name. 3802 * Initialize a newly created element to have the given name.
3794 * 3803 *
3795 * @param name the name of this element 3804 * @param name the name of this element
3796 * @param nameOffset the offset of the name of this element in the file that c ontains the 3805 * @param nameOffset the offset of the name of this element in the file that c ontains the
3797 * declaration of this element 3806 * declaration of this element
3798 */ 3807 */
3799 ElementImpl(String name, this.nameOffset) { 3808 ElementImpl(String name, int nameOffset) {
3800 this._name = StringUtilities.intern(name); 3809 this._name = StringUtilities.intern(name);
3810 this.nameOffset = nameOffset;
3801 } 3811 }
3802 3812
3803 @override 3813 @override
3804 String computeDocumentationComment() { 3814 String computeDocumentationComment() {
3805 AnalysisContext context = this.context; 3815 AnalysisContext context = this.context;
3806 if (context == null) { 3816 if (context == null) {
3807 return null; 3817 return null;
3808 } 3818 }
3809 return context.computeDocumentationComment(this); 3819 return context.computeDocumentationComment(this);
3810 } 3820 }
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
4938 */ 4948 */
4939 class HtmlElementImpl extends ElementImpl implements HtmlElement { 4949 class HtmlElementImpl extends ElementImpl implements HtmlElement {
4940 /** 4950 /**
4941 * An empty array of HTML file elements. 4951 * An empty array of HTML file elements.
4942 */ 4952 */
4943 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>(0); 4953 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>(0);
4944 4954
4945 /** 4955 /**
4946 * The analysis context in which this library is defined. 4956 * The analysis context in which this library is defined.
4947 */ 4957 */
4948 final AnalysisContext context; 4958 AnalysisContext context;
4949 4959
4950 /** 4960 /**
4951 * The scripts contained in or referenced from script tags in the HTML file. 4961 * The scripts contained in or referenced from script tags in the HTML file.
4952 */ 4962 */
4953 List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY; 4963 List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY;
4954 4964
4955 /** 4965 /**
4956 * The source that corresponds to this HTML file. 4966 * The source that corresponds to this HTML file.
4957 */ 4967 */
4958 Source source; 4968 Source source;
4959 4969
4960 /** 4970 /**
4961 * The element associated with Dart pieces in this HTML unit or `null` if the receiver is 4971 * The element associated with Dart pieces in this HTML unit or `null` if the receiver is
4962 * not resolved. 4972 * not resolved.
4963 */ 4973 */
4964 CompilationUnitElement angularCompilationUnit; 4974 CompilationUnitElement angularCompilationUnit;
4965 4975
4966 /** 4976 /**
4967 * Initialize a newly created HTML element to have the given name. 4977 * Initialize a newly created HTML element to have the given name.
4968 * 4978 *
4969 * @param context the analysis context in which the HTML file is defined 4979 * @param context the analysis context in which the HTML file is defined
4970 * @param name the name of this element 4980 * @param name the name of this element
4971 */ 4981 */
4972 HtmlElementImpl(this.context, String name) : super(name, -1); 4982 HtmlElementImpl(AnalysisContext context, String name) : super(name, -1) {
4983 this.context = context;
4984 }
4973 4985
4974 @override 4986 @override
4975 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); 4987 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this);
4976 4988
4977 @override 4989 @override
4978 bool operator ==(Object object) { 4990 bool operator ==(Object object) {
4979 if (identical(object, this)) { 4991 if (identical(object, this)) {
4980 return true; 4992 return true;
4981 } 4993 }
4982 if (object == null) { 4994 if (object == null) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
5198 return false; 5210 return false;
5199 } 5211 }
5200 } 5212 }
5201 } 5213 }
5202 return true; 5214 return true;
5203 } 5215 }
5204 5216
5205 /** 5217 /**
5206 * The analysis context in which this library is defined. 5218 * The analysis context in which this library is defined.
5207 */ 5219 */
5208 final AnalysisContext context; 5220 AnalysisContext context;
5209 5221
5210 /** 5222 /**
5211 * The compilation unit that defines this library. 5223 * The compilation unit that defines this library.
5212 */ 5224 */
5213 CompilationUnitElement _definingCompilationUnit; 5225 CompilationUnitElement _definingCompilationUnit;
5214 5226
5215 /** 5227 /**
5216 * The entry point for this library, or `null` if this library does not have a n entry point. 5228 * The entry point for this library, or `null` if this library does not have a n entry point.
5217 */ 5229 */
5218 FunctionElement entryPoint; 5230 FunctionElement entryPoint;
(...skipping 18 matching lines...) Expand all
5237 * Is `true` if this library is created for Angular analysis. 5249 * Is `true` if this library is created for Angular analysis.
5238 */ 5250 */
5239 bool _isAngularHtml = false; 5251 bool _isAngularHtml = false;
5240 5252
5241 /** 5253 /**
5242 * Initialize a newly created library element to have the given name. 5254 * Initialize a newly created library element to have the given name.
5243 * 5255 *
5244 * @param context the analysis context in which the library is defined 5256 * @param context the analysis context in which the library is defined
5245 * @param name the name of this element 5257 * @param name the name of this element
5246 */ 5258 */
5247 LibraryElementImpl(this.context, LibraryIdentifier name) : super.forNode(name) ; 5259 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.fo rNode(name) {
5260 this.context = context;
5261 }
5248 5262
5249 @override 5263 @override
5250 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); 5264 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this);
5251 5265
5252 @override 5266 @override
5253 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC ompilationUnit; 5267 bool operator ==(Object object) => object != null && runtimeType == object.run timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC ompilationUnit;
5254 5268
5255 @override 5269 @override
5256 ElementImpl getChild(String identifier) { 5270 ElementImpl getChild(String identifier) {
5257 if ((_definingCompilationUnit as CompilationUnitElementImpl).identifier == i dentifier) { 5271 if ((_definingCompilationUnit as CompilationUnitElementImpl).identifier == i dentifier) {
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
5862 static List<Element> _computeConflictingElements(Element firstElement, Element secondElement) { 5876 static List<Element> _computeConflictingElements(Element firstElement, Element secondElement) {
5863 Set<Element> elements = new Set<Element>(); 5877 Set<Element> elements = new Set<Element>();
5864 _add(elements, firstElement); 5878 _add(elements, firstElement);
5865 _add(elements, secondElement); 5879 _add(elements, secondElement);
5866 return new List.from(elements); 5880 return new List.from(elements);
5867 } 5881 }
5868 5882
5869 /** 5883 /**
5870 * The analysis context in which the multiply defined elements are defined. 5884 * The analysis context in which the multiply defined elements are defined.
5871 */ 5885 */
5872 final AnalysisContext context; 5886 AnalysisContext context;
5873 5887
5874 /** 5888 /**
5875 * The name of the conflicting elements. 5889 * The name of the conflicting elements.
5876 */ 5890 */
5877 String _name; 5891 String _name;
5878 5892
5879 /** 5893 /**
5880 * A list containing all of the elements that conflict. 5894 * A list containing all of the elements that conflict.
5881 */ 5895 */
5882 final List<Element> conflictingElements; 5896 List<Element> conflictingElements;
5883 5897
5884 /** 5898 /**
5885 * Initialize a newly created element to represent a list of conflicting eleme nts. 5899 * Initialize a newly created element to represent a list of conflicting eleme nts.
5886 * 5900 *
5887 * @param context the analysis context in which the multiply defined elements are defined 5901 * @param context the analysis context in which the multiply defined elements are defined
5888 * @param conflictingElements the elements that conflict 5902 * @param conflictingElements the elements that conflict
5889 */ 5903 */
5890 MultiplyDefinedElementImpl(this.context, this.conflictingElements) { 5904 MultiplyDefinedElementImpl(AnalysisContext context, List<Element> conflictingE lements) {
5905 this.context = context;
5891 _name = conflictingElements[0].name; 5906 _name = conflictingElements[0].name;
5907 this.conflictingElements = conflictingElements;
5892 } 5908 }
5893 5909
5894 @override 5910 @override
5895 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this); 5911 accept(ElementVisitor visitor) => visitor.visitMultiplyDefinedElement(this);
5896 5912
5897 @override 5913 @override
5898 String computeDocumentationComment() => null; 5914 String computeDocumentationComment() => null;
5899 5915
5900 @override 5916 @override
5901 Element getAncestor(Predicate<Element> predicate) => null; 5917 Element getAncestor(Predicate<Element> predicate) => null;
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
6588 } 6604 }
6589 } 6605 }
6590 } 6606 }
6591 6607
6592 /** 6608 /**
6593 * Instances of the class `UriReferencedElementImpl` implement an [UriReferenced Element] 6609 * Instances of the class `UriReferencedElementImpl` implement an [UriReferenced Element]
6594 * . 6610 * .
6595 */ 6611 */
6596 abstract class UriReferencedElementImpl extends ElementImpl implements UriRefere ncedElement { 6612 abstract class UriReferencedElementImpl extends ElementImpl implements UriRefere ncedElement {
6597 /** 6613 /**
6598 * The offset of the URU in the file, may be `-1` if synthetic. 6614 * The offset of the URI in the file, may be `-1` if synthetic.
6599 */ 6615 */
6600 int uriOffset = -1; 6616 int uriOffset = -1;
6601 6617
6602 /** 6618 /**
6603 * The offset of the character immediately following the last character of thi s node's URI, may be 6619 * The offset of the character immediately following the last character of thi s node's URI, may be
6604 * `-1` if synthetic. 6620 * `-1` if synthetic.
6605 */ 6621 */
6606 int uriEnd = -1; 6622 int uriEnd = -1;
6607 6623
6608 /** 6624 /**
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
6745 builder.append(type); 6761 builder.append(type);
6746 builder.append(" "); 6762 builder.append(" ");
6747 builder.append(displayName); 6763 builder.append(displayName);
6748 } 6764 }
6749 } 6765 }
6750 6766
6751 /** 6767 /**
6752 * Information about Angular application. 6768 * Information about Angular application.
6753 */ 6769 */
6754 class AngularApplication { 6770 class AngularApplication {
6755 final Source entryPoint; 6771 Source entryPoint;
6756 6772
6757 Set<Source> _librarySources; 6773 Set<Source> _librarySources;
6758 6774
6759 final List<AngularElement> elements; 6775 List<AngularElement> elements;
6760 6776
6761 final List<Source> elementSources; 6777 List<Source> elementSources;
6762 6778
6763 AngularApplication(this.entryPoint, Set<Source> librarySources, this.elements, this.elementSources) { 6779 AngularApplication(Source entryPoint, Set<Source> librarySources, List<Angular Element> elements, List<Source> elementSources) {
6780 this.entryPoint = entryPoint;
6764 this._librarySources = librarySources; 6781 this._librarySources = librarySources;
6782 this.elements = elements;
6783 this.elementSources = elementSources;
6765 } 6784 }
6766 6785
6767 /** 6786 /**
6768 * Checks if this application depends on the library with the given [Source]. 6787 * Checks if this application depends on the library with the given [Source].
6769 */ 6788 */
6770 bool dependsOn(Source librarySource) => _librarySources.contains(librarySource ); 6789 bool dependsOn(Source librarySource) => _librarySources.contains(librarySource );
6771 } 6790 }
6772 6791
6773 /** 6792 /**
6774 * Implementation of `AngularComponentElement`. 6793 * Implementation of `AngularComponentElement`.
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
7104 ElementKind get kind => ElementKind.ANGULAR_PROPERTY; 7123 ElementKind get kind => ElementKind.ANGULAR_PROPERTY;
7105 } 7124 }
7106 7125
7107 /** 7126 /**
7108 * Implementation of `AngularScopePropertyElement`. 7127 * Implementation of `AngularScopePropertyElement`.
7109 */ 7128 */
7110 class AngularScopePropertyElementImpl extends AngularElementImpl implements Angu larScopePropertyElement { 7129 class AngularScopePropertyElementImpl extends AngularElementImpl implements Angu larScopePropertyElement {
7111 /** 7130 /**
7112 * The type of the property 7131 * The type of the property
7113 */ 7132 */
7114 final DartType type; 7133 DartType type;
7115 7134
7116 /** 7135 /**
7117 * Initialize a newly created Angular scope property to have the given name. 7136 * Initialize a newly created Angular scope property to have the given name.
7118 * 7137 *
7119 * @param name the name of this element 7138 * @param name the name of this element
7120 * @param nameOffset the offset of the name of this element in the file that c ontains the 7139 * @param nameOffset the offset of the name of this element in the file that c ontains the
7121 * declaration of this element 7140 * declaration of this element
7122 */ 7141 */
7123 AngularScopePropertyElementImpl(String name, int nameOffset, this.type) : supe r(name, nameOffset); 7142 AngularScopePropertyElementImpl(String name, int nameOffset, DartType type) : super(name, nameOffset) {
7143 this.type = type;
7144 }
7124 7145
7125 @override 7146 @override
7126 accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(thi s); 7147 accept(ElementVisitor visitor) => visitor.visitAngularScopePropertyElement(thi s);
7127 7148
7128 @override 7149 @override
7129 ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY; 7150 ElementKind get kind => ElementKind.ANGULAR_SCOPE_PROPERTY;
7130 } 7151 }
7131 7152
7132 /** 7153 /**
7133 * Implementation of `AngularFilterElement`. 7154 * Implementation of `AngularFilterElement`.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
7165 AngularApplication get application => (enclosingElement as AngularElementImpl) .application; 7186 AngularApplication get application => (enclosingElement as AngularElementImpl) .application;
7166 } 7187 }
7167 7188
7168 /** 7189 /**
7169 * Implementation of `AngularViewElement`. 7190 * Implementation of `AngularViewElement`.
7170 */ 7191 */
7171 class AngularViewElementImpl extends AngularElementImpl implements AngularViewEl ement { 7192 class AngularViewElementImpl extends AngularElementImpl implements AngularViewEl ement {
7172 /** 7193 /**
7173 * The HTML template URI. 7194 * The HTML template URI.
7174 */ 7195 */
7175 final String templateUri; 7196 String templateUri;
7176 7197
7177 /** 7198 /**
7178 * The offset of the [templateUri] in the [getSource]. 7199 * The offset of the [templateUri] in the [getSource].
7179 */ 7200 */
7180 final int templateUriOffset; 7201 int templateUriOffset = 0;
7181 7202
7182 /** 7203 /**
7183 * The HTML template source. 7204 * The HTML template source.
7184 */ 7205 */
7185 Source templateSource; 7206 Source templateSource;
7186 7207
7187 /** 7208 /**
7188 * Initialize a newly created Angular view. 7209 * Initialize a newly created Angular view.
7189 */ 7210 */
7190 AngularViewElementImpl(this.templateUri, this.templateUriOffset) : super(null, -1); 7211 AngularViewElementImpl(String templateUri, int templateUriOffset) : super(null , -1) {
7212 this.templateUri = templateUri;
7213 this.templateUriOffset = templateUriOffset;
7214 }
7191 7215
7192 @override 7216 @override
7193 accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this); 7217 accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this);
7194 7218
7195 @override 7219 @override
7196 ElementKind get kind => ElementKind.ANGULAR_VIEW; 7220 ElementKind get kind => ElementKind.ANGULAR_VIEW;
7197 7221
7198 @override 7222 @override
7199 String get identifier => "AngularView@${templateUriOffset}"; 7223 String get identifier => "AngularView@${templateUriOffset}";
7200 } 7224 }
(...skipping 15 matching lines...) Expand all
7216 builder.append("["); 7240 builder.append("[");
7217 builder.append(name); 7241 builder.append(name);
7218 builder.append("]"); 7242 builder.append("]");
7219 } 7243 }
7220 } 7244 }
7221 7245
7222 /** 7246 /**
7223 * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorEleme ntImpl]. 7247 * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorEleme ntImpl].
7224 */ 7248 */
7225 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl { 7249 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
7226 final String tagName; 7250 String tagName;
7227 7251
7228 final String attributeName; 7252 String attributeName;
7229 7253
7230 IsTagHasAttributeSelectorElementImpl(this.tagName, this.attributeName) : super (null, -1); 7254 IsTagHasAttributeSelectorElementImpl(String tagName, String attributeName) : s uper(null, -1) {
7255 this.tagName = tagName;
7256 this.attributeName = attributeName;
7257 }
7231 7258
7232 @override 7259 @override
7233 bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attrib uteName) != null; 7260 bool apply(XmlTagNode node) => node.tag == tagName && node.getAttribute(attrib uteName) != null;
7234 } 7261 }
7235 7262
7236 /** 7263 /**
7237 * Instances of the class `ConstructorMember` represent a constructor element de fined in a 7264 * Instances of the class `ConstructorMember` represent a constructor element de fined in a
7238 * parameterized type where the values of the type parameters are known. 7265 * parameterized type where the values of the type parameters are known.
7239 */ 7266 */
7240 class ConstructorMember extends ExecutableMember implements ConstructorElement { 7267 class ConstructorMember extends ExecutableMember implements ConstructorElement {
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after
9494 9521
9495 /** 9522 /**
9496 * The element representing the declaration of this type, or `null` if the typ e has not, or 9523 * The element representing the declaration of this type, or `null` if the typ e has not, or
9497 * cannot, be associated with an element. 9524 * cannot, be associated with an element.
9498 */ 9525 */
9499 Element _element; 9526 Element _element;
9500 9527
9501 /** 9528 /**
9502 * The name of this type, or `null` if the type does not have a name. 9529 * The name of this type, or `null` if the type does not have a name.
9503 */ 9530 */
9504 final String name; 9531 String name;
9505 9532
9506 /** 9533 /**
9507 * An empty array of types. 9534 * An empty array of types.
9508 */ 9535 */
9509 static List<DartType> EMPTY_ARRAY = new List<DartType>(0); 9536 static List<DartType> EMPTY_ARRAY = new List<DartType>(0);
9510 9537
9511 /** 9538 /**
9512 * Initialize a newly created type to be declared by the given element and to have the given name. 9539 * Initialize a newly created type to be declared by the given element and to have the given name.
9513 * 9540 *
9514 * @param element the element representing the declaration of the type 9541 * @param element the element representing the declaration of the type
9515 * @param name the name of the type 9542 * @param name the name of the type
9516 */ 9543 */
9517 TypeImpl(Element element, this.name) { 9544 TypeImpl(Element element, String name) {
9518 this._element = element; 9545 this._element = element;
9546 this.name = name;
9519 } 9547 }
9520 9548
9521 @override 9549 @override
9522 String get displayName => name; 9550 String get displayName => name;
9523 9551
9524 @override 9552 @override
9525 Element get element => _element; 9553 Element get element => _element;
9526 9554
9527 @override 9555 @override
9528 DartType getLeastUpperBound(DartType type) => null; 9556 DartType getLeastUpperBound(DartType type) => null;
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
10420 } 10448 }
10421 10449
10422 /** 10450 /**
10423 * The interface `VoidType` defines the behavior of the unique object representi ng the type 10451 * The interface `VoidType` defines the behavior of the unique object representi ng the type
10424 * `void`. 10452 * `void`.
10425 */ 10453 */
10426 abstract class VoidType implements DartType { 10454 abstract class VoidType implements DartType {
10427 @override 10455 @override
10428 VoidType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es); 10456 VoidType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es);
10429 } 10457 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/constant.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698