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

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

Issue 708263002: Clean up references in comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 3858 matching lines...) Expand 10 before | Expand all | Expand 10 after
3869 int currentChar = component.codeUnitAt(i); 3869 int currentChar = component.codeUnitAt(i);
3870 if (currentChar == _SEPARATOR_CHAR) { 3870 if (currentChar == _SEPARATOR_CHAR) {
3871 buffer.writeCharCode(_SEPARATOR_CHAR); 3871 buffer.writeCharCode(_SEPARATOR_CHAR);
3872 } 3872 }
3873 buffer.writeCharCode(currentChar); 3873 buffer.writeCharCode(currentChar);
3874 } 3874 }
3875 } 3875 }
3876 } 3876 }
3877 3877
3878 /** 3878 /**
3879 * The class `ElementPair` is a pair of [Element]s. [Object#equals] and 3879 * The class `ElementPair` is a pair of [Element]s. [Object.==] and
3880 * [Object#hashCode] so this class can be used in hashed data structures. 3880 * [Object.hashCode] so this class can be used in hashed data structures.
3881 */ 3881 */
3882 class ElementPair { 3882 class ElementPair {
3883 /** 3883 /**
3884 * The first [Element] 3884 * The first [Element]
3885 */ 3885 */
3886 final Element _first; 3886 final Element _first;
3887 3887
3888 /** 3888 /**
3889 * The second [Element] 3889 * The second [Element]
3890 */ 3890 */
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
6234 } 6234 }
6235 6235
6236 @override 6236 @override
6237 String get identifier => source.encoding; 6237 String get identifier => source.encoding;
6238 } 6238 }
6239 6239
6240 /** 6240 /**
6241 * The interface `HtmlScriptElement` defines the behavior of elements representi ng a script 6241 * The interface `HtmlScriptElement` defines the behavior of elements representi ng a script
6242 * tag in an HTML file. 6242 * tag in an HTML file.
6243 * 6243 *
6244 * @see EmbeddedHtmlScriptElement 6244 * See [EmbeddedHtmlScriptElement], and [ExternalHtmlScriptElement],
6245 * @see ExternalHtmlScriptElement
6246 */ 6245 */
6247 abstract class HtmlScriptElement implements Element { 6246 abstract class HtmlScriptElement implements Element {
6248 } 6247 }
6249 6248
6250 /** 6249 /**
6251 * Instances of the class `HtmlScriptElementImpl` implement an [HtmlScriptElemen t]. 6250 * Instances of the class `HtmlScriptElementImpl` implement an [HtmlScriptElemen t].
6252 */ 6251 */
6253 abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptEl ement { 6252 abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptEl ement {
6254 /** 6253 /**
6255 * An empty array of HTML script elements. 6254 * An empty array of HTML script elements.
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
6681 * representing the type introduced by either a class or an interface, or a refe rence to such a 6680 * representing the type introduced by either a class or an interface, or a refe rence to such a
6682 * type. 6681 * type.
6683 */ 6682 */
6684 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { 6683 class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
6685 /** 6684 /**
6686 * This method computes the longest inheritance path from some passed [Type] t o Object. 6685 * This method computes the longest inheritance path from some passed [Type] t o Object.
6687 * 6686 *
6688 * @param type the [Type] to compute the longest inheritance path of from the passed 6687 * @param type the [Type] to compute the longest inheritance path of from the passed
6689 * [Type] to Object 6688 * [Type] to Object
6690 * @return the computed longest inheritance path to Object 6689 * @return the computed longest inheritance path to Object
6691 * @see InterfaceType#getLeastUpperBound(Type) 6690 * See [InterfaceType.getLeastUpperBound].
6692 */ 6691 */
6693 static int computeLongestInheritancePathToObject(InterfaceType type) => _compu teLongestInheritancePathToObject(type, 0, new HashSet<ClassElement>()); 6692 static int computeLongestInheritancePathToObject(InterfaceType type) => _compu teLongestInheritancePathToObject(type, 0, new HashSet<ClassElement>());
6694 6693
6695 /** 6694 /**
6696 * Returns the set of all superinterfaces of the passed [Type]. 6695 * Returns the set of all superinterfaces of the passed [Type].
6697 * 6696 *
6698 * @param type the [Type] to compute the set of superinterfaces of 6697 * @param type the [Type] to compute the set of superinterfaces of
6699 * @return the [Set] of superinterfaces of the passed [Type] 6698 * @return the [Set] of superinterfaces of the passed [Type]
6700 * @see #getLeastUpperBound(Type) 6699 * See [getLeastUpperBound].
6701 */ 6700 */
6702 static Set<InterfaceType> computeSuperinterfaceSet(InterfaceType type) => _com puteSuperinterfaceSet(type, new HashSet<InterfaceType>()); 6701 static Set<InterfaceType> computeSuperinterfaceSet(InterfaceType type) => _com puteSuperinterfaceSet(type, new HashSet<InterfaceType>());
6703 6702
6704 /** 6703 /**
6705 * This method computes the longest inheritance path from some passed [Type] t o Object. This 6704 * This method computes the longest inheritance path from some passed [Type] t o Object. This
6706 * method calls itself recursively, callers should use the public method 6705 * method calls itself recursively, callers should use the public method
6707 * [computeLongestInheritancePathToObject]. 6706 * [computeLongestInheritancePathToObject].
6708 * 6707 *
6709 * @param type the [Type] to compute the longest inheritance path of from the passed 6708 * @param type the [Type] to compute the longest inheritance path of from the passed
6710 * [Type] to Object 6709 * [Type] to Object
6711 * @param depth a field used recursively 6710 * @param depth a field used recursively
6712 * @param visitedClasses the classes that have already been visited 6711 * @param visitedClasses the classes that have already been visited
6713 * @return the computed longest inheritance path to Object 6712 * @return the computed longest inheritance path to Object
6714 * @see #computeLongestInheritancePathToObject(Type) 6713 * See [computeLongestInheritancePathToObject], and [getLeastUpperBound].
6715 * @see #getLeastUpperBound(Type)
6716 */ 6714 */
6717 static int _computeLongestInheritancePathToObject(InterfaceType type, int dept h, HashSet<ClassElement> visitedClasses) { 6715 static int _computeLongestInheritancePathToObject(InterfaceType type, int dept h, HashSet<ClassElement> visitedClasses) {
6718 ClassElement classElement = type.element; 6716 ClassElement classElement = type.element;
6719 // Object case 6717 // Object case
6720 if (classElement.supertype == null || visitedClasses.contains(classElement)) { 6718 if (classElement.supertype == null || visitedClasses.contains(classElement)) {
6721 return depth; 6719 return depth;
6722 } 6720 }
6723 int longestPath = 1; 6721 int longestPath = 1;
6724 try { 6722 try {
6725 visitedClasses.add(classElement); 6723 visitedClasses.add(classElement);
(...skipping 22 matching lines...) Expand all
6748 return longestPath; 6746 return longestPath;
6749 } 6747 }
6750 6748
6751 /** 6749 /**
6752 * Returns the set of all superinterfaces of the passed [Type]. This is a recu rsive method, 6750 * Returns the set of all superinterfaces of the passed [Type]. This is a recu rsive method,
6753 * callers should call the public [computeSuperinterfaceSet]. 6751 * callers should call the public [computeSuperinterfaceSet].
6754 * 6752 *
6755 * @param type the [Type] to compute the set of superinterfaces of 6753 * @param type the [Type] to compute the set of superinterfaces of
6756 * @param set a [HashSet] used recursively by this method 6754 * @param set a [HashSet] used recursively by this method
6757 * @return the [Set] of superinterfaces of the passed [Type] 6755 * @return the [Set] of superinterfaces of the passed [Type]
6758 * @see #computeSuperinterfaceSet(Type) 6756 * See [computeSuperinterfaceSet], and [getLeastUpperBound].
6759 * @see #getLeastUpperBound(Type)
6760 */ 6757 */
6761 static Set<InterfaceType> _computeSuperinterfaceSet(InterfaceType type, HashSe t<InterfaceType> set) { 6758 static Set<InterfaceType> _computeSuperinterfaceSet(InterfaceType type, HashSe t<InterfaceType> set) {
6762 Element element = type.element; 6759 Element element = type.element;
6763 if (element != null) { 6760 if (element != null) {
6764 List<InterfaceType> superinterfaces = type.interfaces; 6761 List<InterfaceType> superinterfaces = type.interfaces;
6765 for (InterfaceType superinterface in superinterfaces) { 6762 for (InterfaceType superinterface in superinterfaces) {
6766 if (set.add(superinterface)) { 6763 if (set.add(superinterface)) {
6767 _computeSuperinterfaceSet(superinterface, set); 6764 _computeSuperinterfaceSet(superinterface, set);
6768 } 6765 }
6769 } 6766 }
(...skipping 5011 matching lines...) Expand 10 before | Expand all | Expand 10 after
11781 if (type is UnionType) { 11778 if (type is UnionType) {
11782 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); 11779 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs);
11783 } 11780 }
11784 // The only subtype relations that pertain to void are therefore: 11781 // The only subtype relations that pertain to void are therefore:
11785 // void <: void (by reflexivity) 11782 // void <: void (by reflexivity)
11786 // bottom <: void (as bottom is a subtype of all types). 11783 // bottom <: void (as bottom is a subtype of all types).
11787 // void <: dynamic (as dynamic is a supertype of all types) 11784 // void <: dynamic (as dynamic is a supertype of all types)
11788 return identical(type, this) || type.isDynamic; 11785 return identical(type, this) || type.isDynamic;
11789 } 11786 }
11790 } 11787 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | pkg/analyzer/lib/src/generated/element_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698