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

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

Issue 681003002: Replace ${name} with $name where possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up also implementation Created 6 years, 1 month 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 @override 162 @override
163 void visitChildren(ElementVisitor visitor) { 163 void visitChildren(ElementVisitor visitor) {
164 safelyVisitChildren(_properties, visitor); 164 safelyVisitChildren(_properties, visitor);
165 safelyVisitChildren(_scopeProperties, visitor); 165 safelyVisitChildren(_scopeProperties, visitor);
166 super.visitChildren(visitor); 166 super.visitChildren(visitor);
167 } 167 }
168 168
169 @override 169 @override
170 String get identifier => "AngularComponent@${_annotationOffset}"; 170 String get identifier => "AngularComponent@$_annotationOffset";
171 } 171 }
172 172
173 /** 173 /**
174 * The interface `AngularControllerElement` defines the Angular controller descr ibed by 174 * The interface `AngularControllerElement` defines the Angular controller descr ibed by
175 * <code>Controller</code> annotation. 175 * <code>Controller</code> annotation.
176 */ 176 */
177 abstract class AngularControllerElement implements AngularHasSelectorElement { 177 abstract class AngularControllerElement implements AngularHasSelectorElement {
178 } 178 }
179 179
180 /** 180 /**
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 this._properties = properties; 264 this._properties = properties;
265 } 265 }
266 266
267 @override 267 @override
268 void visitChildren(ElementVisitor visitor) { 268 void visitChildren(ElementVisitor visitor) {
269 safelyVisitChildren(_properties, visitor); 269 safelyVisitChildren(_properties, visitor);
270 super.visitChildren(visitor); 270 super.visitChildren(visitor);
271 } 271 }
272 272
273 @override 273 @override
274 String get identifier => "Decorator@${_offset}"; 274 String get identifier => "Decorator@$_offset";
275 } 275 }
276 276
277 /** 277 /**
278 * The interface `AngularElement` defines the behavior of objects representing i nformation 278 * The interface `AngularElement` defines the behavior of objects representing i nformation
279 * about an Angular specific element. 279 * about an Angular specific element.
280 */ 280 */
281 abstract class AngularElement implements ToolkitObjectElement { 281 abstract class AngularElement implements ToolkitObjectElement {
282 /** 282 /**
283 * An empty array of Angular elements. 283 * An empty array of Angular elements.
284 */ 284 */
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 */ 724 */
725 AngularViewElementImpl(this.templateUri, this.templateUriOffset) : super(null, -1); 725 AngularViewElementImpl(this.templateUri, this.templateUriOffset) : super(null, -1);
726 726
727 @override 727 @override
728 accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this); 728 accept(ElementVisitor visitor) => visitor.visitAngularViewElement(this);
729 729
730 @override 730 @override
731 ElementKind get kind => ElementKind.ANGULAR_VIEW; 731 ElementKind get kind => ElementKind.ANGULAR_VIEW;
732 732
733 @override 733 @override
734 String get identifier => "AngularView@${templateUriOffset}"; 734 String get identifier => "AngularView@$templateUriOffset";
735 } 735 }
736 736
737 /** 737 /**
738 * For AST nodes that could be in both the getter and setter contexts ([IndexExp ression]s and 738 * For AST nodes that could be in both the getter and setter contexts ([IndexExp ression]s and
739 * [SimpleIdentifier]s), the additional resolved elements are stored in the AST node, in an 739 * [SimpleIdentifier]s), the additional resolved elements are stored in the AST node, in an
740 * [AuxiliaryElements]. Since resolved elements are either statically resolved o r resolved 740 * [AuxiliaryElements]. Since resolved elements are either statically resolved o r resolved
741 * using propagated type information, this class is a wrapper for a pair of 741 * using propagated type information, this class is a wrapper for a pair of
742 * [ExecutableElement]s, not just a single [ExecutableElement]. 742 * [ExecutableElement]s, not just a single [ExecutableElement].
743 */ 743 */
744 class AuxiliaryElements { 744 class AuxiliaryElements {
(...skipping 2626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 @override 3371 @override
3372 Element get enclosingElement => _enclosingElement; 3372 Element get enclosingElement => _enclosingElement;
3373 3373
3374 @override 3374 @override
3375 String getExtendedDisplayName(String shortName) { 3375 String getExtendedDisplayName(String shortName) {
3376 if (shortName == null) { 3376 if (shortName == null) {
3377 shortName = displayName; 3377 shortName = displayName;
3378 } 3378 }
3379 Source source = this.source; 3379 Source source = this.source;
3380 if (source != null) { 3380 if (source != null) {
3381 return "${shortName} (${source.fullName})"; 3381 return "$shortName (${source.fullName})";
3382 } 3382 }
3383 return shortName; 3383 return shortName;
3384 } 3384 }
3385 3385
3386 @override 3386 @override
3387 LibraryElement get library => getAncestor((element) => element is LibraryEleme nt); 3387 LibraryElement get library => getAncestor((element) => element is LibraryEleme nt);
3388 3388
3389 @override 3389 @override
3390 ElementLocation get location => new ElementLocationImpl.con1(this); 3390 ElementLocation get location => new ElementLocationImpl.con1(this);
3391 3391
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
4903 if (name != null) { 4903 if (name != null) {
4904 buffer.write(name); 4904 buffer.write(name);
4905 } 4905 }
4906 super.appendTo(buffer); 4906 super.appendTo(buffer);
4907 } 4907 }
4908 4908
4909 @override 4909 @override
4910 String get identifier { 4910 String get identifier {
4911 String identifier = super.identifier; 4911 String identifier = super.identifier;
4912 if (!isStatic) { 4912 if (!isStatic) {
4913 identifier += "@${nameOffset}"; 4913 identifier += "@$nameOffset";
4914 } 4914 }
4915 return identifier; 4915 return identifier;
4916 } 4916 }
4917 } 4917 }
4918 4918
4919 /** 4919 /**
4920 * The interface `FunctionType` defines the behavior common to objects represent ing the type 4920 * The interface `FunctionType` defines the behavior common to objects represent ing the type
4921 * of a function, method, constructor, getter, or setter. Function types come in three variations: 4921 * of a function, method, constructor, getter, or setter. Function types come in three variations:
4922 * <ol> 4922 * <ol>
4923 * * The types of functions that only have required parameters. These have the g eneral form 4923 * * The types of functions that only have required parameters. These have the g eneral form
(...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after
6394 safelyVisitChild(prefix, visitor); 6394 safelyVisitChild(prefix, visitor);
6395 } 6395 }
6396 6396
6397 @override 6397 @override
6398 void appendTo(StringBuffer buffer) { 6398 void appendTo(StringBuffer buffer) {
6399 buffer.write("import "); 6399 buffer.write("import ");
6400 (importedLibrary as LibraryElementImpl).appendTo(buffer); 6400 (importedLibrary as LibraryElementImpl).appendTo(buffer);
6401 } 6401 }
6402 6402
6403 @override 6403 @override
6404 String get identifier => "${(importedLibrary as LibraryElementImpl).identifier }@${nameOffset}"; 6404 String get identifier => "${(importedLibrary as LibraryElementImpl).identifier }@$nameOffset";
6405 } 6405 }
6406 6406
6407 /** 6407 /**
6408 * The interface `InterfaceType` defines the behavior common to objects represen ting the type 6408 * The interface `InterfaceType` defines the behavior common to objects represen ting the type
6409 * introduced by either a class or an interface, or a reference to such a type. 6409 * introduced by either a class or an interface, or a reference to such a type.
6410 */ 6410 */
6411 abstract class InterfaceType implements ParameterizedType { 6411 abstract class InterfaceType implements ParameterizedType {
6412 /** 6412 /**
6413 * An empty array of types. 6413 * An empty array of types.
6414 */ 6414 */
(...skipping 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
7495 } 7495 }
7496 7496
7497 /** 7497 /**
7498 * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorEleme ntImpl]. 7498 * Combination of [AngularTagSelectorElementImpl] and [HasAttributeSelectorEleme ntImpl].
7499 */ 7499 */
7500 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl { 7500 class IsTagHasAttributeSelectorElementImpl extends AngularSelectorElementImpl {
7501 String _tagName; 7501 String _tagName;
7502 7502
7503 String _attributeName; 7503 String _attributeName;
7504 7504
7505 IsTagHasAttributeSelectorElementImpl(String tagName, String attributeName) : s uper("${tagName}[${attributeName}]", -1) { 7505 IsTagHasAttributeSelectorElementImpl(String tagName, String attributeName) : s uper("$tagName[$attributeName]", -1) {
7506 this._tagName = tagName; 7506 this._tagName = tagName;
7507 this._attributeName = attributeName; 7507 this._attributeName = attributeName;
7508 } 7508 }
7509 7509
7510 @override 7510 @override
7511 bool apply(XmlTagNode node) => node.tag == _tagName && node.getAttribute(_attr ibuteName) != null; 7511 bool apply(XmlTagNode node) => node.tag == _tagName && node.getAttribute(_attr ibuteName) != null;
7512 7512
7513 String get attributeName => _attributeName; 7513 String get attributeName => _attributeName;
7514 7514
7515 String get tagName => _tagName; 7515 String get tagName => _tagName;
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
8338 } 8338 }
8339 8339
8340 @override 8340 @override
8341 void appendTo(StringBuffer buffer) { 8341 void appendTo(StringBuffer buffer) {
8342 buffer.write(type); 8342 buffer.write(type);
8343 buffer.write(" "); 8343 buffer.write(" ");
8344 buffer.write(displayName); 8344 buffer.write(displayName);
8345 } 8345 }
8346 8346
8347 @override 8347 @override
8348 String get identifier => "${super.identifier}@${nameOffset}"; 8348 String get identifier => "${super.identifier}@$nameOffset";
8349 } 8349 }
8350 8350
8351 /** 8351 /**
8352 * The abstract class `Member` defines the behavior common to elements that repr esent members 8352 * The abstract class `Member` defines the behavior common to elements that repr esent members
8353 * of parameterized types. 8353 * of parameterized types.
8354 */ 8354 */
8355 abstract class Member implements Element { 8355 abstract class Member implements Element {
8356 /** 8356 /**
8357 * The element on which the parameterized element was created. 8357 * The element on which the parameterized element was created.
8358 */ 8358 */
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
9980 void appendTo(StringBuffer buffer) { 9980 void appendTo(StringBuffer buffer) {
9981 buffer.write(isGetter ? "get " : "set "); 9981 buffer.write(isGetter ? "get " : "set ");
9982 buffer.write(variable.displayName); 9982 buffer.write(variable.displayName);
9983 super.appendTo(buffer); 9983 super.appendTo(buffer);
9984 } 9984 }
9985 9985
9986 @override 9986 @override
9987 String get identifier { 9987 String get identifier {
9988 String name = displayName; 9988 String name = displayName;
9989 String suffix = isGetter ? "?" : "="; 9989 String suffix = isGetter ? "?" : "=";
9990 return "${name}${suffix}"; 9990 return "$name$suffix";
9991 } 9991 }
9992 } 9992 }
9993 9993
9994 /** 9994 /**
9995 * Instances of the class `PropertyAccessorMember` represent a property accessor element 9995 * Instances of the class `PropertyAccessorMember` represent a property accessor element
9996 * defined in a parameterized type where the values of the type parameters are k nown. 9996 * defined in a parameterized type where the values of the type parameters are k nown.
9997 */ 9997 */
9998 class PropertyAccessorMember extends ExecutableMember implements PropertyAccesso rElement { 9998 class PropertyAccessorMember extends ExecutableMember implements PropertyAccesso rElement {
9999 /** 9999 /**
10000 * If the given property accessor's type is different when any type parameters from the defining 10000 * If the given property accessor's type is different when any type parameters from the defining
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
11759 if (type is UnionType) { 11759 if (type is UnionType) {
11760 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); 11760 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs);
11761 } 11761 }
11762 // The only subtype relations that pertain to void are therefore: 11762 // The only subtype relations that pertain to void are therefore:
11763 // void <: void (by reflexivity) 11763 // void <: void (by reflexivity)
11764 // bottom <: void (as bottom is a subtype of all types). 11764 // bottom <: void (as bottom is a subtype of all types).
11765 // void <: dynamic (as dynamic is a supertype of all types) 11765 // void <: dynamic (as dynamic is a supertype of all types)
11766 return identical(type, this) || type.isDynamic; 11766 return identical(type, this) || type.isDynamic;
11767 } 11767 }
11768 } 11768 }
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