| OLD | NEW |
| 1 // This code was auto-generated, is not intended to be edited, and is subject to | 1 // This code was auto-generated, is not intended to be edited, and is subject to |
| 2 // significant change. Please see the README file for more information. | 2 // significant change. Please see the README file for more information. |
| 3 library engine.element; | 3 library engine.element; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'java_core.dart'; | 5 import 'java_core.dart'; |
| 6 import 'java_engine.dart'; | 6 import 'java_engine.dart'; |
| 7 import 'utilities_collection.dart'; | 7 import 'utilities_collection.dart'; |
| 8 import 'source.dart'; | 8 import 'source.dart'; |
| 9 import 'scanner.dart' show Keyword; | 9 import 'scanner.dart' show Keyword; |
| 10 import 'ast.dart' show Identifier, LibraryIdentifier; | 10 import 'ast.dart' show Identifier, LibraryIdentifier; |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 static ElementKind of(Element element) { | 633 static ElementKind of(Element element) { |
| 634 if (element == null) { | 634 if (element == null) { |
| 635 return ERROR; | 635 return ERROR; |
| 636 } | 636 } |
| 637 return element.kind; | 637 return element.kind; |
| 638 } | 638 } |
| 639 | 639 |
| 640 /** | 640 /** |
| 641 * The name displayed in the UI for this kind of element. | 641 * The name displayed in the UI for this kind of element. |
| 642 */ | 642 */ |
| 643 String _displayName; | 643 String displayName; |
| 644 | 644 |
| 645 /** | 645 /** |
| 646 * Initialize a newly created element kind to have the given display name. | 646 * Initialize a newly created element kind to have the given display name. |
| 647 * | 647 * |
| 648 * @param displayName the name displayed in the UI for this kind of element | 648 * @param displayName the name displayed in the UI for this kind of element |
| 649 */ | 649 */ |
| 650 ElementKind(String name, int ordinal, String displayName) : super(name, ordina
l) { | 650 ElementKind(String name, int ordinal, String displayName) : super(name, ordina
l) { |
| 651 this._displayName = displayName; | 651 this.displayName = displayName; |
| 652 } | 652 } |
| 653 | |
| 654 /** | |
| 655 * Return the name displayed in the UI for this kind of element. | |
| 656 * | |
| 657 * @return the name of this [ElementKind] to display in UI. | |
| 658 */ | |
| 659 String get displayName => _displayName; | |
| 660 } | 653 } |
| 661 /** | 654 /** |
| 662 * The interface `ElementLocation` defines the behavior of objects that represen
t the location | 655 * The interface `ElementLocation` defines the behavior of objects that represen
t the location |
| 663 * of an element within the element model. | 656 * of an element within the element model. |
| 664 * | 657 * |
| 665 * @coverage dart.engine.element | 658 * @coverage dart.engine.element |
| 666 */ | 659 */ |
| 667 abstract class ElementLocation { | 660 abstract class ElementLocation { |
| 668 | 661 |
| 669 /** | 662 /** |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 * [AuxiliaryElements]. Since resolved elements are either statically resolved o
r resolved | 1708 * [AuxiliaryElements]. Since resolved elements are either statically resolved o
r resolved |
| 1716 * using propagated type information, this class is a wrapper for a pair of | 1709 * using propagated type information, this class is a wrapper for a pair of |
| 1717 * [ExecutableElement]s, not just a single [ExecutableElement]. | 1710 * [ExecutableElement]s, not just a single [ExecutableElement]. |
| 1718 */ | 1711 */ |
| 1719 class AuxiliaryElements { | 1712 class AuxiliaryElements { |
| 1720 | 1713 |
| 1721 /** | 1714 /** |
| 1722 * The element based on propagated type information, or `null` if the AST stru
cture has not | 1715 * The element based on propagated type information, or `null` if the AST stru
cture has not |
| 1723 * been resolved or if this identifier could not be resolved. | 1716 * been resolved or if this identifier could not be resolved. |
| 1724 */ | 1717 */ |
| 1725 ExecutableElement _propagatedElement; | 1718 ExecutableElement propagatedElement; |
| 1726 | 1719 |
| 1727 /** | 1720 /** |
| 1728 * The element associated with this identifier based on static type informatio
n, or `null` | 1721 * The element associated with this identifier based on static type informatio
n, or `null` |
| 1729 * if the AST structure has not been resolved or if this identifier could not
be resolved. | 1722 * if the AST structure has not been resolved or if this identifier could not
be resolved. |
| 1730 */ | 1723 */ |
| 1731 ExecutableElement _staticElement; | 1724 ExecutableElement staticElement; |
| 1732 | 1725 |
| 1733 /** | 1726 /** |
| 1734 * Create the [AuxiliaryElements] with a static and propagated [ExecutableElem
ent]. | 1727 * Create the [AuxiliaryElements] with a static and propagated [ExecutableElem
ent]. |
| 1735 * | 1728 * |
| 1736 * @param staticElement the static element | 1729 * @param staticElement the static element |
| 1737 * @param propagatedElement the propagated element | 1730 * @param propagatedElement the propagated element |
| 1738 */ | 1731 */ |
| 1739 AuxiliaryElements(ExecutableElement staticElement, ExecutableElement propagate
dElement) { | 1732 AuxiliaryElements(ExecutableElement staticElement, ExecutableElement propagate
dElement) { |
| 1740 this._staticElement = staticElement; | 1733 this.staticElement = staticElement; |
| 1741 this._propagatedElement = propagatedElement; | 1734 this.propagatedElement = propagatedElement; |
| 1742 } | 1735 } |
| 1743 | |
| 1744 /** | |
| 1745 * Get the propagated element. | |
| 1746 */ | |
| 1747 ExecutableElement get propagatedElement => _propagatedElement; | |
| 1748 | |
| 1749 /** | |
| 1750 * Get the static element. | |
| 1751 */ | |
| 1752 ExecutableElement get staticElement => _staticElement; | |
| 1753 } | 1736 } |
| 1754 /** | 1737 /** |
| 1755 * Instances of the class `ClassElementImpl` implement a `ClassElement`. | 1738 * Instances of the class `ClassElementImpl` implement a `ClassElement`. |
| 1756 * | 1739 * |
| 1757 * @coverage dart.engine.element | 1740 * @coverage dart.engine.element |
| 1758 */ | 1741 */ |
| 1759 class ClassElementImpl extends ElementImpl implements ClassElement { | 1742 class ClassElementImpl extends ElementImpl implements ClassElement { |
| 1760 | 1743 |
| 1761 /** | 1744 /** |
| 1762 * An array containing all of the accessors (getters and setters) contained in
this class. | 1745 * An array containing all of the accessors (getters and setters) contained in
this class. |
| (...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2624 /** | 2607 /** |
| 2625 * Return the unique instance of this class. | 2608 * Return the unique instance of this class. |
| 2626 * | 2609 * |
| 2627 * @return the unique instance of this class | 2610 * @return the unique instance of this class |
| 2628 */ | 2611 */ |
| 2629 static DynamicElementImpl get instance => DynamicTypeImpl.instance.element as
DynamicElementImpl; | 2612 static DynamicElementImpl get instance => DynamicTypeImpl.instance.element as
DynamicElementImpl; |
| 2630 | 2613 |
| 2631 /** | 2614 /** |
| 2632 * The type defined by this element. | 2615 * The type defined by this element. |
| 2633 */ | 2616 */ |
| 2634 DynamicTypeImpl _type; | 2617 DynamicTypeImpl type; |
| 2635 | 2618 |
| 2636 /** | 2619 /** |
| 2637 * Initialize a newly created instance of this class. Instances of this class
should <b>not</b> be | 2620 * Initialize a newly created instance of this class. Instances of this class
should <b>not</b> be |
| 2638 * created except as part of creating the type associated with this element. T
he single instance | 2621 * created except as part of creating the type associated with this element. T
he single instance |
| 2639 * of this class should be accessed through the method [getInstance]. | 2622 * of this class should be accessed through the method [getInstance]. |
| 2640 */ | 2623 */ |
| 2641 DynamicElementImpl() : super.con2(Keyword.DYNAMIC.syntax, -1) { | 2624 DynamicElementImpl() : super.con2(Keyword.DYNAMIC.syntax, -1) { |
| 2642 setModifier(Modifier.SYNTHETIC, true); | 2625 setModifier(Modifier.SYNTHETIC, true); |
| 2643 } | 2626 } |
| 2644 accept(ElementVisitor visitor) => null; | 2627 accept(ElementVisitor visitor) => null; |
| 2645 ElementKind get kind => ElementKind.DYNAMIC; | 2628 ElementKind get kind => ElementKind.DYNAMIC; |
| 2646 | |
| 2647 /** | |
| 2648 * Return the type defined by this element. | |
| 2649 * | |
| 2650 * @return the type defined by this element | |
| 2651 */ | |
| 2652 DynamicTypeImpl get type => _type; | |
| 2653 | |
| 2654 /** | |
| 2655 * Set the type defined by this element to the given type. | |
| 2656 * | |
| 2657 * @param type the type defined by this element | |
| 2658 */ | |
| 2659 void set type(DynamicTypeImpl type2) { | |
| 2660 this._type = type2; | |
| 2661 } | |
| 2662 } | 2629 } |
| 2663 /** | 2630 /** |
| 2664 * Instances of the class `ElementAnnotationImpl` implement an [ElementAnnotatio
n]. | 2631 * Instances of the class `ElementAnnotationImpl` implement an [ElementAnnotatio
n]. |
| 2665 * | 2632 * |
| 2666 * @coverage dart.engine.element | 2633 * @coverage dart.engine.element |
| 2667 */ | 2634 */ |
| 2668 class ElementAnnotationImpl implements ElementAnnotation { | 2635 class ElementAnnotationImpl implements ElementAnnotation { |
| 2669 | 2636 |
| 2670 /** | 2637 /** |
| 2671 * The element representing the field, variable, or constructor being used as
an annotation. | 2638 * The element representing the field, variable, or constructor being used as
an annotation. |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2920 /** | 2887 /** |
| 2921 * Instances of the class `ElementLocationImpl` implement an [ElementLocation]. | 2888 * Instances of the class `ElementLocationImpl` implement an [ElementLocation]. |
| 2922 * | 2889 * |
| 2923 * @coverage dart.engine.element | 2890 * @coverage dart.engine.element |
| 2924 */ | 2891 */ |
| 2925 class ElementLocationImpl implements ElementLocation { | 2892 class ElementLocationImpl implements ElementLocation { |
| 2926 | 2893 |
| 2927 /** | 2894 /** |
| 2928 * The path to the element whose location is represented by this object. | 2895 * The path to the element whose location is represented by this object. |
| 2929 */ | 2896 */ |
| 2930 List<String> _components; | 2897 List<String> components; |
| 2931 | 2898 |
| 2932 /** | 2899 /** |
| 2933 * The character used to separate components in the encoded form. | 2900 * The character used to separate components in the encoded form. |
| 2934 */ | 2901 */ |
| 2935 static int _SEPARATOR_CHAR = 0x3B; | 2902 static int _SEPARATOR_CHAR = 0x3B; |
| 2936 | 2903 |
| 2937 /** | 2904 /** |
| 2938 * Initialize a newly created location to represent the given element. | 2905 * Initialize a newly created location to represent the given element. |
| 2939 * | 2906 * |
| 2940 * @param element the element whose location is being represented | 2907 * @param element the element whose location is being represented |
| 2941 */ | 2908 */ |
| 2942 ElementLocationImpl.con1(Element element) { | 2909 ElementLocationImpl.con1(Element element) { |
| 2943 List<String> components = new List<String>(); | 2910 List<String> components = new List<String>(); |
| 2944 Element ancestor = element; | 2911 Element ancestor = element; |
| 2945 while (ancestor != null) { | 2912 while (ancestor != null) { |
| 2946 components.insert(0, ((ancestor as ElementImpl)).identifier); | 2913 components.insert(0, ((ancestor as ElementImpl)).identifier); |
| 2947 ancestor = ancestor.enclosingElement; | 2914 ancestor = ancestor.enclosingElement; |
| 2948 } | 2915 } |
| 2949 this._components = new List.from(components); | 2916 this.components = new List.from(components); |
| 2950 } | 2917 } |
| 2951 | 2918 |
| 2952 /** | 2919 /** |
| 2953 * Initialize a newly created location from the given encoded form. | 2920 * Initialize a newly created location from the given encoded form. |
| 2954 * | 2921 * |
| 2955 * @param encoding the encoded form of a location | 2922 * @param encoding the encoded form of a location |
| 2956 */ | 2923 */ |
| 2957 ElementLocationImpl.con2(String encoding) { | 2924 ElementLocationImpl.con2(String encoding) { |
| 2958 this._components = decode(encoding); | 2925 this.components = decode(encoding); |
| 2959 } | 2926 } |
| 2960 bool operator ==(Object object) { | 2927 bool operator ==(Object object) { |
| 2961 if (object is! ElementLocationImpl) { | 2928 if (object is! ElementLocationImpl) { |
| 2962 return false; | 2929 return false; |
| 2963 } | 2930 } |
| 2964 ElementLocationImpl location = object as ElementLocationImpl; | 2931 ElementLocationImpl location = object as ElementLocationImpl; |
| 2965 List<String> otherComponents = location._components; | 2932 List<String> otherComponents = location.components; |
| 2966 int length = _components.length; | 2933 int length = components.length; |
| 2967 if (otherComponents.length != length) { | 2934 if (otherComponents.length != length) { |
| 2968 return false; | 2935 return false; |
| 2969 } | 2936 } |
| 2970 if (length > 0 && !equalSourceComponents(_components[0], otherComponents[0])
) { | 2937 if (length > 0 && !equalSourceComponents(components[0], otherComponents[0]))
{ |
| 2971 return false; | 2938 return false; |
| 2972 } | 2939 } |
| 2973 if (length > 1 && !equalSourceComponents(_components[1], otherComponents[1])
) { | 2940 if (length > 1 && !equalSourceComponents(components[1], otherComponents[1]))
{ |
| 2974 return false; | 2941 return false; |
| 2975 } | 2942 } |
| 2976 for (int i = 2; i < length; i++) { | 2943 for (int i = 2; i < length; i++) { |
| 2977 if (_components[i] != otherComponents[i]) { | 2944 if (components[i] != otherComponents[i]) { |
| 2978 return false; | 2945 return false; |
| 2979 } | 2946 } |
| 2980 } | 2947 } |
| 2981 return true; | 2948 return true; |
| 2982 } | 2949 } |
| 2983 | |
| 2984 /** | |
| 2985 * Return the path to the element whose location is represented by this object
. | |
| 2986 * | |
| 2987 * @return the path to the element whose location is represented by this objec
t | |
| 2988 */ | |
| 2989 List<String> get components => _components; | |
| 2990 String get encoding { | 2950 String get encoding { |
| 2991 JavaStringBuilder builder = new JavaStringBuilder(); | 2951 JavaStringBuilder builder = new JavaStringBuilder(); |
| 2992 int length = _components.length; | 2952 int length = components.length; |
| 2993 for (int i = 0; i < length; i++) { | 2953 for (int i = 0; i < length; i++) { |
| 2994 if (i > 0) { | 2954 if (i > 0) { |
| 2995 builder.appendChar(_SEPARATOR_CHAR); | 2955 builder.appendChar(_SEPARATOR_CHAR); |
| 2996 } | 2956 } |
| 2997 encode(builder, _components[i]); | 2957 encode(builder, components[i]); |
| 2998 } | 2958 } |
| 2999 return builder.toString(); | 2959 return builder.toString(); |
| 3000 } | 2960 } |
| 3001 int get hashCode { | 2961 int get hashCode { |
| 3002 int result = 1; | 2962 int result = 1; |
| 3003 for (int i = 0; i < _components.length; i++) { | 2963 for (int i = 0; i < components.length; i++) { |
| 3004 String component = _components[i]; | 2964 String component = components[i]; |
| 3005 int componentHash; | 2965 int componentHash; |
| 3006 if (i <= 1) { | 2966 if (i <= 1) { |
| 3007 componentHash = hashSourceComponent(component); | 2967 componentHash = hashSourceComponent(component); |
| 3008 } else { | 2968 } else { |
| 3009 componentHash = component.hashCode; | 2969 componentHash = component.hashCode; |
| 3010 } | 2970 } |
| 3011 result = 31 * result + componentHash; | 2971 result = 31 * result + componentHash; |
| 3012 } | 2972 } |
| 3013 return result; | 2973 return result; |
| 3014 } | 2974 } |
| (...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3941 /** | 3901 /** |
| 3942 * Instances of the class `LabelElementImpl` implement a `LabelElement`. | 3902 * Instances of the class `LabelElementImpl` implement a `LabelElement`. |
| 3943 * | 3903 * |
| 3944 * @coverage dart.engine.element | 3904 * @coverage dart.engine.element |
| 3945 */ | 3905 */ |
| 3946 class LabelElementImpl extends ElementImpl implements LabelElement { | 3906 class LabelElementImpl extends ElementImpl implements LabelElement { |
| 3947 | 3907 |
| 3948 /** | 3908 /** |
| 3949 * A flag indicating whether this label is associated with a `switch` statemen
t. | 3909 * A flag indicating whether this label is associated with a `switch` statemen
t. |
| 3950 */ | 3910 */ |
| 3951 bool _onSwitchStatement = false; | 3911 bool isOnSwitchStatement = false; |
| 3952 | 3912 |
| 3953 /** | 3913 /** |
| 3954 * A flag indicating whether this label is associated with a `switch` member (
`case` | 3914 * A flag indicating whether this label is associated with a `switch` member (
`case` |
| 3955 * or `default`). | 3915 * or `default`). |
| 3956 */ | 3916 */ |
| 3957 bool _onSwitchMember = false; | 3917 bool isOnSwitchMember = false; |
| 3958 | 3918 |
| 3959 /** | 3919 /** |
| 3960 * An empty array of label elements. | 3920 * An empty array of label elements. |
| 3961 */ | 3921 */ |
| 3962 static List<LabelElement> EMPTY_ARRAY = new List<LabelElement>(0); | 3922 static List<LabelElement> EMPTY_ARRAY = new List<LabelElement>(0); |
| 3963 | 3923 |
| 3964 /** | 3924 /** |
| 3965 * Initialize a newly created label element to have the given name. | 3925 * Initialize a newly created label element to have the given name. |
| 3966 * | 3926 * |
| 3967 * @param name the name of this element | 3927 * @param name the name of this element |
| 3968 * @param onSwitchStatement `true` if this label is associated with a `switch` | 3928 * @param onSwitchStatement `true` if this label is associated with a `switch` |
| 3969 * statement | 3929 * statement |
| 3970 * @param onSwitchMember `true` if this label is associated with a `switch` me
mber | 3930 * @param onSwitchMember `true` if this label is associated with a `switch` me
mber |
| 3971 */ | 3931 */ |
| 3972 LabelElementImpl(Identifier name, bool onSwitchStatement, bool onSwitchMember)
: super.con1(name) { | 3932 LabelElementImpl(Identifier name, bool onSwitchStatement, bool onSwitchMember)
: super.con1(name) { |
| 3973 this._onSwitchStatement = onSwitchStatement; | 3933 this.isOnSwitchStatement = onSwitchStatement; |
| 3974 this._onSwitchMember = onSwitchMember; | 3934 this.isOnSwitchMember = onSwitchMember; |
| 3975 } | 3935 } |
| 3976 accept(ElementVisitor visitor) => visitor.visitLabelElement(this); | 3936 accept(ElementVisitor visitor) => visitor.visitLabelElement(this); |
| 3977 ExecutableElement get enclosingElement => super.enclosingElement as Executable
Element; | 3937 ExecutableElement get enclosingElement => super.enclosingElement as Executable
Element; |
| 3978 ElementKind get kind => ElementKind.LABEL; | 3938 ElementKind get kind => ElementKind.LABEL; |
| 3979 | |
| 3980 /** | |
| 3981 * Return `true` if this label is associated with a `switch` member (`case` or | |
| 3982 * `default`). | |
| 3983 * | |
| 3984 * @return `true` if this label is associated with a `switch` member | |
| 3985 */ | |
| 3986 bool get isOnSwitchMember => _onSwitchMember; | |
| 3987 | |
| 3988 /** | |
| 3989 * Return `true` if this label is associated with a `switch` statement. | |
| 3990 * | |
| 3991 * @return `true` if this label is associated with a `switch` statement | |
| 3992 */ | |
| 3993 bool get isOnSwitchStatement => _onSwitchStatement; | |
| 3994 } | 3939 } |
| 3995 /** | 3940 /** |
| 3996 * Instances of the class `LibraryElementImpl` implement a `LibraryElement`. | 3941 * Instances of the class `LibraryElementImpl` implement a `LibraryElement`. |
| 3997 * | 3942 * |
| 3998 * @coverage dart.engine.element | 3943 * @coverage dart.engine.element |
| 3999 */ | 3944 */ |
| 4000 class LibraryElementImpl extends ElementImpl implements LibraryElement { | 3945 class LibraryElementImpl extends ElementImpl implements LibraryElement { |
| 4001 | 3946 |
| 4002 /** | 3947 /** |
| 4003 * An empty array of library elements. | 3948 * An empty array of library elements. |
| (...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5698 /** | 5643 /** |
| 5699 * The unique instance of the class `BottomTypeImpl` implements the type `bottom
`. | 5644 * The unique instance of the class `BottomTypeImpl` implements the type `bottom
`. |
| 5700 * | 5645 * |
| 5701 * @coverage dart.engine.type | 5646 * @coverage dart.engine.type |
| 5702 */ | 5647 */ |
| 5703 class BottomTypeImpl extends TypeImpl { | 5648 class BottomTypeImpl extends TypeImpl { |
| 5704 | 5649 |
| 5705 /** | 5650 /** |
| 5706 * The unique instance of this class. | 5651 * The unique instance of this class. |
| 5707 */ | 5652 */ |
| 5708 static BottomTypeImpl _INSTANCE = new BottomTypeImpl(); | 5653 static final BottomTypeImpl instance = new BottomTypeImpl(); |
| 5709 | |
| 5710 /** | |
| 5711 * Return the unique instance of this class. | |
| 5712 * | |
| 5713 * @return the unique instance of this class | |
| 5714 */ | |
| 5715 static BottomTypeImpl get instance => _INSTANCE; | |
| 5716 | 5654 |
| 5717 /** | 5655 /** |
| 5718 * Prevent the creation of instances of this class. | 5656 * Prevent the creation of instances of this class. |
| 5719 */ | 5657 */ |
| 5720 BottomTypeImpl() : super(null, "<bottom>"); | 5658 BottomTypeImpl() : super(null, "<bottom>"); |
| 5721 bool operator ==(Object object) => identical(object, this); | 5659 bool operator ==(Object object) => identical(object, this); |
| 5722 bool isMoreSpecificThan(Type2 type) => true; | 5660 bool isMoreSpecificThan(Type2 type) => true; |
| 5723 bool isSubtypeOf(Type2 type) => true; | 5661 bool isSubtypeOf(Type2 type) => true; |
| 5724 bool isSupertypeOf(Type2 type) => false; | 5662 bool isSupertypeOf(Type2 type) => false; |
| 5725 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp
es) => this; | 5663 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp
es) => this; |
| 5726 } | 5664 } |
| 5727 /** | 5665 /** |
| 5728 * The unique instance of the class `DynamicTypeImpl` implements the type `dynam
ic`. | 5666 * The unique instance of the class `DynamicTypeImpl` implements the type `dynam
ic`. |
| 5729 * | 5667 * |
| 5730 * @coverage dart.engine.type | 5668 * @coverage dart.engine.type |
| 5731 */ | 5669 */ |
| 5732 class DynamicTypeImpl extends TypeImpl { | 5670 class DynamicTypeImpl extends TypeImpl { |
| 5733 | 5671 |
| 5734 /** | 5672 /** |
| 5735 * The unique instance of this class. | 5673 * The unique instance of this class. |
| 5736 */ | 5674 */ |
| 5737 static DynamicTypeImpl _INSTANCE = new DynamicTypeImpl(); | 5675 static final DynamicTypeImpl instance = new DynamicTypeImpl(); |
| 5738 | |
| 5739 /** | |
| 5740 * Return the unique instance of this class. | |
| 5741 * | |
| 5742 * @return the unique instance of this class | |
| 5743 */ | |
| 5744 static DynamicTypeImpl get instance => _INSTANCE; | |
| 5745 | 5676 |
| 5746 /** | 5677 /** |
| 5747 * Prevent the creation of instances of this class. | 5678 * Prevent the creation of instances of this class. |
| 5748 */ | 5679 */ |
| 5749 DynamicTypeImpl() : super(new DynamicElementImpl(), Keyword.DYNAMIC.syntax) { | 5680 DynamicTypeImpl() : super(new DynamicElementImpl(), Keyword.DYNAMIC.syntax) { |
| 5750 ((element as DynamicElementImpl)).type = this; | 5681 ((element as DynamicElementImpl)).type = this; |
| 5751 } | 5682 } |
| 5752 bool operator ==(Object object) => object is DynamicTypeImpl; | 5683 bool operator ==(Object object) => object is DynamicTypeImpl; |
| 5753 bool get isDynamic => true; | 5684 bool get isDynamic => true; |
| 5754 bool isMoreSpecificThan(Type2 type) => false; | 5685 bool isMoreSpecificThan(Type2 type) => false; |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6930 /** | 6861 /** |
| 6931 * The unique instance of the class `VoidTypeImpl` implements the type `void`. | 6862 * The unique instance of the class `VoidTypeImpl` implements the type `void`. |
| 6932 * | 6863 * |
| 6933 * @coverage dart.engine.type | 6864 * @coverage dart.engine.type |
| 6934 */ | 6865 */ |
| 6935 class VoidTypeImpl extends TypeImpl implements VoidType { | 6866 class VoidTypeImpl extends TypeImpl implements VoidType { |
| 6936 | 6867 |
| 6937 /** | 6868 /** |
| 6938 * The unique instance of this class. | 6869 * The unique instance of this class. |
| 6939 */ | 6870 */ |
| 6940 static VoidTypeImpl _INSTANCE = new VoidTypeImpl(); | 6871 static final VoidTypeImpl instance = new VoidTypeImpl(); |
| 6941 | |
| 6942 /** | |
| 6943 * Return the unique instance of this class. | |
| 6944 * | |
| 6945 * @return the unique instance of this class | |
| 6946 */ | |
| 6947 static VoidTypeImpl get instance => _INSTANCE; | |
| 6948 | 6872 |
| 6949 /** | 6873 /** |
| 6950 * Prevent the creation of instances of this class. | 6874 * Prevent the creation of instances of this class. |
| 6951 */ | 6875 */ |
| 6952 VoidTypeImpl() : super(null, Keyword.VOID.syntax); | 6876 VoidTypeImpl() : super(null, Keyword.VOID.syntax); |
| 6953 bool operator ==(Object object) => identical(object, this); | 6877 bool operator ==(Object object) => identical(object, this); |
| 6954 bool isSubtypeOf(Type2 type) => identical(type, this) || identical(type, Dynam
icTypeImpl.instance); | 6878 bool isSubtypeOf(Type2 type) => identical(type, this) || identical(type, Dynam
icTypeImpl.instance); |
| 6955 bool get isVoid => true; | 6879 bool get isVoid => true; |
| 6956 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes
) => this; | 6880 VoidTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes
) => this; |
| 6957 } | 6881 } |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7553 } | 7477 } |
| 7554 /** | 7478 /** |
| 7555 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 7479 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
| 7556 * `void`. | 7480 * `void`. |
| 7557 * | 7481 * |
| 7558 * @coverage dart.engine.type | 7482 * @coverage dart.engine.type |
| 7559 */ | 7483 */ |
| 7560 abstract class VoidType implements Type2 { | 7484 abstract class VoidType implements Type2 { |
| 7561 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 7485 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 7562 } | 7486 } |
| OLD | NEW |