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

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

Issue 679403005: Fix documentation (for issue 19253) (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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after
2618 buffer.write(type.returnType); 2618 buffer.write(type.returnType);
2619 } 2619 }
2620 return buffer.toString(); 2620 return buffer.toString();
2621 } 2621 }
2622 2622
2623 @override 2623 @override
2624 InterfaceType get definingType => super.definingType as InterfaceType; 2624 InterfaceType get definingType => super.definingType as InterfaceType;
2625 } 2625 }
2626 2626
2627 /** 2627 /**
2628 * The interface `Type` defines the behavior of objects representing the declare d type of 2628 * The interface `DartType` defines the behavior of objects representing the
scheglov 2014/11/06 16:39:19 If it is not [DartType], then it will become out o
2629 * elements in the element model. 2629 * declared type of elements in the element model.
2630 */ 2630 */
2631 abstract class DartType { 2631 abstract class DartType {
2632 /** 2632 /**
2633 * Return the name of this type as it should appear when presented to users in contexts such as 2633 * Return the name of this type as it should appear when presented to users in
2634 * error messages. 2634 * contexts such as error messages.
2635 *
2636 * @return the name of this type
2637 */ 2635 */
2638 String get displayName; 2636 String get displayName;
2639 2637
2640 /** 2638 /**
2641 * Return the element representing the declaration of this type, or `null` if the type has 2639 * Return the element representing the declaration of this type, or `null` if
2642 * not, or cannot, be associated with an element. The former case will occur i f the element model 2640 * the type has not, or cannot, be associated with an element. The former case
2643 * is not yet complete; the latter case will occur if this object represents a n undefined type. 2641 * will occur if the element model is not yet complete; the latter case will
2644 * 2642 * occur if this object represents an undefined type.
2645 * @return the element representing the declaration of this type
2646 */ 2643 */
2647 Element get element; 2644 Element get element;
2648 2645
2649 /** 2646 /**
2650 * Return the least upper bound of this type and the given type, or `null` if there is no 2647 * Return the least upper bound of this type and the given [type], or `null`
2651 * least upper bound. 2648 * if there is no least upper bound.
2652 *
2653 * @param type the other type used to compute the least upper bound
2654 * @return the least upper bound of this type and the given type
2655 */ 2649 */
2656 DartType getLeastUpperBound(DartType type); 2650 DartType getLeastUpperBound(DartType type);
2657 2651
2658 /** 2652 /**
2659 * Return the name of this type, or `null` if the type does not have a name, s uch as when 2653 * Return the name of this type, or `null` if the type does not have a name,
2660 * the type represents the type of an unnamed function. 2654 * such as when the type represents the type of an unnamed function.
2661 *
2662 * @return the name of this type
2663 */ 2655 */
2664 String get name; 2656 String get name;
2665 2657
2666 /** 2658 /**
2667 * Return `true` if this type is assignable to the given type. A type <i>T</i> may be 2659 * Return `true` if this type is assignable to the given [type]. A type
2668 * assigned to a type <i>S</i>, written <i>T</i> &hArr; <i>S</i>, iff either < i>T</i> <: <i>S</i> 2660 * <i>T</i> may be assigned to a type <i>S</i>, written <i>T</i> &hArr;
2669 * or <i>S</i> <: <i>T</i>. 2661 * <i>S</i>, iff either <i>T</i> <: <i>S</i> or <i>S</i> <: <i>T</i>.
2670 *
2671 * @param type the type being compared with this type
2672 * @return `true` if this type is assignable to the given type
2673 */ 2662 */
2674 bool isAssignableTo(DartType type); 2663 bool isAssignableTo(DartType type);
2675 2664
2676 /** 2665 /**
2677 * Return `true` if this type represents the bottom type. 2666 * Return `true` if this type represents the bottom type.
2678 *
2679 * @return `true` if this type represents the bottom type
2680 */ 2667 */
2681 bool get isBottom; 2668 bool get isBottom;
2682 2669
2683 /** 2670 /**
2684 * Return `true` if this type represents the type 'Function' defined in the da rt:core 2671 * Return `true` if this type represents the type 'Function' defined in the
2685 * library. 2672 * dart:core library.
2686 *
2687 * @return `true` if this type represents the type 'Function' defined in the d art:core
2688 * library
2689 */ 2673 */
2690 bool get isDartCoreFunction; 2674 bool get isDartCoreFunction;
2691 2675
2692 /** 2676 /**
2693 * Return `true` if this type represents the type 'dynamic'. 2677 * Return `true` if this type represents the type 'dynamic'.
2694 *
2695 * @return `true` if this type represents the type 'dynamic'
2696 */ 2678 */
2697 bool get isDynamic; 2679 bool get isDynamic;
2698 2680
2699 /** 2681 /**
2700 * Return `true` if this type is more specific than the given type. 2682 * Return `true` if this type is more specific than the given [type].
2701 *
2702 * @param type the type being compared with this type
2703 * @return `true` if this type is more specific than the given type
2704 */ 2683 */
2705 bool isMoreSpecificThan(DartType type); 2684 bool isMoreSpecificThan(DartType type);
2706 2685
2707 /** 2686 /**
2708 * Return `true` if this type represents the type 'Object'. 2687 * Return `true` if this type represents the type 'Object'.
2709 *
2710 * @return `true` if this type represents the type 'Object'
2711 */ 2688 */
2712 bool get isObject; 2689 bool get isObject;
2713 2690
2714 /** 2691 /**
2715 * Return `true` if this type is a subtype of the given type. 2692 * Return `true` if this type is a subtype of the given [type].
2716 *
2717 * @param type the type being compared with this type
2718 * @return `true` if this type is a subtype of the given type
2719 */ 2693 */
2720 bool isSubtypeOf(DartType type); 2694 bool isSubtypeOf(DartType type);
2721 2695
2722 /** 2696 /**
2723 * Return `true` if this type is a supertype of the given type. A type <i>S</i > is a 2697 * Return `true` if this type is a supertype of the given [type]. A type
2724 * supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff <i>T</i> is a subt ype of <i>S</i>. 2698 * <i>S</i> is a supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff
2725 * 2699 * <i>T</i> is a subtype of <i>S</i>.
2726 * @param type the type being compared with this type
2727 * @return `true` if this type is a supertype of the given type
2728 */ 2700 */
2729 bool isSupertypeOf(DartType type); 2701 bool isSupertypeOf(DartType type);
2730 2702
2731 /** 2703 /**
2732 * Return `true` if this type represents a typename that couldn't be 2704 * Return `true` if this type represents a typename that couldn't be resolved.
2733 * resolved.
2734 */ 2705 */
2735 bool get isUndefined; 2706 bool get isUndefined;
2736 2707
2737 /** 2708 /**
2738 * Return `true` if this type represents the type 'void'. 2709 * Return `true` if this type represents the type 'void'.
2739 *
2740 * @return `true` if this type represents the type 'void'
2741 */ 2710 */
2742 bool get isVoid; 2711 bool get isVoid;
2743 2712
2744 /** 2713 /**
2745 * Return the type resulting from substituting the given arguments for the giv en parameters in 2714 * Return the type resulting from substituting the given [argumentTypes] for
2746 * this type. The specification defines this operation in section 2: <blockquo te> The notation 2715 * the given [parameterTypes] in this type. The specification defines this
2747 * <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ..., y<sub>n</sub>]E</ i> denotes a copy of 2716 * operation in section 2:
2748 * <i>E</i> in which all occurrences of <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with 2717 * <blockquote>
2749 * <i>x<sub>i</sub></i>.</blockquote> Note that, contrary to the specification , this method will 2718 * The notation <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ...,
2750 * not create a copy of this type if no substitutions were required, but will return this type 2719 * y<sub>n</sub>]E</i> denotes a copy of <i>E</i> in which all occurrences of
2751 * directly. 2720 * <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
2721 * <i>x<sub>i</sub></i>.
2722 * </blockquote>
2723 * Note that, contrary to the specification, this method will not create a
2724 * copy of this type if no substitutions were required, but will return this
2725 * type directly.
2752 * 2726 *
2753 * @param argumentTypes the actual type arguments being substituted for the pa rameters 2727 * Note too that the current implementation of this method is only guaranteed
2754 * @param parameterTypes the parameters to be replaced 2728 * to work when the argument types are type variables.
2755 * @return the result of performing the substitution
2756 */ 2729 */
2757 DartType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es); 2730 DartType substitute2(List<DartType> argumentTypes, List<DartType> parameterTyp es);
2758 } 2731 }
2759 2732
2760 /** 2733 /**
2761 * Instances of the class `DefaultFieldFormalParameterElementImpl` implement a 2734 * Instances of the class `DefaultFieldFormalParameterElementImpl` implement a
2762 * `FieldFormalParameterElementImpl` for parameters that have an initializer. 2735 * `FieldFormalParameterElementImpl` for parameters that have an initializer.
2763 */ 2736 */
2764 class DefaultFieldFormalParameterElementImpl extends FieldFormalParameterElement Impl { 2737 class DefaultFieldFormalParameterElementImpl extends FieldFormalParameterElement Impl {
2765 /** 2738 /**
(...skipping 9020 matching lines...) Expand 10 before | Expand all | Expand 10 after
11786 if (type is UnionType) { 11759 if (type is UnionType) {
11787 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs); 11760 return (type as UnionTypeImpl).internalUnionTypeIsSuperTypeOf(this, visite dTypePairs);
11788 } 11761 }
11789 // The only subtype relations that pertain to void are therefore: 11762 // The only subtype relations that pertain to void are therefore:
11790 // void <: void (by reflexivity) 11763 // void <: void (by reflexivity)
11791 // bottom <: void (as bottom is a subtype of all types). 11764 // bottom <: void (as bottom is a subtype of all types).
11792 // void <: dynamic (as dynamic is a supertype of all types) 11765 // void <: dynamic (as dynamic is a supertype of all types)
11793 return identical(type, this) || type.isDynamic; 11766 return identical(type, this) || type.isDynamic;
11794 } 11767 }
11795 } 11768 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698