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 | 3 |
4 library engine.element; | 4 library engine.element; |
5 | 5 |
6 import 'dart:collection'; | 6 import 'dart:collection'; |
7 import 'java_core.dart'; | 7 import 'java_core.dart'; |
8 import 'java_engine.dart'; | 8 import 'java_engine.dart'; |
9 import 'source.dart'; | 9 import 'source.dart'; |
10 import 'scanner.dart' show Keyword; | 10 import 'scanner.dart' show Keyword; |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 FunctionType get type; | 392 FunctionType get type; |
393 } | 393 } |
394 /** | 394 /** |
395 * The interface {@code ExportElement} defines the behavior of objects represent
ing information | 395 * The interface {@code ExportElement} defines the behavior of objects represent
ing information |
396 * about a single export directive within a library. | 396 * about a single export directive within a library. |
397 */ | 397 */ |
398 abstract class ExportElement implements Element { | 398 abstract class ExportElement implements Element { |
399 /** | 399 /** |
400 * An empty array of export elements. | 400 * An empty array of export elements. |
401 */ | 401 */ |
402 static List<ExportElement> EMPTY_ARRAY = new List<ExportElement>.fixedLength(0
); | 402 static List<ExportElement> EMPTY_ARRAY = new List<ExportElement>(0); |
403 /** | 403 /** |
404 * Return an array containing the combinators that were specified as part of t
he export directive | 404 * Return an array containing the combinators that were specified as part of t
he export directive |
405 * in the order in which they were specified. | 405 * in the order in which they were specified. |
406 * @return the combinators specified in the export directive | 406 * @return the combinators specified in the export directive |
407 */ | 407 */ |
408 List<NamespaceCombinator> get combinators; | 408 List<NamespaceCombinator> get combinators; |
409 /** | 409 /** |
410 * Return the library that is exported from this library by this export direct
ive. | 410 * Return the library that is exported from this library by this export direct
ive. |
411 * @return the library that is exported from this library | 411 * @return the library that is exported from this library |
412 */ | 412 */ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 List<LibraryElement> get libraries; | 491 List<LibraryElement> get libraries; |
492 } | 492 } |
493 /** | 493 /** |
494 * The interface {@code ImportElement} defines the behavior of objects represent
ing information | 494 * The interface {@code ImportElement} defines the behavior of objects represent
ing information |
495 * about a single import directive within a library. | 495 * about a single import directive within a library. |
496 */ | 496 */ |
497 abstract class ImportElement implements Element { | 497 abstract class ImportElement implements Element { |
498 /** | 498 /** |
499 * An empty array of import elements. | 499 * An empty array of import elements. |
500 */ | 500 */ |
501 static List<ImportElement> EMPTY_ARRAY = new List<ImportElement>.fixedLength(0
); | 501 static List<ImportElement> EMPTY_ARRAY = new List<ImportElement>(0); |
502 /** | 502 /** |
503 * Return an array containing the combinators that were specified as part of t
he import directive | 503 * Return an array containing the combinators that were specified as part of t
he import directive |
504 * in the order in which they were specified. | 504 * in the order in which they were specified. |
505 * @return the combinators specified in the import directive | 505 * @return the combinators specified in the import directive |
506 */ | 506 */ |
507 List<NamespaceCombinator> get combinators; | 507 List<NamespaceCombinator> get combinators; |
508 /** | 508 /** |
509 * Return the library that is imported into this library by this import direct
ive. | 509 * Return the library that is imported into this library by this import direct
ive. |
510 * @return the library that is imported into this library | 510 * @return the library that is imported into this library |
511 */ | 511 */ |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 List<Element> get conflictingElements; | 622 List<Element> get conflictingElements; |
623 } | 623 } |
624 /** | 624 /** |
625 * The interface {@code NamespaceCombinator} defines the behavior common to obje
cts that control how | 625 * The interface {@code NamespaceCombinator} defines the behavior common to obje
cts that control how |
626 * namespaces are combined. | 626 * namespaces are combined. |
627 */ | 627 */ |
628 abstract class NamespaceCombinator { | 628 abstract class NamespaceCombinator { |
629 /** | 629 /** |
630 * An empty array of namespace combinators. | 630 * An empty array of namespace combinators. |
631 */ | 631 */ |
632 static List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombinator>.f
ixedLength(0); | 632 static List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombinator>(0
); |
633 } | 633 } |
634 /** | 634 /** |
635 * The interface {@code ParameterElement} defines the behavior of elements repre
senting a parameter | 635 * The interface {@code ParameterElement} defines the behavior of elements repre
senting a parameter |
636 * defined within an executable element. | 636 * defined within an executable element. |
637 */ | 637 */ |
638 abstract class ParameterElement implements VariableElement { | 638 abstract class ParameterElement implements VariableElement { |
639 /** | 639 /** |
640 * Return the kind of this parameter. | 640 * Return the kind of this parameter. |
641 * @return the kind of this parameter | 641 * @return the kind of this parameter |
642 */ | 642 */ |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 * Instances of the class {@code AnnotationImpl} implement an {@link Annotation}
. | 808 * Instances of the class {@code AnnotationImpl} implement an {@link Annotation}
. |
809 */ | 809 */ |
810 class AnnotationImpl implements Annotation { | 810 class AnnotationImpl implements Annotation { |
811 /** | 811 /** |
812 * The element representing the field, variable, or constructor being used as
an annotation. | 812 * The element representing the field, variable, or constructor being used as
an annotation. |
813 */ | 813 */ |
814 Element _element; | 814 Element _element; |
815 /** | 815 /** |
816 * An empty array of annotations. | 816 * An empty array of annotations. |
817 */ | 817 */ |
818 static List<AnnotationImpl> EMPTY_ARRAY = new List<AnnotationImpl>.fixedLength
(0); | 818 static List<AnnotationImpl> EMPTY_ARRAY = new List<AnnotationImpl>(0); |
819 /** | 819 /** |
820 * Initialize a newly created annotation. | 820 * Initialize a newly created annotation. |
821 * @param element the element representing the field, variable, or constructor
being used as an | 821 * @param element the element representing the field, variable, or constructor
being used as an |
822 * annotation | 822 * annotation |
823 */ | 823 */ |
824 AnnotationImpl(Element element) { | 824 AnnotationImpl(Element element) { |
825 this._element = element; | 825 this._element = element; |
826 } | 826 } |
827 Element get element => _element; | 827 Element get element => _element; |
828 String toString() => "@${_element.toString()}"; | 828 String toString() => "@${_element.toString()}"; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 * The type defined by the class. | 864 * The type defined by the class. |
865 */ | 865 */ |
866 InterfaceType _type; | 866 InterfaceType _type; |
867 /** | 867 /** |
868 * An array containing all of the type variables defined for this class. | 868 * An array containing all of the type variables defined for this class. |
869 */ | 869 */ |
870 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; | 870 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; |
871 /** | 871 /** |
872 * An empty array of type elements. | 872 * An empty array of type elements. |
873 */ | 873 */ |
874 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>.fixedLength(0); | 874 static List<ClassElement> EMPTY_ARRAY = new List<ClassElement>(0); |
875 /** | 875 /** |
876 * Initialize a newly created class element to have the given name. | 876 * Initialize a newly created class element to have the given name. |
877 * @param name the name of this element | 877 * @param name the name of this element |
878 */ | 878 */ |
879 ClassElementImpl(Identifier name) : super.con1(name) { | 879 ClassElementImpl(Identifier name) : super.con1(name) { |
880 } | 880 } |
881 List<PropertyAccessorElement> get accessors => _accessors; | 881 List<PropertyAccessorElement> get accessors => _accessors; |
882 List<InterfaceType> get allSupertypes { | 882 List<InterfaceType> get allSupertypes { |
883 Collection<InterfaceType> list = new Set<InterfaceType>(); | 883 Collection<InterfaceType> list = new Set<InterfaceType>(); |
884 collectAllSupertypes(list); | 884 collectAllSupertypes(list); |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1206 * An array containing all of the type aliases contained in this compilation u
nit. | 1206 * An array containing all of the type aliases contained in this compilation u
nit. |
1207 */ | 1207 */ |
1208 List<TypeAliasElement> _typeAliases = TypeAliasElementImpl.EMPTY_ARRAY; | 1208 List<TypeAliasElement> _typeAliases = TypeAliasElementImpl.EMPTY_ARRAY; |
1209 /** | 1209 /** |
1210 * An array containing all of the types contained in this compilation unit. | 1210 * An array containing all of the types contained in this compilation unit. |
1211 */ | 1211 */ |
1212 List<ClassElement> _types = ClassElementImpl.EMPTY_ARRAY; | 1212 List<ClassElement> _types = ClassElementImpl.EMPTY_ARRAY; |
1213 /** | 1213 /** |
1214 * An empty array of compilation unit elements. | 1214 * An empty array of compilation unit elements. |
1215 */ | 1215 */ |
1216 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem
ent>.fixedLength(0); | 1216 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem
ent>(0); |
1217 /** | 1217 /** |
1218 * Initialize a newly created compilation unit element to have the given name. | 1218 * Initialize a newly created compilation unit element to have the given name. |
1219 * @param name the name of this element | 1219 * @param name the name of this element |
1220 */ | 1220 */ |
1221 CompilationUnitElementImpl(String name) : super.con2(name, -1) { | 1221 CompilationUnitElementImpl(String name) : super.con2(name, -1) { |
1222 } | 1222 } |
1223 bool operator ==(Object object) => identical(this.runtimeType, object.runtimeT
ype) && _source == ((object as CompilationUnitElementImpl)).source; | 1223 bool operator ==(Object object) => identical(this.runtimeType, object.runtimeT
ype) && _source == ((object as CompilationUnitElementImpl)).source; |
1224 List<PropertyAccessorElement> get accessors => _accessors; | 1224 List<PropertyAccessorElement> get accessors => _accessors; |
1225 ElementImpl getChild(String identifier20) { | 1225 ElementImpl getChild(String identifier20) { |
1226 for (PropertyAccessorElement accessor in _accessors) { | 1226 for (PropertyAccessorElement accessor in _accessors) { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 } | 1325 } |
1326 } | 1326 } |
1327 } | 1327 } |
1328 /** | 1328 /** |
1329 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons
tructorElement}. | 1329 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons
tructorElement}. |
1330 */ | 1330 */ |
1331 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { | 1331 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { |
1332 /** | 1332 /** |
1333 * An empty array of constructor elements. | 1333 * An empty array of constructor elements. |
1334 */ | 1334 */ |
1335 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>.fix
edLength(0); | 1335 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); |
1336 /** | 1336 /** |
1337 * Initialize a newly created constructor element to have the given name. | 1337 * Initialize a newly created constructor element to have the given name. |
1338 * @param name the name of this element | 1338 * @param name the name of this element |
1339 */ | 1339 */ |
1340 ConstructorElementImpl(Identifier name) : super.con1(name) { | 1340 ConstructorElementImpl(Identifier name) : super.con1(name) { |
1341 } | 1341 } |
1342 ClassElement get enclosingElement => (super.enclosingElement as ClassElement); | 1342 ClassElement get enclosingElement => (super.enclosingElement as ClassElement); |
1343 ElementKind get kind => ElementKind.CONSTRUCTOR; | 1343 ElementKind get kind => ElementKind.CONSTRUCTOR; |
1344 bool isConst() => hasModifier(Modifier.CONST); | 1344 bool isConst() => hasModifier(Modifier.CONST); |
1345 bool isFactory() => hasModifier(Modifier.FACTORY); | 1345 bool isFactory() => hasModifier(Modifier.FACTORY); |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 * An array containing all of the parameters defined by this executable elemen
t. | 1682 * An array containing all of the parameters defined by this executable elemen
t. |
1683 */ | 1683 */ |
1684 List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY; | 1684 List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY; |
1685 /** | 1685 /** |
1686 * The type of function defined by this executable element. | 1686 * The type of function defined by this executable element. |
1687 */ | 1687 */ |
1688 FunctionType _type; | 1688 FunctionType _type; |
1689 /** | 1689 /** |
1690 * An empty array of executable elements. | 1690 * An empty array of executable elements. |
1691 */ | 1691 */ |
1692 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>.fixed
Length(0); | 1692 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); |
1693 /** | 1693 /** |
1694 * Initialize a newly created executable element to have the given name. | 1694 * Initialize a newly created executable element to have the given name. |
1695 * @param name the name of this element | 1695 * @param name the name of this element |
1696 */ | 1696 */ |
1697 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { | 1697 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { |
1698 _jtd_constructor_139_impl(name); | 1698 _jtd_constructor_139_impl(name); |
1699 } | 1699 } |
1700 _jtd_constructor_139_impl(Identifier name) { | 1700 _jtd_constructor_139_impl(Identifier name) { |
1701 } | 1701 } |
1702 /** | 1702 /** |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1851 * The getter associated with this field. | 1851 * The getter associated with this field. |
1852 */ | 1852 */ |
1853 PropertyAccessorElement _getter; | 1853 PropertyAccessorElement _getter; |
1854 /** | 1854 /** |
1855 * The setter associated with this field, or {@code null} if the field is effe
ctively{@code final} and therefore does not have a setter associated with it. | 1855 * The setter associated with this field, or {@code null} if the field is effe
ctively{@code final} and therefore does not have a setter associated with it. |
1856 */ | 1856 */ |
1857 PropertyAccessorElement _setter; | 1857 PropertyAccessorElement _setter; |
1858 /** | 1858 /** |
1859 * An empty array of field elements. | 1859 * An empty array of field elements. |
1860 */ | 1860 */ |
1861 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>.fixedLength(0); | 1861 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); |
1862 /** | 1862 /** |
1863 * Initialize a newly created field element to have the given name. | 1863 * Initialize a newly created field element to have the given name. |
1864 * @param name the name of this element | 1864 * @param name the name of this element |
1865 */ | 1865 */ |
1866 FieldElementImpl.con1(Identifier name) : super.con1(name) { | 1866 FieldElementImpl.con1(Identifier name) : super.con1(name) { |
1867 _jtd_constructor_142_impl(name); | 1867 _jtd_constructor_142_impl(name); |
1868 } | 1868 } |
1869 _jtd_constructor_142_impl(Identifier name) { | 1869 _jtd_constructor_142_impl(Identifier name) { |
1870 } | 1870 } |
1871 /** | 1871 /** |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1913 */ | 1913 */ |
1914 int _visibleRangeOffset = 0; | 1914 int _visibleRangeOffset = 0; |
1915 /** | 1915 /** |
1916 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a | 1916 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a |
1917 * visible range. | 1917 * visible range. |
1918 */ | 1918 */ |
1919 int _visibleRangeLength = -1; | 1919 int _visibleRangeLength = -1; |
1920 /** | 1920 /** |
1921 * An empty array of function elements. | 1921 * An empty array of function elements. |
1922 */ | 1922 */ |
1923 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>.fixedLeng
th(0); | 1923 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); |
1924 /** | 1924 /** |
1925 * Initialize a newly created synthetic function element. | 1925 * Initialize a newly created synthetic function element. |
1926 */ | 1926 */ |
1927 FunctionElementImpl() : super.con2("", -1) { | 1927 FunctionElementImpl() : super.con2("", -1) { |
1928 _jtd_constructor_144_impl(); | 1928 _jtd_constructor_144_impl(); |
1929 } | 1929 } |
1930 _jtd_constructor_144_impl() { | 1930 _jtd_constructor_144_impl() { |
1931 synthetic = true; | 1931 synthetic = true; |
1932 } | 1932 } |
1933 /** | 1933 /** |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 return builder.toString(); | 2002 return builder.toString(); |
2003 } | 2003 } |
2004 } | 2004 } |
2005 /** | 2005 /** |
2006 * Instances of the class {@code HtmlElementImpl} implement an {@link HtmlElemen
t}. | 2006 * Instances of the class {@code HtmlElementImpl} implement an {@link HtmlElemen
t}. |
2007 */ | 2007 */ |
2008 class HtmlElementImpl extends ElementImpl implements HtmlElement { | 2008 class HtmlElementImpl extends ElementImpl implements HtmlElement { |
2009 /** | 2009 /** |
2010 * An empty array of HTML file elements. | 2010 * An empty array of HTML file elements. |
2011 */ | 2011 */ |
2012 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>.fixedLength(0); | 2012 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>(0); |
2013 /** | 2013 /** |
2014 * The analysis context in which this library is defined. | 2014 * The analysis context in which this library is defined. |
2015 */ | 2015 */ |
2016 AnalysisContext _context; | 2016 AnalysisContext _context; |
2017 /** | 2017 /** |
2018 * The libraries contained in or referenced from script tags in the HTML file. | 2018 * The libraries contained in or referenced from script tags in the HTML file. |
2019 */ | 2019 */ |
2020 List<LibraryElement> _libraries = LibraryElementImpl.EMPTY_ARRAY; | 2020 List<LibraryElement> _libraries = LibraryElementImpl.EMPTY_ARRAY; |
2021 /** | 2021 /** |
2022 * The source that corresponds to this HTML file. | 2022 * The source that corresponds to this HTML file. |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2122 * A flag indicating whether this label is associated with a {@code switch} st
atement. | 2122 * A flag indicating whether this label is associated with a {@code switch} st
atement. |
2123 */ | 2123 */ |
2124 bool _onSwitchStatement = false; | 2124 bool _onSwitchStatement = false; |
2125 /** | 2125 /** |
2126 * A flag indicating whether this label is associated with a {@code switch} me
mber ({@code case}or {@code default}). | 2126 * A flag indicating whether this label is associated with a {@code switch} me
mber ({@code case}or {@code default}). |
2127 */ | 2127 */ |
2128 bool _onSwitchMember = false; | 2128 bool _onSwitchMember = false; |
2129 /** | 2129 /** |
2130 * An empty array of label elements. | 2130 * An empty array of label elements. |
2131 */ | 2131 */ |
2132 static List<LabelElement> EMPTY_ARRAY = new List<LabelElement>.fixedLength(0); | 2132 static List<LabelElement> EMPTY_ARRAY = new List<LabelElement>(0); |
2133 /** | 2133 /** |
2134 * Initialize a newly created label element to have the given name. | 2134 * Initialize a newly created label element to have the given name. |
2135 * @param name the name of this element | 2135 * @param name the name of this element |
2136 * @param onSwitchStatement {@code true} if this label is associated with a {@
code switch}statement | 2136 * @param onSwitchStatement {@code true} if this label is associated with a {@
code switch}statement |
2137 * @param onSwitchMember {@code true} if this label is associated with a {@cod
e switch} member | 2137 * @param onSwitchMember {@code true} if this label is associated with a {@cod
e switch} member |
2138 */ | 2138 */ |
2139 LabelElementImpl(Identifier name, bool onSwitchStatement, bool onSwitchMember)
: super.con1(name) { | 2139 LabelElementImpl(Identifier name, bool onSwitchStatement, bool onSwitchMember)
: super.con1(name) { |
2140 this._onSwitchStatement = onSwitchStatement; | 2140 this._onSwitchStatement = onSwitchStatement; |
2141 this._onSwitchMember = onSwitchMember; | 2141 this._onSwitchMember = onSwitchMember; |
2142 } | 2142 } |
(...skipping 10 matching lines...) Expand all Loading... |
2153 */ | 2153 */ |
2154 bool isOnSwitchStatement() => _onSwitchStatement; | 2154 bool isOnSwitchStatement() => _onSwitchStatement; |
2155 } | 2155 } |
2156 /** | 2156 /** |
2157 * Instances of the class {@code LibraryElementImpl} implement a {@code LibraryE
lement}. | 2157 * Instances of the class {@code LibraryElementImpl} implement a {@code LibraryE
lement}. |
2158 */ | 2158 */ |
2159 class LibraryElementImpl extends ElementImpl implements LibraryElement { | 2159 class LibraryElementImpl extends ElementImpl implements LibraryElement { |
2160 /** | 2160 /** |
2161 * An empty array of library elements. | 2161 * An empty array of library elements. |
2162 */ | 2162 */ |
2163 static List<LibraryElement> EMPTY_ARRAY = new List<LibraryElement>.fixedLength
(0); | 2163 static List<LibraryElement> EMPTY_ARRAY = new List<LibraryElement>(0); |
2164 /** | 2164 /** |
2165 * The analysis context in which this library is defined. | 2165 * The analysis context in which this library is defined. |
2166 */ | 2166 */ |
2167 AnalysisContext _context; | 2167 AnalysisContext _context; |
2168 /** | 2168 /** |
2169 * The compilation unit that defines this library. | 2169 * The compilation unit that defines this library. |
2170 */ | 2170 */ |
2171 CompilationUnitElement _definingCompilationUnit; | 2171 CompilationUnitElement _definingCompilationUnit; |
2172 /** | 2172 /** |
2173 * The entry point for this library, or {@code null} if this library does not
have an entry point. | 2173 * The entry point for this library, or {@code null} if this library does not
have an entry point. |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2309 return false; | 2309 return false; |
2310 } | 2310 } |
2311 } | 2311 } |
2312 /** | 2312 /** |
2313 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. | 2313 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. |
2314 */ | 2314 */ |
2315 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { | 2315 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { |
2316 /** | 2316 /** |
2317 * An empty array of method elements. | 2317 * An empty array of method elements. |
2318 */ | 2318 */ |
2319 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>.fixedLength(0
); | 2319 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); |
2320 /** | 2320 /** |
2321 * Initialize a newly created method element to have the given name. | 2321 * Initialize a newly created method element to have the given name. |
2322 * @param name the name of this element | 2322 * @param name the name of this element |
2323 */ | 2323 */ |
2324 MethodElementImpl.con1(Identifier name) : super.con1(name) { | 2324 MethodElementImpl.con1(Identifier name) : super.con1(name) { |
2325 _jtd_constructor_151_impl(name); | 2325 _jtd_constructor_151_impl(name); |
2326 } | 2326 } |
2327 _jtd_constructor_151_impl(Identifier name) { | 2327 _jtd_constructor_151_impl(Identifier name) { |
2328 } | 2328 } |
2329 /** | 2329 /** |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2477 * Instances of the class {@code ParameterElementImpl} implement a {@code Parame
terElement}. | 2477 * Instances of the class {@code ParameterElementImpl} implement a {@code Parame
terElement}. |
2478 */ | 2478 */ |
2479 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { | 2479 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { |
2480 /** | 2480 /** |
2481 * The kind of this parameter. | 2481 * The kind of this parameter. |
2482 */ | 2482 */ |
2483 ParameterKind _parameterKind; | 2483 ParameterKind _parameterKind; |
2484 /** | 2484 /** |
2485 * An empty array of field elements. | 2485 * An empty array of field elements. |
2486 */ | 2486 */ |
2487 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>.fixedLe
ngth(0); | 2487 static List<ParameterElement> EMPTY_ARRAY = new List<ParameterElement>(0); |
2488 /** | 2488 /** |
2489 * Initialize a newly created parameter element to have the given name. | 2489 * Initialize a newly created parameter element to have the given name. |
2490 * @param name the name of this element | 2490 * @param name the name of this element |
2491 */ | 2491 */ |
2492 ParameterElementImpl(Identifier name) : super.con1(name) { | 2492 ParameterElementImpl(Identifier name) : super.con1(name) { |
2493 } | 2493 } |
2494 ElementKind get kind => ElementKind.PARAMETER; | 2494 ElementKind get kind => ElementKind.PARAMETER; |
2495 ParameterKind get parameterKind => _parameterKind; | 2495 ParameterKind get parameterKind => _parameterKind; |
2496 bool isInitializingFormal() => hasModifier(Modifier.INITIALIZING_FORMAL); | 2496 bool isInitializingFormal() => hasModifier(Modifier.INITIALIZING_FORMAL); |
2497 /** | 2497 /** |
(...skipping 23 matching lines...) Expand all Loading... |
2521 * Instances of the class {@code PrefixElementImpl} implement a {@code PrefixEle
ment}. | 2521 * Instances of the class {@code PrefixElementImpl} implement a {@code PrefixEle
ment}. |
2522 */ | 2522 */ |
2523 class PrefixElementImpl extends ElementImpl implements PrefixElement { | 2523 class PrefixElementImpl extends ElementImpl implements PrefixElement { |
2524 /** | 2524 /** |
2525 * An array containing all of the libraries that are imported using this prefi
x. | 2525 * An array containing all of the libraries that are imported using this prefi
x. |
2526 */ | 2526 */ |
2527 List<LibraryElement> _importedLibraries = LibraryElementImpl.EMPTY_ARRAY; | 2527 List<LibraryElement> _importedLibraries = LibraryElementImpl.EMPTY_ARRAY; |
2528 /** | 2528 /** |
2529 * An empty array of prefix elements. | 2529 * An empty array of prefix elements. |
2530 */ | 2530 */ |
2531 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>.fixedLength(0
); | 2531 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0); |
2532 /** | 2532 /** |
2533 * Initialize a newly created prefix element to have the given name. | 2533 * Initialize a newly created prefix element to have the given name. |
2534 * @param name the name of this element | 2534 * @param name the name of this element |
2535 */ | 2535 */ |
2536 PrefixElementImpl(Identifier name) : super.con1(name) { | 2536 PrefixElementImpl(Identifier name) : super.con1(name) { |
2537 } | 2537 } |
2538 LibraryElement get enclosingElement => (super.enclosingElement as LibraryEleme
nt); | 2538 LibraryElement get enclosingElement => (super.enclosingElement as LibraryEleme
nt); |
2539 List<LibraryElement> get importedLibraries => _importedLibraries; | 2539 List<LibraryElement> get importedLibraries => _importedLibraries; |
2540 ElementKind get kind => ElementKind.PREFIX; | 2540 ElementKind get kind => ElementKind.PREFIX; |
2541 /** | 2541 /** |
(...skipping 15 matching lines...) Expand all Loading... |
2557 * Instances of the class {@code PropertyAccessorElementImpl} implement a{@code
PropertyAccessorElement}. | 2557 * Instances of the class {@code PropertyAccessorElementImpl} implement a{@code
PropertyAccessorElement}. |
2558 */ | 2558 */ |
2559 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { | 2559 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { |
2560 /** | 2560 /** |
2561 * The field associated with this accessor. | 2561 * The field associated with this accessor. |
2562 */ | 2562 */ |
2563 FieldElement _field; | 2563 FieldElement _field; |
2564 /** | 2564 /** |
2565 * An empty array of property accessor elements. | 2565 * An empty array of property accessor elements. |
2566 */ | 2566 */ |
2567 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>.fixedLength(0); | 2567 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>(0); |
2568 /** | 2568 /** |
2569 * Initialize a newly created synthetic property accessor element to be associ
ated with the given | 2569 * Initialize a newly created synthetic property accessor element to be associ
ated with the given |
2570 * field. | 2570 * field. |
2571 * @param name the name of this element | 2571 * @param name the name of this element |
2572 */ | 2572 */ |
2573 PropertyAccessorElementImpl.con1(FieldElementImpl field2) : super.con2(field2.
name, -1) { | 2573 PropertyAccessorElementImpl.con1(FieldElementImpl field2) : super.con2(field2.
name, -1) { |
2574 _jtd_constructor_157_impl(field2); | 2574 _jtd_constructor_157_impl(field2); |
2575 } | 2575 } |
2576 _jtd_constructor_157_impl(FieldElementImpl field2) { | 2576 _jtd_constructor_157_impl(FieldElementImpl field2) { |
2577 this._field = field2; | 2577 this._field = field2; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 * The type of function defined by this type alias. | 2670 * The type of function defined by this type alias. |
2671 */ | 2671 */ |
2672 FunctionType _type; | 2672 FunctionType _type; |
2673 /** | 2673 /** |
2674 * An array containing all of the type variables defined for this type. | 2674 * An array containing all of the type variables defined for this type. |
2675 */ | 2675 */ |
2676 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; | 2676 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; |
2677 /** | 2677 /** |
2678 * An empty array of type alias elements. | 2678 * An empty array of type alias elements. |
2679 */ | 2679 */ |
2680 static List<TypeAliasElement> EMPTY_ARRAY = new List<TypeAliasElement>.fixedLe
ngth(0); | 2680 static List<TypeAliasElement> EMPTY_ARRAY = new List<TypeAliasElement>(0); |
2681 /** | 2681 /** |
2682 * Initialize a newly created type alias element to have the given name. | 2682 * Initialize a newly created type alias element to have the given name. |
2683 * @param name the name of this element | 2683 * @param name the name of this element |
2684 */ | 2684 */ |
2685 TypeAliasElementImpl(Identifier name) : super.con1(name) { | 2685 TypeAliasElementImpl(Identifier name) : super.con1(name) { |
2686 } | 2686 } |
2687 ElementImpl getChild(String identifier23) { | 2687 ElementImpl getChild(String identifier23) { |
2688 for (VariableElement parameter in _parameters) { | 2688 for (VariableElement parameter in _parameters) { |
2689 if (((parameter as VariableElementImpl)).identifier == identifier23) { | 2689 if (((parameter as VariableElementImpl)).identifier == identifier23) { |
2690 return (parameter as VariableElementImpl); | 2690 return (parameter as VariableElementImpl); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2769 */ | 2769 */ |
2770 TypeVariableType _type; | 2770 TypeVariableType _type; |
2771 /** | 2771 /** |
2772 * The type representing the bound associated with this variable, or {@code nu
ll} if this variable | 2772 * The type representing the bound associated with this variable, or {@code nu
ll} if this variable |
2773 * does not have an explicit bound. | 2773 * does not have an explicit bound. |
2774 */ | 2774 */ |
2775 Type2 _bound; | 2775 Type2 _bound; |
2776 /** | 2776 /** |
2777 * An empty array of type variable elements. | 2777 * An empty array of type variable elements. |
2778 */ | 2778 */ |
2779 static List<TypeVariableElement> EMPTY_ARRAY = new List<TypeVariableElement>.f
ixedLength(0); | 2779 static List<TypeVariableElement> EMPTY_ARRAY = new List<TypeVariableElement>(0
); |
2780 /** | 2780 /** |
2781 * Initialize a newly created type variable element to have the given name. | 2781 * Initialize a newly created type variable element to have the given name. |
2782 * @param name the name of this element | 2782 * @param name the name of this element |
2783 */ | 2783 */ |
2784 TypeVariableElementImpl(Identifier name) : super.con1(name) { | 2784 TypeVariableElementImpl(Identifier name) : super.con1(name) { |
2785 } | 2785 } |
2786 Type2 get bound => _bound; | 2786 Type2 get bound => _bound; |
2787 ElementKind get kind => ElementKind.TYPE_VARIABLE; | 2787 ElementKind get kind => ElementKind.TYPE_VARIABLE; |
2788 TypeVariableType get type => _type; | 2788 TypeVariableType get type => _type; |
2789 /** | 2789 /** |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2826 */ | 2826 */ |
2827 int _visibleRangeOffset = 0; | 2827 int _visibleRangeOffset = 0; |
2828 /** | 2828 /** |
2829 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a | 2829 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a |
2830 * visible range. | 2830 * visible range. |
2831 */ | 2831 */ |
2832 int _visibleRangeLength = -1; | 2832 int _visibleRangeLength = -1; |
2833 /** | 2833 /** |
2834 * An empty array of variable elements. | 2834 * An empty array of variable elements. |
2835 */ | 2835 */ |
2836 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>.fixedLeng
th(0); | 2836 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); |
2837 /** | 2837 /** |
2838 * Initialize a newly created variable element to have the given name. | 2838 * Initialize a newly created variable element to have the given name. |
2839 * @param name the name of this element | 2839 * @param name the name of this element |
2840 */ | 2840 */ |
2841 VariableElementImpl.con1(Identifier name) : super.con1(name) { | 2841 VariableElementImpl.con1(Identifier name) : super.con1(name) { |
2842 _jtd_constructor_162_impl(name); | 2842 _jtd_constructor_162_impl(name); |
2843 } | 2843 } |
2844 _jtd_constructor_162_impl(Identifier name) { | 2844 _jtd_constructor_162_impl(Identifier name) { |
2845 } | 2845 } |
2846 /** | 2846 /** |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3237 } | 3237 } |
3238 /** | 3238 /** |
3239 * Instances of the class {@code InterfaceTypeImpl} defines the behavior common
to objects | 3239 * Instances of the class {@code InterfaceTypeImpl} defines the behavior common
to objects |
3240 * representing the type introduced by either a class or an interface, or a refe
rence to such a | 3240 * representing the type introduced by either a class or an interface, or a refe
rence to such a |
3241 * type. | 3241 * type. |
3242 */ | 3242 */ |
3243 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { | 3243 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
3244 /** | 3244 /** |
3245 * An empty array of types. | 3245 * An empty array of types. |
3246 */ | 3246 */ |
3247 static List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>.fixedLength(0
); | 3247 static List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>(0); |
3248 /** | 3248 /** |
3249 * This method computes the longest inheritance path from some passed {@link T
ype} to Object. | 3249 * This method computes the longest inheritance path from some passed {@link T
ype} to Object. |
3250 * @param type the {@link Type} to compute the longest inheritance path of fro
m the passed{@link Type} to Object | 3250 * @param type the {@link Type} to compute the longest inheritance path of fro
m the passed{@link Type} to Object |
3251 * @return the computed longest inheritance path to Object | 3251 * @return the computed longest inheritance path to Object |
3252 * @see #computeLongestInheritancePathToObject(Type,int) | 3252 * @see #computeLongestInheritancePathToObject(Type,int) |
3253 * @see InterfaceType#getLeastUpperBound(Type) | 3253 * @see InterfaceType#getLeastUpperBound(Type) |
3254 */ | 3254 */ |
3255 static int computeLongestInheritancePathToObject(InterfaceType type) => comput
eLongestInheritancePathToObject2(type, 0); | 3255 static int computeLongestInheritancePathToObject(InterfaceType type) => comput
eLongestInheritancePathToObject2(type, 0); |
3256 /** | 3256 /** |
3257 * Returns the set of all superinterfaces of the passed {@link Type}. | 3257 * Returns the set of all superinterfaces of the passed {@link Type}. |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 } | 3360 } |
3361 InterfaceType i = this; | 3361 InterfaceType i = this; |
3362 InterfaceType j = (type as InterfaceType); | 3362 InterfaceType j = (type as InterfaceType); |
3363 Set<InterfaceType> si = computeSuperinterfaceSet(i); | 3363 Set<InterfaceType> si = computeSuperinterfaceSet(i); |
3364 Set<InterfaceType> sj = computeSuperinterfaceSet(j); | 3364 Set<InterfaceType> sj = computeSuperinterfaceSet(j); |
3365 javaSetAdd(si, i); | 3365 javaSetAdd(si, i); |
3366 javaSetAdd(sj, j); | 3366 javaSetAdd(sj, j); |
3367 si.retainAll(sj); | 3367 si.retainAll(sj); |
3368 Set<InterfaceType> s = si; | 3368 Set<InterfaceType> s = si; |
3369 List<InterfaceType> sn = new List.from(s); | 3369 List<InterfaceType> sn = new List.from(s); |
3370 List<int> depths = new List<int>.fixedLength(sn.length); | 3370 List<int> depths = new List<int>(sn.length); |
3371 int maxDepth = 0; | 3371 int maxDepth = 0; |
3372 for (int n = 0; n < sn.length; n++) { | 3372 for (int n = 0; n < sn.length; n++) { |
3373 depths[n] = computeLongestInheritancePathToObject(sn[n]); | 3373 depths[n] = computeLongestInheritancePathToObject(sn[n]); |
3374 if (depths[n] > maxDepth) { | 3374 if (depths[n] > maxDepth) { |
3375 maxDepth = depths[n]; | 3375 maxDepth = depths[n]; |
3376 } | 3376 } |
3377 } | 3377 } |
3378 for (; maxDepth >= 0; maxDepth--) { | 3378 for (; maxDepth >= 0; maxDepth--) { |
3379 int indexOfLeastUpperBound = -1; | 3379 int indexOfLeastUpperBound = -1; |
3380 int numberOfTypesAtMaxDepth = 0; | 3380 int numberOfTypesAtMaxDepth = 0; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 /** | 3550 /** |
3551 * Return an array containing the results of using the given argument types an
d parameter types to | 3551 * Return an array containing the results of using the given argument types an
d parameter types to |
3552 * perform a substitution on all of the given types. | 3552 * perform a substitution on all of the given types. |
3553 * @param types the types on which a substitution is to be performed | 3553 * @param types the types on which a substitution is to be performed |
3554 * @param argumentTypes the argument types for the substitution | 3554 * @param argumentTypes the argument types for the substitution |
3555 * @param parameterTypes the parameter types for the substitution | 3555 * @param parameterTypes the parameter types for the substitution |
3556 * @return the result of performing the substitution on each of the types | 3556 * @return the result of performing the substitution on each of the types |
3557 */ | 3557 */ |
3558 static List<Type2> substitute(List<Type2> types, List<Type2> argumentTypes, Li
st<Type2> parameterTypes) { | 3558 static List<Type2> substitute(List<Type2> types, List<Type2> argumentTypes, Li
st<Type2> parameterTypes) { |
3559 int length6 = types.length; | 3559 int length6 = types.length; |
3560 List<Type2> newTypes = new List<Type2>.fixedLength(length6); | 3560 List<Type2> newTypes = new List<Type2>(length6); |
3561 for (int i = 0; i < length6; i++) { | 3561 for (int i = 0; i < length6; i++) { |
3562 newTypes[i] = types[i].substitute2(argumentTypes, parameterTypes); | 3562 newTypes[i] = types[i].substitute2(argumentTypes, parameterTypes); |
3563 } | 3563 } |
3564 return newTypes; | 3564 return newTypes; |
3565 } | 3565 } |
3566 /** | 3566 /** |
3567 * The element representing the declaration of this type, or {@code null} if t
he type has not, or | 3567 * The element representing the declaration of this type, or {@code null} if t
he type has not, or |
3568 * cannot, be associated with an element. | 3568 * cannot, be associated with an element. |
3569 */ | 3569 */ |
3570 Element _element; | 3570 Element _element; |
3571 /** | 3571 /** |
3572 * The name of this type, or {@code null} if the type does not have a name. | 3572 * The name of this type, or {@code null} if the type does not have a name. |
3573 */ | 3573 */ |
3574 String _name; | 3574 String _name; |
3575 /** | 3575 /** |
3576 * An empty array of types. | 3576 * An empty array of types. |
3577 */ | 3577 */ |
3578 static List<Type2> EMPTY_ARRAY = new List<Type2>.fixedLength(0); | 3578 static List<Type2> EMPTY_ARRAY = new List<Type2>(0); |
3579 /** | 3579 /** |
3580 * Initialize a newly created type to be declared by the given element and to
have the given name. | 3580 * Initialize a newly created type to be declared by the given element and to
have the given name. |
3581 * @param element the element representing the declaration of the type | 3581 * @param element the element representing the declaration of the type |
3582 * @param name the name of the type | 3582 * @param name the name of the type |
3583 */ | 3583 */ |
3584 TypeImpl(Element element, String name) { | 3584 TypeImpl(Element element, String name) { |
3585 this._element = element; | 3585 this._element = element; |
3586 this._name = name; | 3586 this._name = name; |
3587 } | 3587 } |
3588 Element get element => _element; | 3588 Element get element => _element; |
(...skipping 25 matching lines...) Expand all Loading... |
3614 */ | 3614 */ |
3615 class TypeVariableTypeImpl extends TypeImpl implements TypeVariableType { | 3615 class TypeVariableTypeImpl extends TypeImpl implements TypeVariableType { |
3616 /** | 3616 /** |
3617 * Return an array containing the type variable types defined by the given arr
ay of type variable | 3617 * Return an array containing the type variable types defined by the given arr
ay of type variable |
3618 * elements. | 3618 * elements. |
3619 * @param typeVariables the type variable elements defining the type variable
types to be returned | 3619 * @param typeVariables the type variable elements defining the type variable
types to be returned |
3620 * @return the type variable types defined by the type variable elements | 3620 * @return the type variable types defined by the type variable elements |
3621 */ | 3621 */ |
3622 static List<TypeVariableType> getTypes(List<TypeVariableElement> typeVariables
) { | 3622 static List<TypeVariableType> getTypes(List<TypeVariableElement> typeVariables
) { |
3623 int count = typeVariables.length; | 3623 int count = typeVariables.length; |
3624 List<TypeVariableType> types = new List<TypeVariableType>.fixedLength(count)
; | 3624 List<TypeVariableType> types = new List<TypeVariableType>(count); |
3625 for (int i = 0; i < count; i++) { | 3625 for (int i = 0; i < count; i++) { |
3626 types[i] = typeVariables[i].type; | 3626 types[i] = typeVariables[i].type; |
3627 } | 3627 } |
3628 return types; | 3628 return types; |
3629 } | 3629 } |
3630 /** | 3630 /** |
3631 * Initialize a newly created type variable to be declared by the given elemen
t and to have the | 3631 * Initialize a newly created type variable to be declared by the given elemen
t and to have the |
3632 * given name. | 3632 * given name. |
3633 * @param element the element representing the declaration of the type variabl
e | 3633 * @param element the element representing the declaration of the type variabl
e |
3634 */ | 3634 */ |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3960 * introduced by a type variable. | 3960 * introduced by a type variable. |
3961 */ | 3961 */ |
3962 abstract class TypeVariableType implements Type2 { | 3962 abstract class TypeVariableType implements Type2 { |
3963 TypeVariableElement get element; | 3963 TypeVariableElement get element; |
3964 } | 3964 } |
3965 /** | 3965 /** |
3966 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. | 3966 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. |
3967 */ | 3967 */ |
3968 abstract class VoidType implements Type2 { | 3968 abstract class VoidType implements Type2 { |
3969 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 3969 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
3970 } | 3970 } |
OLD | NEW |