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

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

Issue 1023443002: Add public and export namespaces to LibraryElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 6366 matching lines...) Expand 10 before | Expand all | Expand 10 after
6377 } 6377 }
6378 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element); 6378 InterfaceTypeImpl newType = new InterfaceTypeImpl.con1(element);
6379 newType.typeArguments = newTypeArguments; 6379 newType.typeArguments = newTypeArguments;
6380 return newType; 6380 return newType;
6381 } 6381 }
6382 6382
6383 @override 6383 @override
6384 InterfaceTypeImpl substitute4(List<DartType> argumentTypes) => 6384 InterfaceTypeImpl substitute4(List<DartType> argumentTypes) =>
6385 substitute2(argumentTypes, typeArguments); 6385 substitute2(argumentTypes, typeArguments);
6386 6386
6387 /**
6388 * Return `true` if the given element has an instance method named 'call'.
6389 */
6390 bool _hasCallMethod(ClassElement elementT) {
6391 MethodElement method = elementT.lookUpMethod(
6392 FunctionElement.CALL_METHOD_NAME, elementT.library);
6393 return method != null && !method.isStatic;
6394 }
6395
6387 bool _isMoreSpecificThan(InterfaceType s, 6396 bool _isMoreSpecificThan(InterfaceType s,
6388 HashSet<ClassElement> visitedClasses, bool withDynamic, 6397 HashSet<ClassElement> visitedClasses, bool withDynamic,
6389 Set<TypeImpl_TypePair> visitedTypePairs) { 6398 Set<TypeImpl_TypePair> visitedTypePairs) {
6390 // 6399 //
6391 // A type T is more specific than a type S, written T << S, 6400 // A type T is more specific than a type S, written T << S,
6392 // if one of the following conditions is met: 6401 // if one of the following conditions is met:
6393 // 6402 //
6394 // Reflexivity: T is S. 6403 // Reflexivity: T is S.
6395 // 6404 //
6396 if (this == s) { 6405 if (this == s) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
6508 for (InterfaceType mixinType in mixinTypes) { 6517 for (InterfaceType mixinType in mixinTypes) {
6509 if ((mixinType as InterfaceTypeImpl)._isSubtypeOf( 6518 if ((mixinType as InterfaceTypeImpl)._isSubtypeOf(
6510 typeS, visitedClasses, visitedTypePairs)) { 6519 typeS, visitedClasses, visitedTypePairs)) {
6511 return true; 6520 return true;
6512 } 6521 }
6513 } 6522 }
6514 return false; 6523 return false;
6515 } 6524 }
6516 6525
6517 /** 6526 /**
6518 * Return `true` if the given element has an instance method named 'call'.
6519 */
6520 bool _hasCallMethod(ClassElement elementT) {
6521 MethodElement method = elementT.lookUpMethod(
6522 FunctionElement.CALL_METHOD_NAME, elementT.library);
6523 return method != null && !method.isStatic;
6524 }
6525
6526 /**
6527 * Return the length of the longest inheritance path from the given [type] to 6527 * Return the length of the longest inheritance path from the given [type] to
6528 * Object. 6528 * Object.
6529 * 6529 *
6530 * See [InterfaceType.getLeastUpperBound]. 6530 * See [InterfaceType.getLeastUpperBound].
6531 */ 6531 */
6532 static int computeLongestInheritancePathToObject(InterfaceType type) => 6532 static int computeLongestInheritancePathToObject(InterfaceType type) =>
6533 _computeLongestInheritancePathToObject( 6533 _computeLongestInheritancePathToObject(
6534 type, 0, new HashSet<ClassElement>()); 6534 type, 0, new HashSet<ClassElement>());
6535 6535
6536 /** 6536 /**
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
6707 */ 6707 */
6708 FunctionElement get entryPoint; 6708 FunctionElement get entryPoint;
6709 6709
6710 /** 6710 /**
6711 * Return a list containing all of the libraries that are exported from this 6711 * Return a list containing all of the libraries that are exported from this
6712 * library. 6712 * library.
6713 */ 6713 */
6714 List<LibraryElement> get exportedLibraries; 6714 List<LibraryElement> get exportedLibraries;
6715 6715
6716 /** 6716 /**
6717 * The export [Namespace] of this library, `null` if it has not been
6718 * computed yet.
6719 */
6720 Namespace get exportNamespace;
6721
6722 /**
6717 * Return a list containing all of the exports defined in this library. 6723 * Return a list containing all of the exports defined in this library.
6718 */ 6724 */
6719 List<ExportElement> get exports; 6725 List<ExportElement> get exports;
6720 6726
6721 /** 6727 /**
6722 * Return `true` if the defining compilation unit of this library contains at 6728 * Return `true` if the defining compilation unit of this library contains at
6723 * least one import directive whose URI uses the "dart-ext" scheme. 6729 * least one import directive whose URI uses the "dart-ext" scheme.
6724 */ 6730 */
6725 bool get hasExtUri; 6731 bool get hasExtUri;
6726 6732
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
6774 List<CompilationUnitElement> get parts; 6780 List<CompilationUnitElement> get parts;
6775 6781
6776 /** 6782 /**
6777 * Return a list containing elements for each of the prefixes used to `import` 6783 * Return a list containing elements for each of the prefixes used to `import`
6778 * libraries into this library. Each prefix can be used in more than one 6784 * libraries into this library. Each prefix can be used in more than one
6779 * `import` directive. 6785 * `import` directive.
6780 */ 6786 */
6781 List<PrefixElement> get prefixes; 6787 List<PrefixElement> get prefixes;
6782 6788
6783 /** 6789 /**
6790 * The public [Namespace] of this library, `null` if it has not been
6791 * computed yet.
6792 */
6793 Namespace get publicNamespace;
6794
6795 /**
6784 * Return a list containing all of the compilation units this library consists 6796 * Return a list containing all of the compilation units this library consists
6785 * of. This includes the defining compilation unit and units included using 6797 * of. This includes the defining compilation unit and units included using
6786 * the `part` directive. 6798 * the `part` directive.
6787 */ 6799 */
6788 List<CompilationUnitElement> get units; 6800 List<CompilationUnitElement> get units;
6789 6801
6790 /** 6802 /**
6791 * Return a list containing all directly and indirectly imported libraries. 6803 * Return a list containing all directly and indirectly imported libraries.
6792 */ 6804 */
6793 List<LibraryElement> get visibleLibraries; 6805 List<LibraryElement> get visibleLibraries;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
6855 */ 6867 */
6856 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY; 6868 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY;
6857 6869
6858 /** 6870 /**
6859 * The element representing the synthetic function `loadLibrary` that is 6871 * The element representing the synthetic function `loadLibrary` that is
6860 * defined for this library, or `null` if the element has not yet been created . 6872 * defined for this library, or `null` if the element has not yet been created .
6861 */ 6873 */
6862 FunctionElement _loadLibraryFunction; 6874 FunctionElement _loadLibraryFunction;
6863 6875
6864 /** 6876 /**
6877 * The export [Namespace] of this library, `null` if it has not been
6878 * computed yet.
6879 */
6880 @override
6881 Namespace exportNamespace;
6882
6883 /**
6884 * The public [Namespace] of this library, `null` if it has not been
6885 * computed yet.
6886 */
6887 @override
6888 Namespace publicNamespace;
6889
6890 /**
6865 * Initialize a newly created library element in the given [context] to have 6891 * Initialize a newly created library element in the given [context] to have
6866 * the given [name] and [offset]. 6892 * the given [name] and [offset].
6867 */ 6893 */
6868 LibraryElementImpl(this.context, String name, int offset) 6894 LibraryElementImpl(this.context, String name, int offset)
6869 : super(name, offset); 6895 : super(name, offset);
6870 6896
6871 /** 6897 /**
6872 * Initialize a newly created library element in the given [context] to have 6898 * Initialize a newly created library element in the given [context] to have
6873 * the given [name]. 6899 * the given [name].
6874 */ 6900 */
(...skipping 3557 matching lines...) Expand 10 before | Expand all | Expand 10 after
10432 // void <: void (by reflexivity) 10458 // void <: void (by reflexivity)
10433 // bottom <: void (as bottom is a subtype of all types). 10459 // bottom <: void (as bottom is a subtype of all types).
10434 // void <: dynamic (as dynamic is a supertype of all types) 10460 // void <: dynamic (as dynamic is a supertype of all types)
10435 return identical(type, this) || type.isDynamic; 10461 return identical(type, this) || type.isDynamic;
10436 } 10462 }
10437 10463
10438 @override 10464 @override
10439 VoidTypeImpl substitute2( 10465 VoidTypeImpl substitute2(
10440 List<DartType> argumentTypes, List<DartType> parameterTypes) => this; 10466 List<DartType> argumentTypes, List<DartType> parameterTypes) => this;
10441 } 10467 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/element_handle.dart » ('j') | pkg/analyzer/lib/src/task/dart.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698