| 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; |
| 11 import 'ast.dart'; | 11 import 'ast.dart' show Identifier, LibraryIdentifier; |
| 12 import 'html.dart' show XmlTagNode; |
| 12 import 'engine.dart' show AnalysisContext; | 13 import 'engine.dart' show AnalysisContext; |
| 13 import 'utilities_dart.dart'; | 14 import 'utilities_dart.dart'; |
| 14 | 15 |
| 15 /** | 16 /** |
| 16 * The interface {@code Annotation} defines the behavior of objects representing
a single annotation | 17 * The interface {@code Annotation} defines the behavior of objects representing
a single annotation |
| 17 * associated with an element. | 18 * associated with an element. |
| 19 * @coverage dart.engine.element |
| 18 */ | 20 */ |
| 19 abstract class Annotation { | 21 abstract class Annotation { |
| 20 /** | 22 /** |
| 21 * Return the element representing the field, variable, or const constructor b
eing used as an | 23 * Return the element representing the field, variable, or const constructor b
eing used as an |
| 22 * annotation. | 24 * annotation. |
| 23 * @return the field, variable, or constructor being used as an annotation | 25 * @return the field, variable, or constructor being used as an annotation |
| 24 */ | 26 */ |
| 25 Element get element; | 27 Element get element; |
| 26 } | 28 } |
| 27 /** | 29 /** |
| 28 * The interface {@code ClassElement} defines the behavior of elements that repr
esent a class. | 30 * The interface {@code ClassElement} defines the behavior of elements that repr
esent a class. |
| 31 * @coverage dart.engine.element |
| 29 */ | 32 */ |
| 30 abstract class ClassElement implements Element { | 33 abstract class ClassElement implements Element { |
| 31 /** | 34 /** |
| 32 * Return an array containing all of the accessors (getters and setters) decla
red in this class. | 35 * Return an array containing all of the accessors (getters and setters) decla
red in this class. |
| 33 * @return the accessors declared in this class | 36 * @return the accessors declared in this class |
| 34 */ | 37 */ |
| 35 List<PropertyAccessorElement> get accessors; | 38 List<PropertyAccessorElement> get accessors; |
| 36 /** | 39 /** |
| 37 * Return an array containing all the supertypes defined for this class and it
s supertypes. | 40 * Return an array containing all the supertypes defined for this class and it
s supertypes. |
| 38 * @return all the supertypes of this class, including mixins | 41 * @return all the supertypes of this class, including mixins |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 * @param setterName the name of the setter being looked up | 176 * @param setterName the name of the setter being looked up |
| 174 * @param library the library with respect to which the lookup is being perfor
med | 177 * @param library the library with respect to which the lookup is being perfor
med |
| 175 * @return the result of looking up the given setter in this class with respec
t to the given | 178 * @return the result of looking up the given setter in this class with respec
t to the given |
| 176 * library | 179 * library |
| 177 */ | 180 */ |
| 178 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library
); | 181 PropertyAccessorElement lookUpSetter(String setterName, LibraryElement library
); |
| 179 } | 182 } |
| 180 /** | 183 /** |
| 181 * The interface {@code CompilationUnitElement} defines the behavior of elements
representing a | 184 * The interface {@code CompilationUnitElement} defines the behavior of elements
representing a |
| 182 * compilation unit. | 185 * compilation unit. |
| 186 * @coverage dart.engine.element |
| 183 */ | 187 */ |
| 184 abstract class CompilationUnitElement implements Element { | 188 abstract class CompilationUnitElement implements Element { |
| 185 /** | 189 /** |
| 186 * Return an array containing all of the top-level accessors (getters and sett
ers) contained in | 190 * Return an array containing all of the top-level accessors (getters and sett
ers) contained in |
| 187 * this compilation unit. | 191 * this compilation unit. |
| 188 * @return the top-level accessors contained in this compilation unit | 192 * @return the top-level accessors contained in this compilation unit |
| 189 */ | 193 */ |
| 190 List<PropertyAccessorElement> get accessors; | 194 List<PropertyAccessorElement> get accessors; |
| 191 /** | 195 /** |
| 192 * Return the library in which this compilation unit is defined. | 196 * Return the library in which this compilation unit is defined. |
| 193 * @return the library in which this compilation unit is defined | 197 * @return the library in which this compilation unit is defined |
| 194 */ | 198 */ |
| 195 LibraryElement get enclosingElement; | 199 LibraryElement get enclosingElement; |
| 196 /** | 200 /** |
| 197 * Return an array containing all of the top-level functions contained in this
compilation unit. | 201 * Return an array containing all of the top-level functions contained in this
compilation unit. |
| 198 * @return the top-level functions contained in this compilation unit | 202 * @return the top-level functions contained in this compilation unit |
| 199 */ | 203 */ |
| 200 List<FunctionElement> get functions; | 204 List<FunctionElement> get functions; |
| 201 /** | 205 /** |
| 206 * Return an array containing all of the top-level variables contained in this
compilation unit. |
| 207 * @return the top-level variables contained in this compilation unit |
| 208 */ |
| 209 List<TopLevelVariableElement> get topLevelVariables; |
| 210 /** |
| 202 * Return an array containing all of the type aliases contained in this compil
ation unit. | 211 * Return an array containing all of the type aliases contained in this compil
ation unit. |
| 203 * @return the type aliases contained in this compilation unit | 212 * @return the type aliases contained in this compilation unit |
| 204 */ | 213 */ |
| 205 List<TypeAliasElement> get typeAliases; | 214 List<TypeAliasElement> get typeAliases; |
| 206 /** | 215 /** |
| 207 * Return an array containing all of the classes contained in this compilation
unit. | 216 * Return an array containing all of the classes contained in this compilation
unit. |
| 208 * @return the classes contained in this compilation unit | 217 * @return the classes contained in this compilation unit |
| 209 */ | 218 */ |
| 210 List<ClassElement> get types; | 219 List<ClassElement> get types; |
| 211 /** | |
| 212 * Return an array containing all of the top-level variables contained in this
compilation unit. | |
| 213 * @return the top-level variables contained in this compilation unit | |
| 214 */ | |
| 215 List<TopLevelVariableElement> get topLevelVariables; | |
| 216 } | 220 } |
| 217 /** | 221 /** |
| 218 * The interface {@code ConstructorElement} defines the behavior of elements rep
resenting a | 222 * The interface {@code ConstructorElement} defines the behavior of elements rep
resenting a |
| 219 * constructor or a factory method defined within a type. | 223 * constructor or a factory method defined within a type. |
| 224 * @coverage dart.engine.element |
| 220 */ | 225 */ |
| 221 abstract class ConstructorElement implements ExecutableElement { | 226 abstract class ConstructorElement implements ExecutableElement { |
| 222 /** | 227 /** |
| 223 * Return the type in which this constructor is defined. | 228 * Return the type in which this constructor is defined. |
| 224 * @return the type in which this constructor is defined | 229 * @return the type in which this constructor is defined |
| 225 */ | 230 */ |
| 226 ClassElement get enclosingElement; | 231 ClassElement get enclosingElement; |
| 227 /** | 232 /** |
| 228 * Return {@code true} if this constructor is a const constructor. | 233 * Return {@code true} if this constructor is a const constructor. |
| 229 * @return {@code true} if this constructor is a const constructor | 234 * @return {@code true} if this constructor is a const constructor |
| (...skipping 17 matching lines...) Expand all Loading... |
| 247 * <ul> | 252 * <ul> |
| 248 * <li>default constructors in classes that do not define any explicit construct
ors, | 253 * <li>default constructors in classes that do not define any explicit construct
ors, |
| 249 * <li>getters and setters that are induced by explicit field declarations, | 254 * <li>getters and setters that are induced by explicit field declarations, |
| 250 * <li>fields that are induced by explicit declarations of getters and setters,
and | 255 * <li>fields that are induced by explicit declarations of getters and setters,
and |
| 251 * <li>functions representing the initialization expression for a variable. | 256 * <li>functions representing the initialization expression for a variable. |
| 252 * </ul> | 257 * </ul> |
| 253 * <p> | 258 * <p> |
| 254 * Second, there are elements in the element model that do not have a name. Thes
e correspond to | 259 * Second, there are elements in the element model that do not have a name. Thes
e correspond to |
| 255 * unnamed functions and exist in order to more accurately represent the semanti
c structure of the | 260 * unnamed functions and exist in order to more accurately represent the semanti
c structure of the |
| 256 * program. | 261 * program. |
| 262 * @coverage dart.engine.element |
| 257 */ | 263 */ |
| 258 abstract class Element { | 264 abstract class Element { |
| 259 /** | 265 /** |
| 260 * A comparator that can be used to sort elements by their name offset. Elemen
ts with a smaller | 266 * A comparator that can be used to sort elements by their name offset. Elemen
ts with a smaller |
| 261 * offset will be sorted to be before elements with a larger name offset. | 267 * offset will be sorted to be before elements with a larger name offset. |
| 262 */ | 268 */ |
| 263 static Comparator<Element> SORT_BY_OFFSET = (Element firstElement, Element sec
ondElement) => firstElement.nameOffset - secondElement.nameOffset; | 269 static Comparator<Element> SORT_BY_OFFSET = (Element firstElement, Element sec
ondElement) => firstElement.nameOffset - secondElement.nameOffset; |
| 264 /** | 270 /** |
| 265 * Use the given visitor to visit this element. | 271 * Use the given visitor to visit this element. |
| 266 * @param visitor the visitor that will visit this element | 272 * @param visitor the visitor that will visit this element |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 bool isSynthetic(); | 348 bool isSynthetic(); |
| 343 /** | 349 /** |
| 344 * Use the given visitor to visit all of the children of this element. There i
s no guarantee of | 350 * Use the given visitor to visit all of the children of this element. There i
s no guarantee of |
| 345 * the order in which the children will be visited. | 351 * the order in which the children will be visited. |
| 346 * @param visitor the visitor that will be used to visit the children of this
element | 352 * @param visitor the visitor that will be used to visit the children of this
element |
| 347 */ | 353 */ |
| 348 void visitChildren(ElementVisitor<Object> visitor); | 354 void visitChildren(ElementVisitor<Object> visitor); |
| 349 } | 355 } |
| 350 /** | 356 /** |
| 351 * The enumeration {@code ElementKind} defines the various kinds of elements in
the element model. | 357 * The enumeration {@code ElementKind} defines the various kinds of elements in
the element model. |
| 358 * @coverage dart.engine.element |
| 352 */ | 359 */ |
| 353 class ElementKind { | 360 class ElementKind { |
| 354 static final ElementKind CLASS = new ElementKind('CLASS', 0, "class"); | 361 static final ElementKind CLASS = new ElementKind('CLASS', 0, "class"); |
| 355 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 1, "compilation unit"); | 362 static final ElementKind COMPILATION_UNIT = new ElementKind('COMPILATION_UNIT'
, 1, "compilation unit"); |
| 356 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 2, "cons
tructor"); | 363 static final ElementKind CONSTRUCTOR = new ElementKind('CONSTRUCTOR', 2, "cons
tructor"); |
| 357 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 3, "<dynamic>"); | 364 static final ElementKind DYNAMIC = new ElementKind('DYNAMIC', 3, "<dynamic>"); |
| 358 static final ElementKind ERROR = new ElementKind('ERROR', 4, "<error>"); | 365 static final ElementKind EMBEDDED_HTML_SCRIPT = new ElementKind('EMBEDDED_HTML
_SCRIPT', 4, "embedded html script"); |
| 359 static final ElementKind EXPORT = new ElementKind('EXPORT', 5, "export directi
ve"); | 366 static final ElementKind ERROR = new ElementKind('ERROR', 5, "<error>"); |
| 360 static final ElementKind FIELD = new ElementKind('FIELD', 6, "field"); | 367 static final ElementKind EXPORT = new ElementKind('EXPORT', 6, "export directi
ve"); |
| 361 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 7, "function")
; | 368 static final ElementKind EXTERNAL_HTML_SCRIPT = new ElementKind('EXTERNAL_HTML
_SCRIPT', 7, "external html script"); |
| 362 static final ElementKind GETTER = new ElementKind('GETTER', 8, "getter"); | 369 static final ElementKind FIELD = new ElementKind('FIELD', 8, "field"); |
| 363 static final ElementKind HTML = new ElementKind('HTML', 9, "html"); | 370 static final ElementKind FUNCTION = new ElementKind('FUNCTION', 9, "function")
; |
| 364 static final ElementKind IMPORT = new ElementKind('IMPORT', 10, "import direct
ive"); | 371 static final ElementKind GETTER = new ElementKind('GETTER', 10, "getter"); |
| 365 static final ElementKind LABEL = new ElementKind('LABEL', 11, "label"); | 372 static final ElementKind HTML = new ElementKind('HTML', 11, "html"); |
| 366 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 12, "library"); | 373 static final ElementKind IMPORT = new ElementKind('IMPORT', 12, "import direct
ive"); |
| 367 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 13
, "local variable"); | 374 static final ElementKind LABEL = new ElementKind('LABEL', 13, "label"); |
| 368 static final ElementKind METHOD = new ElementKind('METHOD', 14, "method"); | 375 static final ElementKind LIBRARY = new ElementKind('LIBRARY', 14, "library"); |
| 369 static final ElementKind NAME = new ElementKind('NAME', 15, "<name>"); | 376 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 15
, "local variable"); |
| 370 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 16, "paramet
er"); | 377 static final ElementKind METHOD = new ElementKind('METHOD', 16, "method"); |
| 371 static final ElementKind PREFIX = new ElementKind('PREFIX', 17, "import prefix
"); | 378 static final ElementKind NAME = new ElementKind('NAME', 17, "<name>"); |
| 372 static final ElementKind SETTER = new ElementKind('SETTER', 18, "setter"); | 379 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 18, "paramet
er"); |
| 373 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 19, "top level variable"); | 380 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix
"); |
| 374 static final ElementKind TYPE_ALIAS = new ElementKind('TYPE_ALIAS', 20, "funct
ion type alias"); | 381 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter"); |
| 375 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 21,
"type variable"); | 382 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA
BLE', 21, "top level variable"); |
| 376 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 22, "<universe
>"); | 383 static final ElementKind TYPE_ALIAS = new ElementKind('TYPE_ALIAS', 22, "funct
ion type alias"); |
| 377 static final List<ElementKind> values = [CLASS, COMPILATION_UNIT, CONSTRUCTOR,
DYNAMIC, ERROR, EXPORT, FIELD, FUNCTION, GETTER, HTML, IMPORT, LABEL, LIBRARY,
LOCAL_VARIABLE, METHOD, NAME, PARAMETER, PREFIX, SETTER, TOP_LEVEL_VARIABLE, TYP
E_ALIAS, TYPE_VARIABLE, UNIVERSE]; | 384 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23,
"type variable"); |
| 385 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe
>"); |
| 386 static final List<ElementKind> values = [CLASS, COMPILATION_UNIT, CONSTRUCTOR,
DYNAMIC, EMBEDDED_HTML_SCRIPT, ERROR, EXPORT, EXTERNAL_HTML_SCRIPT, FIELD, FUNC
TION, GETTER, HTML, IMPORT, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, NAME, PARAME
TER, PREFIX, SETTER, TOP_LEVEL_VARIABLE, TYPE_ALIAS, TYPE_VARIABLE, UNIVERSE]; |
| 378 final String __name; | 387 final String __name; |
| 379 final int __ordinal; | 388 final int __ordinal; |
| 389 int get ordinal => __ordinal; |
| 380 String _displayName; | 390 String _displayName; |
| 381 ElementKind(this.__name, this.__ordinal, String displayName) { | 391 ElementKind(this.__name, this.__ordinal, String displayName) { |
| 382 this._displayName = displayName; | 392 this._displayName = displayName; |
| 383 } | 393 } |
| 384 /** | 394 /** |
| 385 * @return the name of this {@link ElementKind} to display in UI. | 395 * @return the name of this {@link ElementKind} to display in UI. |
| 386 */ | 396 */ |
| 387 String get displayName => _displayName; | 397 String get displayName => _displayName; |
| 388 String toString() => __name; | 398 String toString() => __name; |
| 389 } | 399 } |
| 390 /** | 400 /** |
| 391 * The interface {@code ElementLocation} defines the behavior of objects that re
present the location | 401 * The interface {@code ElementLocation} defines the behavior of objects that re
present the location |
| 392 * of an element within the element model. | 402 * of an element within the element model. |
| 403 * @coverage dart.engine.element |
| 393 */ | 404 */ |
| 394 abstract class ElementLocation { | 405 abstract class ElementLocation { |
| 395 /** | 406 /** |
| 396 * Return an encoded representation of this location that can be used to creat
e a location that is | 407 * Return an encoded representation of this location that can be used to creat
e a location that is |
| 397 * equal to this location. | 408 * equal to this location. |
| 398 * @return an encoded representation of this location | 409 * @return an encoded representation of this location |
| 399 */ | 410 */ |
| 400 String get encoding; | 411 String get encoding; |
| 401 } | 412 } |
| 402 /** | 413 /** |
| 403 * The interface {@code ElementVisitor} defines the behavior of objects that can
be used to visit an | 414 * The interface {@code ElementVisitor} defines the behavior of objects that can
be used to visit an |
| 404 * element structure. | 415 * element structure. |
| 416 * @coverage dart.engine.element |
| 405 */ | 417 */ |
| 406 abstract class ElementVisitor<R> { | 418 abstract class ElementVisitor<R> { |
| 407 R visitClassElement(ClassElement element); | 419 R visitClassElement(ClassElement element); |
| 408 R visitCompilationUnitElement(CompilationUnitElement element); | 420 R visitCompilationUnitElement(CompilationUnitElement element); |
| 409 R visitConstructorElement(ConstructorElement element); | 421 R visitConstructorElement(ConstructorElement element); |
| 422 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element); |
| 410 R visitExportElement(ExportElement element); | 423 R visitExportElement(ExportElement element); |
| 424 R visitExternalHtmlScriptElement(ExternalHtmlScriptElement element); |
| 411 R visitFieldElement(FieldElement element); | 425 R visitFieldElement(FieldElement element); |
| 412 R visitFunctionElement(FunctionElement element); | 426 R visitFunctionElement(FunctionElement element); |
| 413 R visitHtmlElement(HtmlElement element); | 427 R visitHtmlElement(HtmlElement element); |
| 414 R visitImportElement(ImportElement element); | 428 R visitImportElement(ImportElement element); |
| 415 R visitLabelElement(LabelElement element); | 429 R visitLabelElement(LabelElement element); |
| 416 R visitLibraryElement(LibraryElement element); | 430 R visitLibraryElement(LibraryElement element); |
| 417 R visitLocalVariableElement(LocalVariableElement element); | 431 R visitLocalVariableElement(LocalVariableElement element); |
| 418 R visitMethodElement(MethodElement element); | 432 R visitMethodElement(MethodElement element); |
| 419 R visitMultiplyDefinedElement(MultiplyDefinedElement element); | 433 R visitMultiplyDefinedElement(MultiplyDefinedElement element); |
| 420 R visitParameterElement(ParameterElement element); | 434 R visitParameterElement(ParameterElement element); |
| 421 R visitPrefixElement(PrefixElement element); | 435 R visitPrefixElement(PrefixElement element); |
| 422 R visitPropertyAccessorElement(PropertyAccessorElement element); | 436 R visitPropertyAccessorElement(PropertyAccessorElement element); |
| 423 R visitTopLevelVariableElement(TopLevelVariableElement element); | 437 R visitTopLevelVariableElement(TopLevelVariableElement element); |
| 424 R visitTypeAliasElement(TypeAliasElement element); | 438 R visitTypeAliasElement(TypeAliasElement element); |
| 425 R visitTypeVariableElement(TypeVariableElement element); | 439 R visitTypeVariableElement(TypeVariableElement element); |
| 426 } | 440 } |
| 427 /** | 441 /** |
| 428 * The interface {@code EmbeddedHtmlScriptElement} defines the behavior of eleme
nts representing a | 442 * The interface {@code EmbeddedHtmlScriptElement} defines the behavior of eleme
nts representing a |
| 429 * script tag in an HTML file having content that defines a Dart library. | 443 * script tag in an HTML file having content that defines a Dart library. |
| 444 * @coverage dart.engine.element |
| 430 */ | 445 */ |
| 431 abstract class EmbeddedHtmlScriptElement implements HtmlScriptElement { | 446 abstract class EmbeddedHtmlScriptElement implements HtmlScriptElement { |
| 432 /** | 447 /** |
| 433 * Return the library element defined by the content of the script tag, or {@c
ode null} if the | 448 * Return the library element defined by the content of the script tag. |
| 434 * content does not define a library. | 449 * @return the library element (not {@code null}) |
| 435 * @return the library element | |
| 436 */ | 450 */ |
| 437 LibraryElement get scriptLibrary; | 451 LibraryElement get scriptLibrary; |
| 438 } | 452 } |
| 439 /** | 453 /** |
| 440 * The interface {@code ExecutableElement} defines the behavior of elements repr
esenting an | 454 * The interface {@code ExecutableElement} defines the behavior of elements repr
esenting an |
| 441 * executable object, including functions, methods, constructors, getters, and s
etters. | 455 * executable object, including functions, methods, constructors, getters, and s
etters. |
| 456 * @coverage dart.engine.element |
| 442 */ | 457 */ |
| 443 abstract class ExecutableElement implements Element { | 458 abstract class ExecutableElement implements Element { |
| 444 /** | 459 /** |
| 445 * Return an array containing all of the functions defined within this executa
ble element. | 460 * Return an array containing all of the functions defined within this executa
ble element. |
| 446 * @return the functions defined within this executable element | 461 * @return the functions defined within this executable element |
| 447 */ | 462 */ |
| 448 List<FunctionElement> get functions; | 463 List<FunctionElement> get functions; |
| 449 /** | 464 /** |
| 450 * Return an array containing all of the labels defined within this executable
element. | 465 * Return an array containing all of the labels defined within this executable
element. |
| 451 * @return the labels defined within this executable element | 466 * @return the labels defined within this executable element |
| (...skipping 17 matching lines...) Expand all Loading... |
| 469 /** | 484 /** |
| 470 * Return {@code true} if this element is a static element. A static element i
s an element that is | 485 * Return {@code true} if this element is a static element. A static element i
s an element that is |
| 471 * not associated with a particular instance, but rather with an entire librar
y or class. | 486 * not associated with a particular instance, but rather with an entire librar
y or class. |
| 472 * @return {@code true} if this executable element is a static element | 487 * @return {@code true} if this executable element is a static element |
| 473 */ | 488 */ |
| 474 bool isStatic(); | 489 bool isStatic(); |
| 475 } | 490 } |
| 476 /** | 491 /** |
| 477 * The interface {@code ExportElement} defines the behavior of objects represent
ing information | 492 * The interface {@code ExportElement} defines the behavior of objects represent
ing information |
| 478 * about a single export directive within a library. | 493 * about a single export directive within a library. |
| 494 * @coverage dart.engine.element |
| 479 */ | 495 */ |
| 480 abstract class ExportElement implements Element { | 496 abstract class ExportElement implements Element { |
| 481 /** | 497 /** |
| 482 * An empty array of export elements. | 498 * An empty array of export elements. |
| 483 */ | 499 */ |
| 484 static List<ExportElement> EMPTY_ARRAY = new List<ExportElement>(0); | 500 static List<ExportElement> EMPTY_ARRAY = new List<ExportElement>(0); |
| 485 /** | 501 /** |
| 486 * Return an array containing the combinators that were specified as part of t
he export directive | 502 * Return an array containing the combinators that were specified as part of t
he export directive |
| 487 * in the order in which they were specified. | 503 * in the order in which they were specified. |
| 488 * @return the combinators specified in the export directive | 504 * @return the combinators specified in the export directive |
| 489 */ | 505 */ |
| 490 List<NamespaceCombinator> get combinators; | 506 List<NamespaceCombinator> get combinators; |
| 491 /** | 507 /** |
| 492 * Return the library that is exported from this library by this export direct
ive. | 508 * Return the library that is exported from this library by this export direct
ive. |
| 493 * @return the library that is exported from this library | 509 * @return the library that is exported from this library |
| 494 */ | 510 */ |
| 495 LibraryElement get exportedLibrary; | 511 LibraryElement get exportedLibrary; |
| 496 } | 512 } |
| 497 /** | 513 /** |
| 498 * The interface {@code ExternalHtmlScriptElement} defines the behavior of eleme
nts representing a | 514 * The interface {@code ExternalHtmlScriptElement} defines the behavior of eleme
nts representing a |
| 499 * script tag in an HTML file having a {@code source} attribute that references
a Dart library | 515 * script tag in an HTML file having a {@code source} attribute that references
a Dart library |
| 500 * source file. | 516 * source file. |
| 517 * @coverage dart.engine.element |
| 501 */ | 518 */ |
| 502 abstract class ExternalHtmlScriptElement implements HtmlScriptElement { | 519 abstract class ExternalHtmlScriptElement implements HtmlScriptElement { |
| 503 /** | 520 /** |
| 504 * Return the source referenced by this element, or {@code null} if this eleme
nt does not | 521 * Return the source referenced by this element, or {@code null} if this eleme
nt does not |
| 505 * reference a Dart library source file. | 522 * reference a Dart library source file. |
| 506 * @return the source for the external Dart library | 523 * @return the source for the external Dart library |
| 507 */ | 524 */ |
| 508 Source get scriptSource; | 525 Source get scriptSource; |
| 509 } | 526 } |
| 510 /** | 527 /** |
| 511 * The interface {@code FieldElement} defines the behavior of elements represent
ing a field defined | 528 * The interface {@code FieldElement} defines the behavior of elements represent
ing a field defined |
| 512 * within a type. | 529 * within a type. |
| 530 * @coverage dart.engine.element |
| 513 */ | 531 */ |
| 514 abstract class FieldElement implements PropertyInducingElement { | 532 abstract class FieldElement implements PropertyInducingElement { |
| 515 /** | 533 /** |
| 516 * Return the type in which this field is defined. | 534 * Return the type in which this field is defined. |
| 517 * @return the type in which this field is defined | 535 * @return the type in which this field is defined |
| 518 */ | 536 */ |
| 519 ClassElement get enclosingElement; | 537 ClassElement get enclosingElement; |
| 520 } | 538 } |
| 521 /** | 539 /** |
| 522 * The interface {@code FunctionElement} defines the behavior of elements repres
enting a function. | 540 * The interface {@code FunctionElement} defines the behavior of elements repres
enting a function. |
| 541 * @coverage dart.engine.element |
| 523 */ | 542 */ |
| 524 abstract class FunctionElement implements ExecutableElement, LocalElement { | 543 abstract class FunctionElement implements ExecutableElement, LocalElement { |
| 525 } | 544 } |
| 526 /** | 545 /** |
| 527 * The interface {@code HideCombinator} defines the behavior of combinators that
cause some of the | 546 * The interface {@code HideCombinator} defines the behavior of combinators that
cause some of the |
| 528 * names in a namespace to be hidden when being imported. | 547 * names in a namespace to be hidden when being imported. |
| 548 * @coverage dart.engine.element |
| 529 */ | 549 */ |
| 530 abstract class HideCombinator implements NamespaceCombinator { | 550 abstract class HideCombinator implements NamespaceCombinator { |
| 531 /** | 551 /** |
| 532 * Return an array containing the names that are not to be made visible in the
importing library | 552 * Return an array containing the names that are not to be made visible in the
importing library |
| 533 * even if they are defined in the imported library. | 553 * even if they are defined in the imported library. |
| 534 * @return the names from the imported library that are hidden from the import
ing library | 554 * @return the names from the imported library that are hidden from the import
ing library |
| 535 */ | 555 */ |
| 536 List<String> get hiddenNames; | 556 List<String> get hiddenNames; |
| 537 } | 557 } |
| 538 /** | 558 /** |
| 539 * The interface {@code HtmlElement} defines the behavior of elements representi
ng an HTML file. | 559 * The interface {@code HtmlElement} defines the behavior of elements representi
ng an HTML file. |
| 560 * @coverage dart.engine.element |
| 540 */ | 561 */ |
| 541 abstract class HtmlElement implements Element { | 562 abstract class HtmlElement implements Element { |
| 542 /** | 563 /** |
| 543 * Return an array containing all of the script elements contained in the HTML
file. This includes | 564 * Return an array containing all of the script elements contained in the HTML
file. This includes |
| 544 * scripts with libraries that are defined by the content of a script tag as w
ell as libraries | 565 * scripts with libraries that are defined by the content of a script tag as w
ell as libraries |
| 545 * that are referenced in the {@core source} attribute of a script tag. | 566 * that are referenced in the {@core source} attribute of a script tag. |
| 546 * @return the script elements in the HTML file (not {@code null}, contains no
{@code null}s) | 567 * @return the script elements in the HTML file (not {@code null}, contains no
{@code null}s) |
| 547 */ | 568 */ |
| 548 List<HtmlScriptElement> get scripts; | 569 List<HtmlScriptElement> get scripts; |
| 549 } | 570 } |
| 550 /** | 571 /** |
| 551 * The interface {@code HtmlScriptElement} defines the behavior of elements repr
esenting a script | 572 * The interface {@code HtmlScriptElement} defines the behavior of elements repr
esenting a script |
| 552 * tag in an HTML file. | 573 * tag in an HTML file. |
| 553 * @see EmbeddedHtmlScriptElement | 574 * @see EmbeddedHtmlScriptElement |
| 554 * @see ExternalHtmlScriptElement | 575 * @see ExternalHtmlScriptElement |
| 576 * @coverage dart.engine.element |
| 555 */ | 577 */ |
| 556 abstract class HtmlScriptElement implements Element { | 578 abstract class HtmlScriptElement implements Element { |
| 557 } | 579 } |
| 558 /** | 580 /** |
| 559 * The interface {@code ImportElement} defines the behavior of objects represent
ing information | 581 * The interface {@code ImportElement} defines the behavior of objects represent
ing information |
| 560 * about a single import directive within a library. | 582 * about a single import directive within a library. |
| 583 * @coverage dart.engine.element |
| 561 */ | 584 */ |
| 562 abstract class ImportElement implements Element { | 585 abstract class ImportElement implements Element { |
| 563 /** | 586 /** |
| 564 * An empty array of import elements. | 587 * An empty array of import elements. |
| 565 */ | 588 */ |
| 566 static List<ImportElement> EMPTY_ARRAY = new List<ImportElement>(0); | 589 static List<ImportElement> EMPTY_ARRAY = new List<ImportElement>(0); |
| 567 /** | 590 /** |
| 568 * Return an array containing the combinators that were specified as part of t
he import directive | 591 * Return an array containing the combinators that were specified as part of t
he import directive |
| 569 * in the order in which they were specified. | 592 * in the order in which they were specified. |
| 570 * @return the combinators specified in the import directive | 593 * @return the combinators specified in the import directive |
| 571 */ | 594 */ |
| 572 List<NamespaceCombinator> get combinators; | 595 List<NamespaceCombinator> get combinators; |
| 573 /** | 596 /** |
| 574 * Return the library that is imported into this library by this import direct
ive. | 597 * Return the library that is imported into this library by this import direct
ive. |
| 575 * @return the library that is imported into this library | 598 * @return the library that is imported into this library |
| 576 */ | 599 */ |
| 577 LibraryElement get importedLibrary; | 600 LibraryElement get importedLibrary; |
| 578 /** | 601 /** |
| 579 * Return the prefix that was specified as part of the import directive, or {@
code null} if there | 602 * Return the prefix that was specified as part of the import directive, or {@
code null} if there |
| 580 * was no prefix specified. | 603 * was no prefix specified. |
| 581 * @return the prefix that was specified as part of the import directive | 604 * @return the prefix that was specified as part of the import directive |
| 582 */ | 605 */ |
| 583 PrefixElement get prefix; | 606 PrefixElement get prefix; |
| 584 } | 607 } |
| 585 /** | 608 /** |
| 586 * The interface {@code LabelElement} defines the behavior of elements represent
ing a label | 609 * The interface {@code LabelElement} defines the behavior of elements represent
ing a label |
| 587 * associated with a statement. | 610 * associated with a statement. |
| 611 * @coverage dart.engine.element |
| 588 */ | 612 */ |
| 589 abstract class LabelElement implements Element { | 613 abstract class LabelElement implements Element { |
| 590 /** | 614 /** |
| 591 * Return the executable element in which this label is defined. | 615 * Return the executable element in which this label is defined. |
| 592 * @return the executable element in which this label is defined | 616 * @return the executable element in which this label is defined |
| 593 */ | 617 */ |
| 594 ExecutableElement get enclosingElement; | 618 ExecutableElement get enclosingElement; |
| 595 } | 619 } |
| 596 /** | 620 /** |
| 597 * The interface {@code LibraryElement} defines the behavior of elements represe
nting a library. | 621 * The interface {@code LibraryElement} defines the behavior of elements represe
nting a library. |
| 622 * @coverage dart.engine.element |
| 598 */ | 623 */ |
| 599 abstract class LibraryElement implements Element { | 624 abstract class LibraryElement implements Element { |
| 600 /** | 625 /** |
| 601 * Return the compilation unit that defines this library. | 626 * Return the compilation unit that defines this library. |
| 602 * @return the compilation unit that defines this library | 627 * @return the compilation unit that defines this library |
| 603 */ | 628 */ |
| 604 CompilationUnitElement get definingCompilationUnit; | 629 CompilationUnitElement get definingCompilationUnit; |
| 605 /** | 630 /** |
| 606 * Return the entry point for this library, or {@code null} if this library do
es not have an entry | 631 * Return the entry point for this library, or {@code null} if this library do
es not have an entry |
| 607 * point. The entry point is defined to be a zero argument top-level function
whose name is{@code main}. | 632 * point. The entry point is defined to be a zero argument top-level function
whose name is{@code main}. |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 /** | 670 /** |
| 646 * Answer {@code true} if this library is an application that can be run in th
e browser. | 671 * Answer {@code true} if this library is an application that can be run in th
e browser. |
| 647 * @return {@code true} if this library is an application that can be run in t
he browser | 672 * @return {@code true} if this library is an application that can be run in t
he browser |
| 648 */ | 673 */ |
| 649 bool isBrowserApplication(); | 674 bool isBrowserApplication(); |
| 650 /** | 675 /** |
| 651 * Return {@code true} if this library is the dart:core library. | 676 * Return {@code true} if this library is the dart:core library. |
| 652 * @return {@code true} if this library is the dart:core library | 677 * @return {@code true} if this library is the dart:core library |
| 653 */ | 678 */ |
| 654 bool isDartCore(); | 679 bool isDartCore(); |
| 680 /** |
| 681 * Return {@code true} if this library is up to date with respect to the given
time stamp. If any |
| 682 * transitively referenced Source is newer than the time stamp, this method re
turns false. |
| 683 * @param timeStamp the time stamp to compare against |
| 684 * @return {@code true} if this library is up to date with respect to the give
n time stamp |
| 685 */ |
| 686 bool isUpToDate2(int timeStamp); |
| 655 } | 687 } |
| 656 /** | 688 /** |
| 657 * The interface {@code LocalElement} defines the behavior of elements that can
be (but are not | 689 * The interface {@code LocalElement} defines the behavior of elements that can
be (but are not |
| 658 * required to be) defined within a method or function (an {@link ExecutableElem
ent}). | 690 * required to be) defined within a method or function (an {@link ExecutableElem
ent}). |
| 691 * @coverage dart.engine.element |
| 659 */ | 692 */ |
| 660 abstract class LocalElement implements Element { | 693 abstract class LocalElement implements Element { |
| 661 /** | 694 /** |
| 662 * Return a source range that covers the approximate portion of the source in
which the name of | 695 * Return a source range that covers the approximate portion of the source in
which the name of |
| 663 * this element is visible, or {@code null} if there is no single range of cha
racters within which | 696 * this element is visible, or {@code null} if there is no single range of cha
racters within which |
| 664 * the element name is visible. | 697 * the element name is visible. |
| 665 * <ul> | 698 * <ul> |
| 666 * <li>For a local variable, this includes everything from the end of the vari
able's initializer | 699 * <li>For a local variable, this includes everything from the end of the vari
able's initializer |
| 667 * to the end of the block that encloses the variable declaration.</li> | 700 * to the end of the block that encloses the variable declaration.</li> |
| 668 * <li>For a parameter, this includes the body of the method or function that
declares the | 701 * <li>For a parameter, this includes the body of the method or function that
declares the |
| 669 * parameter.</li> | 702 * parameter.</li> |
| 670 * <li>For a local function, this includes everything from the beginning of th
e function's body to | 703 * <li>For a local function, this includes everything from the beginning of th
e function's body to |
| 671 * the end of the block that encloses the function declaration.</li> | 704 * the end of the block that encloses the function declaration.</li> |
| 672 * <li>For top-level functions, {@code null} will be returned because they are
potentially visible | 705 * <li>For top-level functions, {@code null} will be returned because they are
potentially visible |
| 673 * in multiple sources.</li> | 706 * in multiple sources.</li> |
| 674 * </ul> | 707 * </ul> |
| 675 * @return the range of characters in which the name of this element is visibl
e | 708 * @return the range of characters in which the name of this element is visibl
e |
| 676 */ | 709 */ |
| 677 SourceRange get visibleRange; | 710 SourceRange get visibleRange; |
| 678 } | 711 } |
| 679 /** | 712 /** |
| 680 * The interface {@code LocalVariableElement} defines the behavior common to ele
ments that represent | 713 * The interface {@code LocalVariableElement} defines the behavior common to ele
ments that represent |
| 681 * a local variable. | 714 * a local variable. |
| 715 * @coverage dart.engine.element |
| 682 */ | 716 */ |
| 683 abstract class LocalVariableElement implements LocalElement, VariableElement { | 717 abstract class LocalVariableElement implements LocalElement, VariableElement { |
| 684 } | 718 } |
| 685 /** | 719 /** |
| 686 * The interface {@code MethodElement} defines the behavior of elements that rep
resent a method | 720 * The interface {@code MethodElement} defines the behavior of elements that rep
resent a method |
| 687 * defined within a type. | 721 * defined within a type. |
| 722 * @coverage dart.engine.element |
| 688 */ | 723 */ |
| 689 abstract class MethodElement implements ExecutableElement { | 724 abstract class MethodElement implements ExecutableElement { |
| 690 /** | 725 /** |
| 691 * Return the type in which this method is defined. | 726 * Return the type in which this method is defined. |
| 692 * @return the type in which this method is defined | 727 * @return the type in which this method is defined |
| 693 */ | 728 */ |
| 694 ClassElement get enclosingElement; | 729 ClassElement get enclosingElement; |
| 695 /** | 730 /** |
| 696 * Return {@code true} if this method is abstract. Methods are abstract if the
y are not external | 731 * Return {@code true} if this method is abstract. Methods are abstract if the
y are not external |
| 697 * and have no body. | 732 * and have no body. |
| 698 * @return {@code true} if this method is abstract | 733 * @return {@code true} if this method is abstract |
| 699 */ | 734 */ |
| 700 bool isAbstract(); | 735 bool isAbstract(); |
| 701 } | 736 } |
| 702 /** | 737 /** |
| 703 * The interface {@code MultiplyDefinedElement} defines the behavior of pseudo-e
lements that | 738 * The interface {@code MultiplyDefinedElement} defines the behavior of pseudo-e
lements that |
| 704 * represent multiple elements defined within a single scope that have the same
name. This situation | 739 * represent multiple elements defined within a single scope that have the same
name. This situation |
| 705 * is not allowed by the language, so objects implementing this interface always
represent an error. | 740 * is not allowed by the language, so objects implementing this interface always
represent an error. |
| 706 * As a result, most of the normal operations on elements do not make sense and
will return useless | 741 * As a result, most of the normal operations on elements do not make sense and
will return useless |
| 707 * results. | 742 * results. |
| 743 * @coverage dart.engine.element |
| 708 */ | 744 */ |
| 709 abstract class MultiplyDefinedElement implements Element { | 745 abstract class MultiplyDefinedElement implements Element { |
| 710 /** | 746 /** |
| 711 * Return an array containing all of the elements that were defined within the
scope to have the | 747 * Return an array containing all of the elements that were defined within the
scope to have the |
| 712 * same name. | 748 * same name. |
| 713 * @return the elements that were defined with the same name | 749 * @return the elements that were defined with the same name |
| 714 */ | 750 */ |
| 715 List<Element> get conflictingElements; | 751 List<Element> get conflictingElements; |
| 716 } | 752 } |
| 717 /** | 753 /** |
| 718 * The interface {@code NamespaceCombinator} defines the behavior common to obje
cts that control how | 754 * The interface {@code NamespaceCombinator} defines the behavior common to obje
cts that control how |
| 719 * namespaces are combined. | 755 * namespaces are combined. |
| 756 * @coverage dart.engine.element |
| 720 */ | 757 */ |
| 721 abstract class NamespaceCombinator { | 758 abstract class NamespaceCombinator { |
| 722 /** | 759 /** |
| 723 * An empty array of namespace combinators. | 760 * An empty array of namespace combinators. |
| 724 */ | 761 */ |
| 725 static List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombinator>(0
); | 762 static List<NamespaceCombinator> EMPTY_ARRAY = new List<NamespaceCombinator>(0
); |
| 726 } | 763 } |
| 727 /** | 764 /** |
| 728 * The interface {@code ParameterElement} defines the behavior of elements repre
senting a parameter | 765 * The interface {@code ParameterElement} defines the behavior of elements repre
senting a parameter |
| 729 * defined within an executable element. | 766 * defined within an executable element. |
| 767 * @coverage dart.engine.element |
| 730 */ | 768 */ |
| 731 abstract class ParameterElement implements LocalElement, VariableElement { | 769 abstract class ParameterElement implements LocalElement, VariableElement { |
| 732 /** | 770 /** |
| 733 * Return the kind of this parameter. | 771 * Return the kind of this parameter. |
| 734 * @return the kind of this parameter | 772 * @return the kind of this parameter |
| 735 */ | 773 */ |
| 736 ParameterKind get parameterKind; | 774 ParameterKind get parameterKind; |
| 737 /** | 775 /** |
| 738 * Return {@code true} if this parameter is an initializing formal parameter. | 776 * Return {@code true} if this parameter is an initializing formal parameter. |
| 739 * @return {@code true} if this parameter is an initializing formal parameter | 777 * @return {@code true} if this parameter is an initializing formal parameter |
| 740 */ | 778 */ |
| 741 bool isInitializingFormal(); | 779 bool isInitializingFormal(); |
| 742 } | 780 } |
| 743 /** | 781 /** |
| 744 * The interface {@code PrefixElement} defines the behavior common to elements t
hat represent a | 782 * The interface {@code PrefixElement} defines the behavior common to elements t
hat represent a |
| 745 * prefix used to import one or more libraries into another library. | 783 * prefix used to import one or more libraries into another library. |
| 784 * @coverage dart.engine.element |
| 746 */ | 785 */ |
| 747 abstract class PrefixElement implements Element { | 786 abstract class PrefixElement implements Element { |
| 748 /** | 787 /** |
| 749 * Return the library into which other libraries are imported using this prefi
x. | 788 * Return the library into which other libraries are imported using this prefi
x. |
| 750 * @return the library into which other libraries are imported using this pref
ix | 789 * @return the library into which other libraries are imported using this pref
ix |
| 751 */ | 790 */ |
| 752 LibraryElement get enclosingElement; | 791 LibraryElement get enclosingElement; |
| 753 /** | 792 /** |
| 754 * Return an array containing all of the libraries that are imported using thi
s prefix. | 793 * Return an array containing all of the libraries that are imported using thi
s prefix. |
| 755 * @return the libraries that are imported using this prefix | 794 * @return the libraries that are imported using this prefix |
| 756 */ | 795 */ |
| 757 List<LibraryElement> get importedLibraries; | 796 List<LibraryElement> get importedLibraries; |
| 758 } | 797 } |
| 759 /** | 798 /** |
| 760 * The interface {@code PropertyAccessorElement} defines the behavior of element
s representing a | 799 * The interface {@code PropertyAccessorElement} defines the behavior of element
s representing a |
| 761 * getter or a setter. Note that explicitly defined property accessors implicitl
y define a synthetic | 800 * getter or a setter. Note that explicitly defined property accessors implicitl
y define a synthetic |
| 762 * field. Symmetrically, synthetic accessors are implicitly created for explicit
ly defined fields. | 801 * field. Symmetrically, synthetic accessors are implicitly created for explicit
ly defined fields. |
| 763 * The following rules apply: | 802 * The following rules apply: |
| 764 * <ul> | 803 * <ul> |
| 765 * <li>Every explicit field is represented by a non-synthetic {@link FieldElemen
t}. | 804 * <li>Every explicit field is represented by a non-synthetic {@link FieldElemen
t}. |
| 766 * <li>Every explicit field induces a getter and possibly a setter, both of whic
h are represented by | 805 * <li>Every explicit field induces a getter and possibly a setter, both of whic
h are represented by |
| 767 * synthetic {@link PropertyAccessorElement}s. | 806 * synthetic {@link PropertyAccessorElement}s. |
| 768 * <li>Every explicit getter or setter is represented by a non-synthetic{@link P
ropertyAccessorElement}. | 807 * <li>Every explicit getter or setter is represented by a non-synthetic{@link P
ropertyAccessorElement}. |
| 769 * <li>Every explicit getter or setter (or pair thereof if they have the same na
me) induces a field | 808 * <li>Every explicit getter or setter (or pair thereof if they have the same na
me) induces a field |
| 770 * that is represented by a synthetic {@link FieldElement}. | 809 * that is represented by a synthetic {@link FieldElement}. |
| 771 * </ul> | 810 * </ul> |
| 811 * @coverage dart.engine.element |
| 772 */ | 812 */ |
| 773 abstract class PropertyAccessorElement implements ExecutableElement { | 813 abstract class PropertyAccessorElement implements ExecutableElement { |
| 774 /** | 814 /** |
| 775 * Return the field or top-level variable associated with this accessor. If th
is accessor was | 815 * Return the field or top-level variable associated with this accessor. If th
is accessor was |
| 776 * explicitly defined (is not synthetic) then the variable associated with it
will be synthetic. | 816 * explicitly defined (is not synthetic) then the variable associated with it
will be synthetic. |
| 777 * @return the variable associated with this accessor | 817 * @return the variable associated with this accessor |
| 778 */ | 818 */ |
| 779 PropertyInducingElement get variable; | 819 PropertyInducingElement get variable; |
| 780 /** | 820 /** |
| 781 * Return {@code true} if this accessor represents a getter. | 821 * Return {@code true} if this accessor represents a getter. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 795 * variables implicitly define a synthetic setter. Symmetrically, synthetic fiel
ds are implicitly | 835 * variables implicitly define a synthetic setter. Symmetrically, synthetic fiel
ds are implicitly |
| 796 * created for explicitly defined getters and setters. The following rules apply
: | 836 * created for explicitly defined getters and setters. The following rules apply
: |
| 797 * <ul> | 837 * <ul> |
| 798 * <li>Every explicit variable is represented by a non-synthetic {@link Property
InducingElement}. | 838 * <li>Every explicit variable is represented by a non-synthetic {@link Property
InducingElement}. |
| 799 * <li>Every explicit variable induces a getter and possibly a setter, both of w
hich are represented | 839 * <li>Every explicit variable induces a getter and possibly a setter, both of w
hich are represented |
| 800 * by synthetic {@link PropertyAccessorElement}s. | 840 * by synthetic {@link PropertyAccessorElement}s. |
| 801 * <li>Every explicit getter or setter is represented by a non-synthetic{@link P
ropertyAccessorElement}. | 841 * <li>Every explicit getter or setter is represented by a non-synthetic{@link P
ropertyAccessorElement}. |
| 802 * <li>Every explicit getter or setter (or pair thereof if they have the same na
me) induces a | 842 * <li>Every explicit getter or setter (or pair thereof if they have the same na
me) induces a |
| 803 * variable that is represented by a synthetic {@link PropertyInducingElement}. | 843 * variable that is represented by a synthetic {@link PropertyInducingElement}. |
| 804 * </ul> | 844 * </ul> |
| 845 * @coverage dart.engine.element |
| 805 */ | 846 */ |
| 806 abstract class PropertyInducingElement implements VariableElement { | 847 abstract class PropertyInducingElement implements VariableElement { |
| 807 /** | 848 /** |
| 808 * Return the getter associated with this variable. If this variable was expli
citly defined (is | 849 * Return the getter associated with this variable. If this variable was expli
citly defined (is |
| 809 * not synthetic) then the getter associated with it will be synthetic. | 850 * not synthetic) then the getter associated with it will be synthetic. |
| 810 * @return the getter associated with this variable | 851 * @return the getter associated with this variable |
| 811 */ | 852 */ |
| 812 PropertyAccessorElement get getter; | 853 PropertyAccessorElement get getter; |
| 813 /** | 854 /** |
| 814 * Return the setter associated with this variable, or {@code null} if the var
iable is effectively{@code final} and therefore does not have a setter associate
d with it. (This can happen either | 855 * Return the setter associated with this variable, or {@code null} if the var
iable is effectively{@code final} and therefore does not have a setter associate
d with it. (This can happen either |
| 815 * because the variable is explicitly defined as being {@code final} or becaus
e the variable is | 856 * because the variable is explicitly defined as being {@code final} or becaus
e the variable is |
| 816 * induced by an explicit getter that does not have a corresponding setter.) I
f this variable was | 857 * induced by an explicit getter that does not have a corresponding setter.) I
f this variable was |
| 817 * explicitly defined (is not synthetic) then the setter associated with it wi
ll be synthetic. | 858 * explicitly defined (is not synthetic) then the setter associated with it wi
ll be synthetic. |
| 818 * @return the setter associated with this variable | 859 * @return the setter associated with this variable |
| 819 */ | 860 */ |
| 820 PropertyAccessorElement get setter; | 861 PropertyAccessorElement get setter; |
| 821 /** | 862 /** |
| 822 * Return {@code true} if this element is a static element. A static element i
s an element that is | 863 * Return {@code true} if this element is a static element. A static element i
s an element that is |
| 823 * not associated with a particular instance, but rather with an entire librar
y or class. | 864 * not associated with a particular instance, but rather with an entire librar
y or class. |
| 824 * @return {@code true} if this executable element is a static element | 865 * @return {@code true} if this executable element is a static element |
| 825 */ | 866 */ |
| 826 bool isStatic(); | 867 bool isStatic(); |
| 827 } | 868 } |
| 828 /** | 869 /** |
| 829 * The interface {@code ShowCombinator} defines the behavior of combinators that
cause some of the | 870 * The interface {@code ShowCombinator} defines the behavior of combinators that
cause some of the |
| 830 * names in a namespace to be visible (and the rest hidden) when being imported. | 871 * names in a namespace to be visible (and the rest hidden) when being imported. |
| 872 * @coverage dart.engine.element |
| 831 */ | 873 */ |
| 832 abstract class ShowCombinator implements NamespaceCombinator { | 874 abstract class ShowCombinator implements NamespaceCombinator { |
| 833 /** | 875 /** |
| 834 * Return an array containing the names that are to be made visible in the imp
orting library if | 876 * Return an array containing the names that are to be made visible in the imp
orting library if |
| 835 * they are defined in the imported library. | 877 * they are defined in the imported library. |
| 836 * @return the names from the imported library that are visible in the importi
ng library | 878 * @return the names from the imported library that are visible in the importi
ng library |
| 837 */ | 879 */ |
| 838 List<String> get shownNames; | 880 List<String> get shownNames; |
| 839 } | 881 } |
| 840 /** | 882 /** |
| 841 * The interface {@code TopLevelVariableElement} defines the behavior of element
s representing a | 883 * The interface {@code TopLevelVariableElement} defines the behavior of element
s representing a |
| 842 * top-level variable. | 884 * top-level variable. |
| 885 * @coverage dart.engine.element |
| 843 */ | 886 */ |
| 844 abstract class TopLevelVariableElement implements PropertyInducingElement { | 887 abstract class TopLevelVariableElement implements PropertyInducingElement { |
| 845 } | 888 } |
| 846 /** | 889 /** |
| 847 * The interface {@code TypeAliasElement} defines the behavior of elements repre
senting a type alias | 890 * The interface {@code TypeAliasElement} defines the behavior of elements repre
senting a type alias |
| 848 * ({@code typedef}). | 891 * ({@code typedef}). |
| 892 * @coverage dart.engine.element |
| 849 */ | 893 */ |
| 850 abstract class TypeAliasElement implements Element { | 894 abstract class TypeAliasElement implements Element { |
| 851 /** | 895 /** |
| 852 * Return the compilation unit in which this type alias is defined. | 896 * Return the compilation unit in which this type alias is defined. |
| 853 * @return the compilation unit in which this type alias is defined | 897 * @return the compilation unit in which this type alias is defined |
| 854 */ | 898 */ |
| 855 CompilationUnitElement get enclosingElement; | 899 CompilationUnitElement get enclosingElement; |
| 856 /** | 900 /** |
| 857 * Return an array containing all of the parameters defined by this type alias
. | 901 * Return an array containing all of the parameters defined by this type alias
. |
| 858 * @return the parameters defined by this type alias | 902 * @return the parameters defined by this type alias |
| 859 */ | 903 */ |
| 860 List<ParameterElement> get parameters; | 904 List<ParameterElement> get parameters; |
| 861 /** | 905 /** |
| 862 * Return the type of function defined by this type alias. | 906 * Return the type of function defined by this type alias. |
| 863 * @return the type of function defined by this type alias | 907 * @return the type of function defined by this type alias |
| 864 */ | 908 */ |
| 865 FunctionType get type; | 909 FunctionType get type; |
| 866 /** | 910 /** |
| 867 * Return an array containing all of the type variables defined for this type. | 911 * Return an array containing all of the type variables defined for this type. |
| 868 * @return the type variables defined for this type | 912 * @return the type variables defined for this type |
| 869 */ | 913 */ |
| 870 List<TypeVariableElement> get typeVariables; | 914 List<TypeVariableElement> get typeVariables; |
| 871 } | 915 } |
| 872 /** | 916 /** |
| 873 * The interface {@code TypeVariableElement} defines the behavior of elements re
presenting a type | 917 * The interface {@code TypeVariableElement} defines the behavior of elements re
presenting a type |
| 874 * variable. | 918 * variable. |
| 919 * @coverage dart.engine.element |
| 875 */ | 920 */ |
| 876 abstract class TypeVariableElement implements Element { | 921 abstract class TypeVariableElement implements Element { |
| 877 /** | 922 /** |
| 878 * Return the type representing the bound associated with this variable, or {@
code null} if this | 923 * Return the type representing the bound associated with this variable, or {@
code null} if this |
| 879 * variable does not have an explicit bound. | 924 * variable does not have an explicit bound. |
| 880 * @return the type representing the bound associated with this variable | 925 * @return the type representing the bound associated with this variable |
| 881 */ | 926 */ |
| 882 Type2 get bound; | 927 Type2 get bound; |
| 883 /** | 928 /** |
| 884 * Return the type defined by this type variable. | 929 * Return the type defined by this type variable. |
| 885 * @return the type defined by this type variable | 930 * @return the type defined by this type variable |
| 886 */ | 931 */ |
| 887 TypeVariableType get type; | 932 TypeVariableType get type; |
| 888 } | 933 } |
| 889 /** | 934 /** |
| 890 * The interface {@code UndefinedElement} defines the behavior of pseudo-element
s that represent | 935 * The interface {@code UndefinedElement} defines the behavior of pseudo-element
s that represent |
| 891 * names that are undefined. This situation is not allowed by the language, so o
bjects implementing | 936 * names that are undefined. This situation is not allowed by the language, so o
bjects implementing |
| 892 * this interface always represent an error. As a result, most of the normal ope
rations on elements | 937 * this interface always represent an error. As a result, most of the normal ope
rations on elements |
| 893 * do not make sense and will return useless results. | 938 * do not make sense and will return useless results. |
| 939 * @coverage dart.engine.element |
| 894 */ | 940 */ |
| 895 abstract class UndefinedElement implements Element { | 941 abstract class UndefinedElement implements Element { |
| 896 } | 942 } |
| 897 /** | 943 /** |
| 898 * The interface {@code VariableElement} defines the behavior common to elements
that represent a | 944 * The interface {@code VariableElement} defines the behavior common to elements
that represent a |
| 899 * variable. | 945 * variable. |
| 946 * @coverage dart.engine.element |
| 900 */ | 947 */ |
| 901 abstract class VariableElement implements Element { | 948 abstract class VariableElement implements Element { |
| 902 /** | 949 /** |
| 903 * Return a synthetic function representing this variable's initializer, or {@
code null} if this | 950 * Return a synthetic function representing this variable's initializer, or {@
code null} if this |
| 904 * variable does not have an initializer. The function will have no parameters
. The return type of | 951 * variable does not have an initializer. The function will have no parameters
. The return type of |
| 905 * the function will be the compile-time type of the initialization expression
. | 952 * the function will be the compile-time type of the initialization expression
. |
| 906 * @return a synthetic function representing this variable's initializer | 953 * @return a synthetic function representing this variable's initializer |
| 907 */ | 954 */ |
| 908 FunctionElement get initializer; | 955 FunctionElement get initializer; |
| 909 /** | 956 /** |
| 910 * Return the declared type of this variable, or {@code null} if the variable
did not have a | 957 * Return the declared type of this variable, or {@code null} if the variable
did not have a |
| 911 * declared type (such as if it was declared using the keyword 'var'). | 958 * declared type (such as if it was declared using the keyword 'var'). |
| 912 * @return the declared type of this variable | 959 * @return the declared type of this variable |
| 913 */ | 960 */ |
| 914 Type2 get type; | 961 Type2 get type; |
| 915 /** | 962 /** |
| 916 * Return {@code true} if this variable is a const variable. Variables are con
st if they have been | 963 * Return {@code true} if this variable was declared with the 'const' modifier
. |
| 917 * marked as being const using the {@code const} modifier. | 964 * @return {@code true} if this variable was declared with the 'const' modifie
r |
| 918 * @return {@code true} if this variable is a const variable | |
| 919 */ | 965 */ |
| 920 bool isConst(); | 966 bool isConst(); |
| 921 /** | 967 /** |
| 922 * Return {@code true} if this variable is a final variable. Variables are fin
al if they have been | 968 * Return {@code true} if this variable was declared with the 'final' modifier
. Variables that are |
| 923 * marked as being final using either the {@code final} or {@code const} modif
iers. | 969 * declared with the 'const' modifier will return {@code false} even though th
ey are implicitly |
| 924 * @return {@code true} if this variable is a final variable | 970 * final. |
| 971 * @return {@code true} if this variable was declared with the 'final' modifie
r |
| 925 */ | 972 */ |
| 926 bool isFinal(); | 973 bool isFinal(); |
| 927 } | 974 } |
| 928 /** | 975 /** |
| 929 * Instances of the class {@code GeneralizingElementVisitor} implement an elemen
t visitor that will | 976 * Instances of the class {@code GeneralizingElementVisitor} implement an elemen
t visitor that will |
| 930 * recursively visit all of the elements in an element model (like instances of
the class{@link RecursiveElementVisitor}). In addition, when an element of a spe
cific type is visited not | 977 * recursively visit all of the elements in an element model (like instances of
the class{@link RecursiveElementVisitor}). In addition, when an element of a spe
cific type is visited not |
| 931 * only will the visit method for that specific type of element be invoked, but
additional methods | 978 * only will the visit method for that specific type of element be invoked, but
additional methods |
| 932 * for the supertypes of that element will also be invoked. For example, using a
n instance of this | 979 * for the supertypes of that element will also be invoked. For example, using a
n instance of this |
| 933 * class to visit a {@link MethodElement} will cause the method{@link #visitMeth
odElement(MethodElement)} to be invoked but will also cause the methods{@link #v
isitExecutableElement(ExecutableElement)} and {@link #visitElement(Element)} to
be | 980 * class to visit a {@link MethodElement} will cause the method{@link #visitMeth
odElement(MethodElement)} to be invoked but will also cause the methods{@link #v
isitExecutableElement(ExecutableElement)} and {@link #visitElement(Element)} to
be |
| 934 * subsequently invoked. This allows visitors to be written that visit all execu
table elements | 981 * subsequently invoked. This allows visitors to be written that visit all execu
table elements |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 * TopLevelVariableElement | 1013 * TopLevelVariableElement |
| 967 * LocalElement | 1014 * LocalElement |
| 968 * LocalVariableElement | 1015 * LocalVariableElement |
| 969 * ParameterElement | 1016 * ParameterElement |
| 970 * </pre> | 1017 * </pre> |
| 971 * <p> | 1018 * <p> |
| 972 * Subclasses that override a visit method must either invoke the overridden vis
it method or | 1019 * Subclasses that override a visit method must either invoke the overridden vis
it method or |
| 973 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods | 1020 * explicitly invoke the more general visit method. Failure to do so will cause
the visit methods |
| 974 * for superclasses of the element to not be invoked and will cause the children
of the visited node | 1021 * for superclasses of the element to not be invoked and will cause the children
of the visited node |
| 975 * to not be visited. | 1022 * to not be visited. |
| 1023 * @coverage dart.engine.element |
| 976 */ | 1024 */ |
| 977 class GeneralizingElementVisitor<R> implements ElementVisitor<R> { | 1025 class GeneralizingElementVisitor<R> implements ElementVisitor<R> { |
| 978 R visitClassElement(ClassElement element) => visitElement(element); | 1026 R visitClassElement(ClassElement element) => visitElement(element); |
| 979 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); | 1027 R visitCompilationUnitElement(CompilationUnitElement element) => visitElement(
element); |
| 980 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); | 1028 R visitConstructorElement(ConstructorElement element) => visitExecutableElemen
t(element); |
| 981 R visitElement(Element element) { | 1029 R visitElement(Element element) { |
| 982 element.visitChildren(this); | 1030 element.visitChildren(this); |
| 983 return null; | 1031 return null; |
| 984 } | 1032 } |
| 1033 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => visitHt
mlScriptElement(element); |
| 985 R visitExecutableElement(ExecutableElement element) => visitElement(element); | 1034 R visitExecutableElement(ExecutableElement element) => visitElement(element); |
| 986 R visitExportElement(ExportElement element) => visitElement(element); | 1035 R visitExportElement(ExportElement element) => visitElement(element); |
| 1036 R visitExternalHtmlScriptElement(ExternalHtmlScriptElement element) => visitHt
mlScriptElement(element); |
| 987 R visitFieldElement(FieldElement element) => visitPropertyInducingElement(elem
ent); | 1037 R visitFieldElement(FieldElement element) => visitPropertyInducingElement(elem
ent); |
| 988 R visitFunctionElement(FunctionElement element) => visitLocalElement(element); | 1038 R visitFunctionElement(FunctionElement element) => visitLocalElement(element); |
| 989 R visitHtmlElement(HtmlElement element) => visitElement(element); | 1039 R visitHtmlElement(HtmlElement element) => visitElement(element); |
| 1040 R visitHtmlScriptElement(HtmlScriptElement element) => visitElement(element); |
| 990 R visitImportElement(ImportElement element) => visitElement(element); | 1041 R visitImportElement(ImportElement element) => visitElement(element); |
| 991 R visitLabelElement(LabelElement element) => visitElement(element); | 1042 R visitLabelElement(LabelElement element) => visitElement(element); |
| 992 R visitLibraryElement(LibraryElement element) => visitElement(element); | 1043 R visitLibraryElement(LibraryElement element) => visitElement(element); |
| 993 R visitLocalElement(LocalElement element) { | 1044 R visitLocalElement(LocalElement element) { |
| 994 if (element is LocalVariableElement) { | 1045 if (element is LocalVariableElement) { |
| 995 return visitVariableElement((element as LocalVariableElement)); | 1046 return visitVariableElement((element as LocalVariableElement)); |
| 996 } else if (element is ParameterElement) { | 1047 } else if (element is ParameterElement) { |
| 997 return visitVariableElement((element as ParameterElement)); | 1048 return visitVariableElement((element as ParameterElement)); |
| 998 } else if (element is FunctionElement) { | 1049 } else if (element is FunctionElement) { |
| 999 return visitExecutableElement((element as FunctionElement)); | 1050 return visitExecutableElement((element as FunctionElement)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1014 } | 1065 } |
| 1015 /** | 1066 /** |
| 1016 * Instances of the class {@code RecursiveElementVisitor} implement an element v
isitor that will | 1067 * Instances of the class {@code RecursiveElementVisitor} implement an element v
isitor that will |
| 1017 * recursively visit all of the element in an element model. For example, using
an instance of this | 1068 * recursively visit all of the element in an element model. For example, using
an instance of this |
| 1018 * class to visit a {@link CompilationUnitElement} will also cause all of the ty
pes in the | 1069 * class to visit a {@link CompilationUnitElement} will also cause all of the ty
pes in the |
| 1019 * compilation unit to be visited. | 1070 * compilation unit to be visited. |
| 1020 * <p> | 1071 * <p> |
| 1021 * Subclasses that override a visit method must either invoke the overridden vis
it method or must | 1072 * Subclasses that override a visit method must either invoke the overridden vis
it method or must |
| 1022 * explicitly ask the visited element to visit its children. Failure to do so wi
ll cause the | 1073 * explicitly ask the visited element to visit its children. Failure to do so wi
ll cause the |
| 1023 * children of the visited element to not be visited. | 1074 * children of the visited element to not be visited. |
| 1075 * @coverage dart.engine.element |
| 1024 */ | 1076 */ |
| 1025 class RecursiveElementVisitor<R> implements ElementVisitor<R> { | 1077 class RecursiveElementVisitor<R> implements ElementVisitor<R> { |
| 1026 R visitClassElement(ClassElement element) { | 1078 R visitClassElement(ClassElement element) { |
| 1027 element.visitChildren(this); | 1079 element.visitChildren(this); |
| 1028 return null; | 1080 return null; |
| 1029 } | 1081 } |
| 1030 R visitCompilationUnitElement(CompilationUnitElement element) { | 1082 R visitCompilationUnitElement(CompilationUnitElement element) { |
| 1031 element.visitChildren(this); | 1083 element.visitChildren(this); |
| 1032 return null; | 1084 return null; |
| 1033 } | 1085 } |
| 1034 R visitConstructorElement(ConstructorElement element) { | 1086 R visitConstructorElement(ConstructorElement element) { |
| 1035 element.visitChildren(this); | 1087 element.visitChildren(this); |
| 1036 return null; | 1088 return null; |
| 1037 } | 1089 } |
| 1090 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) { |
| 1091 element.visitChildren(this); |
| 1092 return null; |
| 1093 } |
| 1038 R visitExportElement(ExportElement element) { | 1094 R visitExportElement(ExportElement element) { |
| 1039 element.visitChildren(this); | 1095 element.visitChildren(this); |
| 1040 return null; | 1096 return null; |
| 1041 } | 1097 } |
| 1098 R visitExternalHtmlScriptElement(ExternalHtmlScriptElement element) { |
| 1099 element.visitChildren(this); |
| 1100 return null; |
| 1101 } |
| 1042 R visitFieldElement(FieldElement element) { | 1102 R visitFieldElement(FieldElement element) { |
| 1043 element.visitChildren(this); | 1103 element.visitChildren(this); |
| 1044 return null; | 1104 return null; |
| 1045 } | 1105 } |
| 1046 R visitFunctionElement(FunctionElement element) { | 1106 R visitFunctionElement(FunctionElement element) { |
| 1047 element.visitChildren(this); | 1107 element.visitChildren(this); |
| 1048 return null; | 1108 return null; |
| 1049 } | 1109 } |
| 1050 R visitHtmlElement(HtmlElement element) { | 1110 R visitHtmlElement(HtmlElement element) { |
| 1051 element.visitChildren(this); | 1111 element.visitChildren(this); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 R visitTypeVariableElement(TypeVariableElement element) { | 1158 R visitTypeVariableElement(TypeVariableElement element) { |
| 1099 element.visitChildren(this); | 1159 element.visitChildren(this); |
| 1100 return null; | 1160 return null; |
| 1101 } | 1161 } |
| 1102 } | 1162 } |
| 1103 /** | 1163 /** |
| 1104 * Instances of the class {@code SimpleElementVisitor} implement an element visi
tor that will do | 1164 * Instances of the class {@code SimpleElementVisitor} implement an element visi
tor that will do |
| 1105 * nothing when visiting an element. It is intended to be a superclass for class
es that use the | 1165 * nothing when visiting an element. It is intended to be a superclass for class
es that use the |
| 1106 * visitor pattern primarily as a dispatch mechanism (and hence don't need to re
cursively visit a | 1166 * visitor pattern primarily as a dispatch mechanism (and hence don't need to re
cursively visit a |
| 1107 * whole structure) and that only need to visit a small number of element types. | 1167 * whole structure) and that only need to visit a small number of element types. |
| 1168 * @coverage dart.engine.element |
| 1108 */ | 1169 */ |
| 1109 class SimpleElementVisitor<R> implements ElementVisitor<R> { | 1170 class SimpleElementVisitor<R> implements ElementVisitor<R> { |
| 1110 R visitClassElement(ClassElement element) => null; | 1171 R visitClassElement(ClassElement element) => null; |
| 1111 R visitCompilationUnitElement(CompilationUnitElement element) => null; | 1172 R visitCompilationUnitElement(CompilationUnitElement element) => null; |
| 1112 R visitConstructorElement(ConstructorElement element) => null; | 1173 R visitConstructorElement(ConstructorElement element) => null; |
| 1174 R visitEmbeddedHtmlScriptElement(EmbeddedHtmlScriptElement element) => null; |
| 1113 R visitExportElement(ExportElement element) => null; | 1175 R visitExportElement(ExportElement element) => null; |
| 1176 R visitExternalHtmlScriptElement(ExternalHtmlScriptElement element) => null; |
| 1114 R visitFieldElement(FieldElement element) => null; | 1177 R visitFieldElement(FieldElement element) => null; |
| 1115 R visitFunctionElement(FunctionElement element) => null; | 1178 R visitFunctionElement(FunctionElement element) => null; |
| 1116 R visitHtmlElement(HtmlElement element) => null; | 1179 R visitHtmlElement(HtmlElement element) => null; |
| 1117 R visitImportElement(ImportElement element) => null; | 1180 R visitImportElement(ImportElement element) => null; |
| 1118 R visitLabelElement(LabelElement element) => null; | 1181 R visitLabelElement(LabelElement element) => null; |
| 1119 R visitLibraryElement(LibraryElement element) => null; | 1182 R visitLibraryElement(LibraryElement element) => null; |
| 1120 R visitLocalVariableElement(LocalVariableElement element) => null; | 1183 R visitLocalVariableElement(LocalVariableElement element) => null; |
| 1121 R visitMethodElement(MethodElement element) => null; | 1184 R visitMethodElement(MethodElement element) => null; |
| 1122 R visitMultiplyDefinedElement(MultiplyDefinedElement element) => null; | 1185 R visitMultiplyDefinedElement(MultiplyDefinedElement element) => null; |
| 1123 R visitParameterElement(ParameterElement element) => null; | 1186 R visitParameterElement(ParameterElement element) => null; |
| 1124 R visitPrefixElement(PrefixElement element) => null; | 1187 R visitPrefixElement(PrefixElement element) => null; |
| 1125 R visitPropertyAccessorElement(PropertyAccessorElement element) => null; | 1188 R visitPropertyAccessorElement(PropertyAccessorElement element) => null; |
| 1126 R visitTopLevelVariableElement(TopLevelVariableElement element) => null; | 1189 R visitTopLevelVariableElement(TopLevelVariableElement element) => null; |
| 1127 R visitTypeAliasElement(TypeAliasElement element) => null; | 1190 R visitTypeAliasElement(TypeAliasElement element) => null; |
| 1128 R visitTypeVariableElement(TypeVariableElement element) => null; | 1191 R visitTypeVariableElement(TypeVariableElement element) => null; |
| 1129 } | 1192 } |
| 1130 /** | 1193 /** |
| 1131 * Instances of the class {@code AnnotationImpl} implement an {@link Annotation}
. | 1194 * Instances of the class {@code AnnotationImpl} implement an {@link Annotation}
. |
| 1195 * @coverage dart.engine.element |
| 1132 */ | 1196 */ |
| 1133 class AnnotationImpl implements Annotation { | 1197 class AnnotationImpl implements Annotation { |
| 1134 /** | 1198 /** |
| 1135 * The element representing the field, variable, or constructor being used as
an annotation. | 1199 * The element representing the field, variable, or constructor being used as
an annotation. |
| 1136 */ | 1200 */ |
| 1137 Element _element; | 1201 Element _element; |
| 1138 /** | 1202 /** |
| 1139 * An empty array of annotations. | 1203 * An empty array of annotations. |
| 1140 */ | 1204 */ |
| 1141 static List<AnnotationImpl> EMPTY_ARRAY = new List<AnnotationImpl>(0); | 1205 static List<AnnotationImpl> EMPTY_ARRAY = new List<AnnotationImpl>(0); |
| 1142 /** | 1206 /** |
| 1143 * Initialize a newly created annotation. | 1207 * Initialize a newly created annotation. |
| 1144 * @param element the element representing the field, variable, or constructor
being used as an | 1208 * @param element the element representing the field, variable, or constructor
being used as an |
| 1145 * annotation | 1209 * annotation |
| 1146 */ | 1210 */ |
| 1147 AnnotationImpl(Element element) { | 1211 AnnotationImpl(Element element) { |
| 1148 this._element = element; | 1212 this._element = element; |
| 1149 } | 1213 } |
| 1150 Element get element => _element; | 1214 Element get element => _element; |
| 1151 String toString() => "@${_element.toString()}"; | 1215 String toString() => "@${_element.toString()}"; |
| 1152 } | 1216 } |
| 1153 /** | 1217 /** |
| 1154 * Instances of the class {@code ClassElementImpl} implement a {@code ClassEleme
nt}. | 1218 * Instances of the class {@code ClassElementImpl} implement a {@code ClassEleme
nt}. |
| 1219 * @coverage dart.engine.element |
| 1155 */ | 1220 */ |
| 1156 class ClassElementImpl extends ElementImpl implements ClassElement { | 1221 class ClassElementImpl extends ElementImpl implements ClassElement { |
| 1157 /** | 1222 /** |
| 1158 * An array containing all of the accessors (getters and setters) contained in
this class. | 1223 * An array containing all of the accessors (getters and setters) contained in
this class. |
| 1159 */ | 1224 */ |
| 1160 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; | 1225 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; |
| 1161 /** | 1226 /** |
| 1162 * An array containing all of the constructors contained in this class. | 1227 * An array containing all of the constructors contained in this class. |
| 1163 */ | 1228 */ |
| 1164 List<ConstructorElement> _constructors = ConstructorElementImpl.EMPTY_ARRAY; | 1229 List<ConstructorElement> _constructors = ConstructorElementImpl.EMPTY_ARRAY; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 */ | 1266 */ |
| 1202 ClassElementImpl(Identifier name) : super.con1(name) { | 1267 ClassElementImpl(Identifier name) : super.con1(name) { |
| 1203 } | 1268 } |
| 1204 accept(ElementVisitor visitor) => visitor.visitClassElement(this); | 1269 accept(ElementVisitor visitor) => visitor.visitClassElement(this); |
| 1205 List<PropertyAccessorElement> get accessors => _accessors; | 1270 List<PropertyAccessorElement> get accessors => _accessors; |
| 1206 List<InterfaceType> get allSupertypes { | 1271 List<InterfaceType> get allSupertypes { |
| 1207 Collection<InterfaceType> list = new Set<InterfaceType>(); | 1272 Collection<InterfaceType> list = new Set<InterfaceType>(); |
| 1208 collectAllSupertypes(list); | 1273 collectAllSupertypes(list); |
| 1209 return new List.from(list); | 1274 return new List.from(list); |
| 1210 } | 1275 } |
| 1211 ElementImpl getChild(String identifier24) { | 1276 ElementImpl getChild(String identifier25) { |
| 1212 for (PropertyAccessorElement accessor in _accessors) { | 1277 for (PropertyAccessorElement accessor in _accessors) { |
| 1213 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier24
) { | 1278 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier25
) { |
| 1214 return accessor as PropertyAccessorElementImpl; | 1279 return accessor as PropertyAccessorElementImpl; |
| 1215 } | 1280 } |
| 1216 } | 1281 } |
| 1217 for (ConstructorElement constructor in _constructors) { | 1282 for (ConstructorElement constructor in _constructors) { |
| 1218 if (((constructor as ConstructorElementImpl)).identifier == identifier24)
{ | 1283 if (((constructor as ConstructorElementImpl)).identifier == identifier25)
{ |
| 1219 return constructor as ConstructorElementImpl; | 1284 return constructor as ConstructorElementImpl; |
| 1220 } | 1285 } |
| 1221 } | 1286 } |
| 1222 for (FieldElement field in _fields) { | 1287 for (FieldElement field in _fields) { |
| 1223 if (((field as FieldElementImpl)).identifier == identifier24) { | 1288 if (((field as FieldElementImpl)).identifier == identifier25) { |
| 1224 return field as FieldElementImpl; | 1289 return field as FieldElementImpl; |
| 1225 } | 1290 } |
| 1226 } | 1291 } |
| 1227 for (MethodElement method in _methods) { | 1292 for (MethodElement method in _methods) { |
| 1228 if (((method as MethodElementImpl)).identifier == identifier24) { | 1293 if (((method as MethodElementImpl)).identifier == identifier25) { |
| 1229 return method as MethodElementImpl; | 1294 return method as MethodElementImpl; |
| 1230 } | 1295 } |
| 1231 } | 1296 } |
| 1232 for (TypeVariableElement typeVariable in _typeVariables) { | 1297 for (TypeVariableElement typeVariable in _typeVariables) { |
| 1233 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier24
) { | 1298 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier25
) { |
| 1234 return typeVariable as TypeVariableElementImpl; | 1299 return typeVariable as TypeVariableElementImpl; |
| 1235 } | 1300 } |
| 1236 } | 1301 } |
| 1237 return null; | 1302 return null; |
| 1238 } | 1303 } |
| 1239 List<ConstructorElement> get constructors => _constructors; | 1304 List<ConstructorElement> get constructors => _constructors; |
| 1240 List<FieldElement> get fields => _fields; | 1305 List<FieldElement> get fields => _fields; |
| 1241 List<InterfaceType> get interfaces => _interfaces; | 1306 List<InterfaceType> get interfaces => _interfaces; |
| 1242 ElementKind get kind => ElementKind.CLASS; | 1307 ElementKind get kind => ElementKind.CLASS; |
| 1243 List<MethodElement> get methods => _methods; | 1308 List<MethodElement> get methods => _methods; |
| 1244 List<InterfaceType> get mixins => _mixins; | 1309 List<InterfaceType> get mixins => _mixins; |
| 1245 ConstructorElement getNamedConstructor(String name22) { | 1310 ConstructorElement getNamedConstructor(String name23) { |
| 1246 for (ConstructorElement element in constructors) { | 1311 for (ConstructorElement element in constructors) { |
| 1247 String elementName = element.name; | 1312 String elementName = element.name; |
| 1248 if (elementName != null && elementName == name22) { | 1313 if (elementName != null && elementName == name23) { |
| 1249 return element; | 1314 return element; |
| 1250 } | 1315 } |
| 1251 } | 1316 } |
| 1252 return null; | 1317 return null; |
| 1253 } | 1318 } |
| 1254 InterfaceType get supertype => _supertype; | 1319 InterfaceType get supertype => _supertype; |
| 1255 InterfaceType get type => _type; | 1320 InterfaceType get type => _type; |
| 1256 List<TypeVariableElement> get typeVariables => _typeVariables; | 1321 List<TypeVariableElement> get typeVariables => _typeVariables; |
| 1257 ConstructorElement get unnamedConstructor { | 1322 ConstructorElement get unnamedConstructor { |
| 1258 for (ConstructorElement element in constructors) { | 1323 for (ConstructorElement element in constructors) { |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1524 for (PropertyAccessorElement accessor in _accessors) { | 1589 for (PropertyAccessorElement accessor in _accessors) { |
| 1525 if (accessor.isSetter() && accessor.name == setterName) { | 1590 if (accessor.isSetter() && accessor.name == setterName) { |
| 1526 return accessor; | 1591 return accessor; |
| 1527 } | 1592 } |
| 1528 } | 1593 } |
| 1529 return null; | 1594 return null; |
| 1530 } | 1595 } |
| 1531 } | 1596 } |
| 1532 /** | 1597 /** |
| 1533 * Instances of the class {@code CompilationUnitElementImpl} implement a{@link C
ompilationUnitElement}. | 1598 * Instances of the class {@code CompilationUnitElementImpl} implement a{@link C
ompilationUnitElement}. |
| 1599 * @coverage dart.engine.element |
| 1534 */ | 1600 */ |
| 1535 class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
lement { | 1601 class CompilationUnitElementImpl extends ElementImpl implements CompilationUnitE
lement { |
| 1536 /** | 1602 /** |
| 1537 * An array containing all of the top-level accessors (getters and setters) co
ntained in this | 1603 * An array containing all of the top-level accessors (getters and setters) co
ntained in this |
| 1538 * compilation unit. | 1604 * compilation unit. |
| 1539 */ | 1605 */ |
| 1540 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; | 1606 List<PropertyAccessorElement> _accessors = PropertyAccessorElementImpl.EMPTY_A
RRAY; |
| 1541 /** | 1607 /** |
| 1542 * An array containing all of the top-level functions contained in this compil
ation unit. | 1608 * An array containing all of the top-level functions contained in this compil
ation unit. |
| 1543 */ | 1609 */ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1564 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem
ent>(0); | 1630 static List<CompilationUnitElement> EMPTY_ARRAY = new List<CompilationUnitElem
ent>(0); |
| 1565 /** | 1631 /** |
| 1566 * Initialize a newly created compilation unit element to have the given name. | 1632 * Initialize a newly created compilation unit element to have the given name. |
| 1567 * @param name the name of this element | 1633 * @param name the name of this element |
| 1568 */ | 1634 */ |
| 1569 CompilationUnitElementImpl(String name) : super.con2(name, -1) { | 1635 CompilationUnitElementImpl(String name) : super.con2(name, -1) { |
| 1570 } | 1636 } |
| 1571 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); | 1637 accept(ElementVisitor visitor) => visitor.visitCompilationUnitElement(this); |
| 1572 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _source == ((object as CompilationUnitElementImpl)).source; | 1638 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _source == ((object as CompilationUnitElementImpl)).source; |
| 1573 List<PropertyAccessorElement> get accessors => _accessors; | 1639 List<PropertyAccessorElement> get accessors => _accessors; |
| 1574 ElementImpl getChild(String identifier25) { | 1640 ElementImpl getChild(String identifier26) { |
| 1575 for (PropertyAccessorElement accessor in _accessors) { | 1641 for (PropertyAccessorElement accessor in _accessors) { |
| 1576 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier25
) { | 1642 if (((accessor as PropertyAccessorElementImpl)).identifier == identifier26
) { |
| 1577 return accessor as PropertyAccessorElementImpl; | 1643 return accessor as PropertyAccessorElementImpl; |
| 1578 } | 1644 } |
| 1579 } | 1645 } |
| 1580 for (VariableElement variable in _variables) { | 1646 for (VariableElement variable in _variables) { |
| 1581 if (((variable as VariableElementImpl)).identifier == identifier25) { | 1647 if (((variable as VariableElementImpl)).identifier == identifier26) { |
| 1582 return variable as VariableElementImpl; | 1648 return variable as VariableElementImpl; |
| 1583 } | 1649 } |
| 1584 } | 1650 } |
| 1585 for (ExecutableElement function in _functions) { | 1651 for (ExecutableElement function in _functions) { |
| 1586 if (((function as ExecutableElementImpl)).identifier == identifier25) { | 1652 if (((function as ExecutableElementImpl)).identifier == identifier26) { |
| 1587 return function as ExecutableElementImpl; | 1653 return function as ExecutableElementImpl; |
| 1588 } | 1654 } |
| 1589 } | 1655 } |
| 1590 for (TypeAliasElement typeAlias in _typeAliases) { | 1656 for (TypeAliasElement typeAlias in _typeAliases) { |
| 1591 if (((typeAlias as TypeAliasElementImpl)).identifier == identifier25) { | 1657 if (((typeAlias as TypeAliasElementImpl)).identifier == identifier26) { |
| 1592 return typeAlias as TypeAliasElementImpl; | 1658 return typeAlias as TypeAliasElementImpl; |
| 1593 } | 1659 } |
| 1594 } | 1660 } |
| 1595 for (ClassElement type in _types) { | 1661 for (ClassElement type in _types) { |
| 1596 if (((type as ClassElementImpl)).identifier == identifier25) { | 1662 if (((type as ClassElementImpl)).identifier == identifier26) { |
| 1597 return type as ClassElementImpl; | 1663 return type as ClassElementImpl; |
| 1598 } | 1664 } |
| 1599 } | 1665 } |
| 1600 return null; | 1666 return null; |
| 1601 } | 1667 } |
| 1602 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; | 1668 LibraryElement get enclosingElement => super.enclosingElement as LibraryElemen
t; |
| 1603 List<FunctionElement> get functions => _functions; | 1669 List<FunctionElement> get functions => _functions; |
| 1604 String get identifier => source.fullName; | 1670 String get identifier => source.fullName; |
| 1605 ElementKind get kind => ElementKind.COMPILATION_UNIT; | 1671 ElementKind get kind => ElementKind.COMPILATION_UNIT; |
| 1606 Source get source => _source; | 1672 Source get source => _source; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1677 void appendTo(JavaStringBuilder builder) { | 1743 void appendTo(JavaStringBuilder builder) { |
| 1678 if (_source == null) { | 1744 if (_source == null) { |
| 1679 builder.append("{compilation unit}"); | 1745 builder.append("{compilation unit}"); |
| 1680 } else { | 1746 } else { |
| 1681 builder.append(_source.fullName); | 1747 builder.append(_source.fullName); |
| 1682 } | 1748 } |
| 1683 } | 1749 } |
| 1684 } | 1750 } |
| 1685 /** | 1751 /** |
| 1686 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons
tructorElement}. | 1752 * Instances of the class {@code ConstructorElementImpl} implement a {@code Cons
tructorElement}. |
| 1753 * @coverage dart.engine.element |
| 1687 */ | 1754 */ |
| 1688 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { | 1755 class ConstructorElementImpl extends ExecutableElementImpl implements Constructo
rElement { |
| 1689 /** | 1756 /** |
| 1690 * An empty array of constructor elements. | 1757 * An empty array of constructor elements. |
| 1691 */ | 1758 */ |
| 1692 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); | 1759 static List<ConstructorElement> EMPTY_ARRAY = new List<ConstructorElement>(0); |
| 1693 /** | 1760 /** |
| 1694 * Initialize a newly created constructor element to have the given name. | 1761 * Initialize a newly created constructor element to have the given name. |
| 1695 * @param name the name of this element | 1762 * @param name the name of this element |
| 1696 */ | 1763 */ |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1715 if (name12 != null && !name12.isEmpty) { | 1782 if (name12 != null && !name12.isEmpty) { |
| 1716 builder.append("."); | 1783 builder.append("."); |
| 1717 builder.append(name12); | 1784 builder.append(name12); |
| 1718 } | 1785 } |
| 1719 super.appendTo(builder); | 1786 super.appendTo(builder); |
| 1720 } | 1787 } |
| 1721 } | 1788 } |
| 1722 /** | 1789 /** |
| 1723 * Instances of the class {@code DynamicElementImpl} represent the synthetic ele
ment representing | 1790 * Instances of the class {@code DynamicElementImpl} represent the synthetic ele
ment representing |
| 1724 * the declaration of the type {@code dynamic}. | 1791 * the declaration of the type {@code dynamic}. |
| 1792 * @coverage dart.engine.element |
| 1725 */ | 1793 */ |
| 1726 class DynamicElementImpl extends ElementImpl { | 1794 class DynamicElementImpl extends ElementImpl { |
| 1727 /** | 1795 /** |
| 1728 * Return the unique instance of this class. | 1796 * Return the unique instance of this class. |
| 1729 * @return the unique instance of this class | 1797 * @return the unique instance of this class |
| 1730 */ | 1798 */ |
| 1731 static DynamicElementImpl get instance => DynamicTypeImpl.instance.element as
DynamicElementImpl; | 1799 static DynamicElementImpl get instance => DynamicTypeImpl.instance.element as
DynamicElementImpl; |
| 1732 /** | 1800 /** |
| 1733 * The type defined by this element. | 1801 * The type defined by this element. |
| 1734 */ | 1802 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1752 * Set the type defined by this element to the given type. | 1820 * Set the type defined by this element to the given type. |
| 1753 * @param type the type defined by this element | 1821 * @param type the type defined by this element |
| 1754 */ | 1822 */ |
| 1755 void set type(DynamicTypeImpl type6) { | 1823 void set type(DynamicTypeImpl type6) { |
| 1756 this._type = type6; | 1824 this._type = type6; |
| 1757 } | 1825 } |
| 1758 } | 1826 } |
| 1759 /** | 1827 /** |
| 1760 * The abstract class {@code ElementImpl} implements the behavior common to obje
cts that implement | 1828 * The abstract class {@code ElementImpl} implements the behavior common to obje
cts that implement |
| 1761 * an {@link Element}. | 1829 * an {@link Element}. |
| 1830 * @coverage dart.engine.element |
| 1762 */ | 1831 */ |
| 1763 abstract class ElementImpl implements Element { | 1832 abstract class ElementImpl implements Element { |
| 1764 /** | 1833 /** |
| 1765 * The enclosing element of this element, or {@code null} if this element is a
t the root of the | 1834 * The enclosing element of this element, or {@code null} if this element is a
t the root of the |
| 1766 * element structure. | 1835 * element structure. |
| 1767 */ | 1836 */ |
| 1768 ElementImpl _enclosingElement; | 1837 ElementImpl _enclosingElement; |
| 1769 /** | 1838 /** |
| 1770 * The name of this element. | 1839 * The name of this element. |
| 1771 */ | 1840 */ |
| 1772 String _name; | 1841 String _name; |
| 1773 /** | 1842 /** |
| 1774 * The offset of the name of this element in the file that contains the declar
ation of this | 1843 * The offset of the name of this element in the file that contains the declar
ation of this |
| 1775 * element. | 1844 * element. |
| 1776 */ | 1845 */ |
| 1777 int _nameOffset = 0; | 1846 int _nameOffset = 0; |
| 1778 /** | 1847 /** |
| 1779 * A bit-encoded form of the modifiers associated with this element. | 1848 * A bit-encoded form of the modifiers associated with this element. |
| 1780 */ | 1849 */ |
| 1781 Set<Modifier> _modifiers; | 1850 Set<Modifier> _modifiers; |
| 1782 /** | 1851 /** |
| 1783 * An array containing all of the metadata associated with this element. | 1852 * An array containing all of the metadata associated with this element. |
| 1784 */ | 1853 */ |
| 1785 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; | 1854 List<Annotation> _metadata = AnnotationImpl.EMPTY_ARRAY; |
| 1786 /** | 1855 /** |
| 1787 * Initialize a newly created element to have the given name. | 1856 * Initialize a newly created element to have the given name. |
| 1788 * @param name the name of this element | 1857 * @param name the name of this element |
| 1789 */ | 1858 */ |
| 1790 ElementImpl.con1(Identifier name23) { | 1859 ElementImpl.con1(Identifier name24) { |
| 1791 _jtd_constructor_158_impl(name23); | 1860 _jtd_constructor_161_impl(name24); |
| 1792 } | 1861 } |
| 1793 _jtd_constructor_158_impl(Identifier name23) { | 1862 _jtd_constructor_161_impl(Identifier name24) { |
| 1794 _jtd_constructor_159_impl(name23 == null ? "" : name23.name, name23 == null
? -1 : name23.offset); | 1863 _jtd_constructor_162_impl(name24 == null ? "" : name24.name, name24 == null
? -1 : name24.offset); |
| 1795 } | 1864 } |
| 1796 /** | 1865 /** |
| 1797 * Initialize a newly created element to have the given name. | 1866 * Initialize a newly created element to have the given name. |
| 1798 * @param name the name of this element | 1867 * @param name the name of this element |
| 1799 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 1868 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 1800 * declaration of this element | 1869 * declaration of this element |
| 1801 */ | 1870 */ |
| 1802 ElementImpl.con2(String name8, int nameOffset2) { | 1871 ElementImpl.con2(String name8, int nameOffset2) { |
| 1803 _jtd_constructor_159_impl(name8, nameOffset2); | 1872 _jtd_constructor_162_impl(name8, nameOffset2); |
| 1804 } | 1873 } |
| 1805 _jtd_constructor_159_impl(String name8, int nameOffset2) { | 1874 _jtd_constructor_162_impl(String name8, int nameOffset2) { |
| 1806 this._name = name8; | 1875 this._name = name8; |
| 1807 this._nameOffset = nameOffset2; | 1876 this._nameOffset = nameOffset2; |
| 1808 this._modifiers = new Set(); | 1877 this._modifiers = new Set(); |
| 1809 } | 1878 } |
| 1810 bool operator ==(Object object) => object != null && identical(object.runtimeT
ype, runtimeType) && ((object as Element)).location == location; | 1879 bool operator ==(Object object) => object != null && identical(object.runtimeT
ype, runtimeType) && ((object as Element)).location == location; |
| 1811 Element getAncestor(Type elementClass) { | 1880 Element getAncestor(Type elementClass) { |
| 1812 Element ancestor = _enclosingElement; | 1881 Element ancestor = _enclosingElement; |
| 1813 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { | 1882 while (ancestor != null && !isInstanceOf(ancestor, elementClass)) { |
| 1814 ancestor = ancestor.enclosingElement; | 1883 ancestor = ancestor.enclosingElement; |
| 1815 } | 1884 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1833 List<Annotation> get metadata => _metadata; | 1902 List<Annotation> get metadata => _metadata; |
| 1834 String get name => _name; | 1903 String get name => _name; |
| 1835 int get nameOffset => _nameOffset; | 1904 int get nameOffset => _nameOffset; |
| 1836 Source get source { | 1905 Source get source { |
| 1837 if (_enclosingElement == null) { | 1906 if (_enclosingElement == null) { |
| 1838 return null; | 1907 return null; |
| 1839 } | 1908 } |
| 1840 return _enclosingElement.source; | 1909 return _enclosingElement.source; |
| 1841 } | 1910 } |
| 1842 int get hashCode => location.hashCode; | 1911 int get hashCode => location.hashCode; |
| 1843 bool isAccessibleIn(LibraryElement library19) { | 1912 bool isAccessibleIn(LibraryElement library20) { |
| 1844 if (Identifier.isPrivateName(_name)) { | 1913 if (Identifier.isPrivateName(_name)) { |
| 1845 return library19 == library; | 1914 return library20 == library; |
| 1846 } | 1915 } |
| 1847 return true; | 1916 return true; |
| 1848 } | 1917 } |
| 1849 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC); | 1918 bool isSynthetic() => hasModifier(Modifier.SYNTHETIC); |
| 1850 /** | 1919 /** |
| 1851 * Set the metadata associate with this element to the given array of annotati
ons. | 1920 * Set the metadata associate with this element to the given array of annotati
ons. |
| 1852 * @param metadata the metadata to be associated with this element | 1921 * @param metadata the metadata to be associated with this element |
| 1853 */ | 1922 */ |
| 1854 void set metadata(List<Annotation> metadata2) { | 1923 void set metadata(List<Annotation> metadata2) { |
| 1855 this._metadata = metadata2; | 1924 this._metadata = metadata2; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1931 void setModifier(Modifier modifier, bool value) { | 2000 void setModifier(Modifier modifier, bool value) { |
| 1932 if (value) { | 2001 if (value) { |
| 1933 _modifiers.add(modifier); | 2002 _modifiers.add(modifier); |
| 1934 } else { | 2003 } else { |
| 1935 _modifiers.remove(modifier); | 2004 _modifiers.remove(modifier); |
| 1936 } | 2005 } |
| 1937 } | 2006 } |
| 1938 } | 2007 } |
| 1939 /** | 2008 /** |
| 1940 * Instances of the class {@code ElementLocationImpl} implement an {@link Elemen
tLocation}. | 2009 * Instances of the class {@code ElementLocationImpl} implement an {@link Elemen
tLocation}. |
| 2010 * @coverage dart.engine.element |
| 1941 */ | 2011 */ |
| 1942 class ElementLocationImpl implements ElementLocation { | 2012 class ElementLocationImpl implements ElementLocation { |
| 1943 /** | 2013 /** |
| 1944 * The path to the element whose location is represented by this object. | 2014 * The path to the element whose location is represented by this object. |
| 1945 */ | 2015 */ |
| 1946 List<String> _components; | 2016 List<String> _components; |
| 1947 /** | 2017 /** |
| 1948 * The character used to separate components in the encoded form. | 2018 * The character used to separate components in the encoded form. |
| 1949 */ | 2019 */ |
| 1950 static int _SEPARATOR_CHAR = 0x3B; | 2020 static int _SEPARATOR_CHAR = 0x3B; |
| 1951 /** | 2021 /** |
| 1952 * Initialize a newly created location to represent the given element. | 2022 * Initialize a newly created location to represent the given element. |
| 1953 * @param element the element whose location is being represented | 2023 * @param element the element whose location is being represented |
| 1954 */ | 2024 */ |
| 1955 ElementLocationImpl.con1(Element element) { | 2025 ElementLocationImpl.con1(Element element) { |
| 1956 _jtd_constructor_160_impl(element); | 2026 _jtd_constructor_163_impl(element); |
| 1957 } | 2027 } |
| 1958 _jtd_constructor_160_impl(Element element) { | 2028 _jtd_constructor_163_impl(Element element) { |
| 1959 List<String> components = new List<String>(); | 2029 List<String> components = new List<String>(); |
| 1960 Element ancestor = element; | 2030 Element ancestor = element; |
| 1961 while (ancestor != null) { | 2031 while (ancestor != null) { |
| 1962 components.insertRange(0, 1, ((ancestor as ElementImpl)).identifier); | 2032 components.insertRange(0, 1, ((ancestor as ElementImpl)).identifier); |
| 1963 ancestor = ancestor.enclosingElement; | 2033 ancestor = ancestor.enclosingElement; |
| 1964 } | 2034 } |
| 1965 this._components = new List.from(components); | 2035 this._components = new List.from(components); |
| 1966 } | 2036 } |
| 1967 /** | 2037 /** |
| 1968 * Initialize a newly created location from the given encoded form. | 2038 * Initialize a newly created location from the given encoded form. |
| 1969 * @param encoding the encoded form of a location | 2039 * @param encoding the encoded form of a location |
| 1970 */ | 2040 */ |
| 1971 ElementLocationImpl.con2(String encoding) { | 2041 ElementLocationImpl.con2(String encoding) { |
| 1972 _jtd_constructor_161_impl(encoding); | 2042 _jtd_constructor_164_impl(encoding); |
| 1973 } | 2043 } |
| 1974 _jtd_constructor_161_impl(String encoding) { | 2044 _jtd_constructor_164_impl(String encoding) { |
| 1975 this._components = decode(encoding); | 2045 this._components = decode(encoding); |
| 1976 } | 2046 } |
| 1977 bool operator ==(Object object) { | 2047 bool operator ==(Object object) { |
| 1978 if (object is! ElementLocationImpl) { | 2048 if (object is! ElementLocationImpl) { |
| 1979 return false; | 2049 return false; |
| 1980 } | 2050 } |
| 1981 ElementLocationImpl location = object as ElementLocationImpl; | 2051 ElementLocationImpl location = object as ElementLocationImpl; |
| 1982 return JavaArrays.equals(_components, location._components); | 2052 return JavaArrays.equals(_components, location._components); |
| 1983 } | 2053 } |
| 1984 /** | 2054 /** |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2040 for (int i = 0; i < length4; i++) { | 2110 for (int i = 0; i < length4; i++) { |
| 2041 int currentChar = component.codeUnitAt(i); | 2111 int currentChar = component.codeUnitAt(i); |
| 2042 if (currentChar == _SEPARATOR_CHAR) { | 2112 if (currentChar == _SEPARATOR_CHAR) { |
| 2043 builder.appendChar(_SEPARATOR_CHAR); | 2113 builder.appendChar(_SEPARATOR_CHAR); |
| 2044 } | 2114 } |
| 2045 builder.appendChar(currentChar); | 2115 builder.appendChar(currentChar); |
| 2046 } | 2116 } |
| 2047 } | 2117 } |
| 2048 } | 2118 } |
| 2049 /** | 2119 /** |
| 2120 * Instances of the class {@code EmbeddedHtmlScriptElementImpl} implement an{@li
nk EmbeddedHtmlScriptElement}. |
| 2121 * @coverage dart.engine.element |
| 2122 */ |
| 2123 class EmbeddedHtmlScriptElementImpl extends HtmlScriptElementImpl implements Emb
eddedHtmlScriptElement { |
| 2124 /** |
| 2125 * The library defined by the script tag's content. |
| 2126 */ |
| 2127 LibraryElement _scriptLibrary; |
| 2128 /** |
| 2129 * Initialize a newly created script element to have the specified tag name an
d offset. |
| 2130 * @param node the XML node from which this element is derived (not {@code nul
l}) |
| 2131 */ |
| 2132 EmbeddedHtmlScriptElementImpl(XmlTagNode node) : super(node) { |
| 2133 } |
| 2134 accept(ElementVisitor visitor) => visitor.visitEmbeddedHtmlScriptElement(this)
; |
| 2135 ElementKind get kind => ElementKind.EMBEDDED_HTML_SCRIPT; |
| 2136 LibraryElement get scriptLibrary => _scriptLibrary; |
| 2137 /** |
| 2138 * Set the script library defined by the script tag's content. |
| 2139 * @param scriptLibrary the library or {@code null} if none |
| 2140 */ |
| 2141 void set scriptLibrary(LibraryElementImpl scriptLibrary2) { |
| 2142 scriptLibrary2.enclosingElement = this; |
| 2143 this._scriptLibrary = scriptLibrary2; |
| 2144 } |
| 2145 void visitChildren(ElementVisitor<Object> visitor) { |
| 2146 safelyVisitChild(_scriptLibrary, visitor); |
| 2147 } |
| 2148 } |
| 2149 /** |
| 2050 * The abstract class {@code ExecutableElementImpl} implements the behavior comm
on to{@code ExecutableElement}s. | 2150 * The abstract class {@code ExecutableElementImpl} implements the behavior comm
on to{@code ExecutableElement}s. |
| 2151 * @coverage dart.engine.element |
| 2051 */ | 2152 */ |
| 2052 abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
ement { | 2153 abstract class ExecutableElementImpl extends ElementImpl implements ExecutableEl
ement { |
| 2053 /** | 2154 /** |
| 2054 * An array containing all of the functions defined within this executable ele
ment. | 2155 * An array containing all of the functions defined within this executable ele
ment. |
| 2055 */ | 2156 */ |
| 2056 List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY; | 2157 List<FunctionElement> _functions = FunctionElementImpl.EMPTY_ARRAY; |
| 2057 /** | 2158 /** |
| 2058 * An array containing all of the labels defined within this executable elemen
t. | 2159 * An array containing all of the labels defined within this executable elemen
t. |
| 2059 */ | 2160 */ |
| 2060 List<LabelElement> _labels = LabelElementImpl.EMPTY_ARRAY; | 2161 List<LabelElement> _labels = LabelElementImpl.EMPTY_ARRAY; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2072 FunctionType _type; | 2173 FunctionType _type; |
| 2073 /** | 2174 /** |
| 2074 * An empty array of executable elements. | 2175 * An empty array of executable elements. |
| 2075 */ | 2176 */ |
| 2076 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); | 2177 static List<ExecutableElement> EMPTY_ARRAY = new List<ExecutableElement>(0); |
| 2077 /** | 2178 /** |
| 2078 * Initialize a newly created executable element to have the given name. | 2179 * Initialize a newly created executable element to have the given name. |
| 2079 * @param name the name of this element | 2180 * @param name the name of this element |
| 2080 */ | 2181 */ |
| 2081 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { | 2182 ExecutableElementImpl.con1(Identifier name) : super.con1(name) { |
| 2082 _jtd_constructor_162_impl(name); | 2183 _jtd_constructor_166_impl(name); |
| 2083 } | 2184 } |
| 2084 _jtd_constructor_162_impl(Identifier name) { | 2185 _jtd_constructor_166_impl(Identifier name) { |
| 2085 } | 2186 } |
| 2086 /** | 2187 /** |
| 2087 * Initialize a newly created executable element to have the given name. | 2188 * Initialize a newly created executable element to have the given name. |
| 2088 * @param name the name of this element | 2189 * @param name the name of this element |
| 2089 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 2190 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 2090 * declaration of this element | 2191 * declaration of this element |
| 2091 */ | 2192 */ |
| 2092 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset) { | 2193 ExecutableElementImpl.con2(String name, int nameOffset) : super.con2(name, nam
eOffset) { |
| 2093 _jtd_constructor_163_impl(name, nameOffset); | 2194 _jtd_constructor_167_impl(name, nameOffset); |
| 2094 } | 2195 } |
| 2095 _jtd_constructor_163_impl(String name, int nameOffset) { | 2196 _jtd_constructor_167_impl(String name, int nameOffset) { |
| 2096 } | 2197 } |
| 2097 ElementImpl getChild(String identifier26) { | 2198 ElementImpl getChild(String identifier27) { |
| 2098 for (ExecutableElement function in _functions) { | 2199 for (ExecutableElement function in _functions) { |
| 2099 if (((function as ExecutableElementImpl)).identifier == identifier26) { | 2200 if (((function as ExecutableElementImpl)).identifier == identifier27) { |
| 2100 return function as ExecutableElementImpl; | 2201 return function as ExecutableElementImpl; |
| 2101 } | 2202 } |
| 2102 } | 2203 } |
| 2103 for (LabelElement label in _labels) { | 2204 for (LabelElement label in _labels) { |
| 2104 if (((label as LabelElementImpl)).identifier == identifier26) { | 2205 if (((label as LabelElementImpl)).identifier == identifier27) { |
| 2105 return label as LabelElementImpl; | 2206 return label as LabelElementImpl; |
| 2106 } | 2207 } |
| 2107 } | 2208 } |
| 2108 for (VariableElement variable in _localVariables) { | 2209 for (VariableElement variable in _localVariables) { |
| 2109 if (((variable as VariableElementImpl)).identifier == identifier26) { | 2210 if (((variable as VariableElementImpl)).identifier == identifier27) { |
| 2110 return variable as VariableElementImpl; | 2211 return variable as VariableElementImpl; |
| 2111 } | 2212 } |
| 2112 } | 2213 } |
| 2113 for (ParameterElement parameter in _parameters) { | 2214 for (ParameterElement parameter in _parameters) { |
| 2114 if (((parameter as ParameterElementImpl)).identifier == identifier26) { | 2215 if (((parameter as ParameterElementImpl)).identifier == identifier27) { |
| 2115 return parameter as ParameterElementImpl; | 2216 return parameter as ParameterElementImpl; |
| 2116 } | 2217 } |
| 2117 } | 2218 } |
| 2118 return null; | 2219 return null; |
| 2119 } | 2220 } |
| 2120 List<FunctionElement> get functions => _functions; | 2221 List<FunctionElement> get functions => _functions; |
| 2121 List<LabelElement> get labels => _labels; | 2222 List<LabelElement> get labels => _labels; |
| 2122 List<LocalVariableElement> get localVariables => _localVariables; | 2223 List<LocalVariableElement> get localVariables => _localVariables; |
| 2123 List<ParameterElement> get parameters => _parameters; | 2224 List<ParameterElement> get parameters => _parameters; |
| 2124 FunctionType get type => _type; | 2225 FunctionType get type => _type; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 } | 2288 } |
| 2188 builder.append(")"); | 2289 builder.append(")"); |
| 2189 if (_type != null) { | 2290 if (_type != null) { |
| 2190 builder.append(" -> "); | 2291 builder.append(" -> "); |
| 2191 builder.append(_type.returnType); | 2292 builder.append(_type.returnType); |
| 2192 } | 2293 } |
| 2193 } | 2294 } |
| 2194 } | 2295 } |
| 2195 /** | 2296 /** |
| 2196 * Instances of the class {@code ExportElementImpl} implement an {@link ExportEl
ement}. | 2297 * Instances of the class {@code ExportElementImpl} implement an {@link ExportEl
ement}. |
| 2298 * @coverage dart.engine.element |
| 2197 */ | 2299 */ |
| 2198 class ExportElementImpl extends ElementImpl implements ExportElement { | 2300 class ExportElementImpl extends ElementImpl implements ExportElement { |
| 2199 /** | 2301 /** |
| 2200 * The library that is exported from this library by this export directive. | 2302 * The library that is exported from this library by this export directive. |
| 2201 */ | 2303 */ |
| 2202 LibraryElement _exportedLibrary; | 2304 LibraryElement _exportedLibrary; |
| 2203 /** | 2305 /** |
| 2204 * The combinators that were specified as part of the export directive in the
order in which they | 2306 * The combinators that were specified as part of the export directive in the
order in which they |
| 2205 * were specified. | 2307 * were specified. |
| 2206 */ | 2308 */ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2229 */ | 2331 */ |
| 2230 void set exportedLibrary(LibraryElement exportedLibrary2) { | 2332 void set exportedLibrary(LibraryElement exportedLibrary2) { |
| 2231 this._exportedLibrary = exportedLibrary2; | 2333 this._exportedLibrary = exportedLibrary2; |
| 2232 } | 2334 } |
| 2233 void appendTo(JavaStringBuilder builder) { | 2335 void appendTo(JavaStringBuilder builder) { |
| 2234 builder.append("export "); | 2336 builder.append("export "); |
| 2235 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder); | 2337 ((_exportedLibrary as LibraryElementImpl)).appendTo(builder); |
| 2236 } | 2338 } |
| 2237 } | 2339 } |
| 2238 /** | 2340 /** |
| 2341 * Instances of the class {@code ExternalHtmlScriptElementImpl} implement an{@li
nk ExternalHtmlScriptElement}. |
| 2342 * @coverage dart.engine.element |
| 2343 */ |
| 2344 class ExternalHtmlScriptElementImpl extends HtmlScriptElementImpl implements Ext
ernalHtmlScriptElement { |
| 2345 /** |
| 2346 * The source specified in the {@code source} attribute or {@code null} if uns
pecified. |
| 2347 */ |
| 2348 Source _scriptSource; |
| 2349 /** |
| 2350 * Initialize a newly created script element to have the specified tag name an
d offset. |
| 2351 * @param node the XML node from which this element is derived (not {@code nul
l}) |
| 2352 */ |
| 2353 ExternalHtmlScriptElementImpl(XmlTagNode node) : super(node) { |
| 2354 } |
| 2355 accept(ElementVisitor visitor) => visitor.visitExternalHtmlScriptElement(this)
; |
| 2356 ElementKind get kind => ElementKind.EXTERNAL_HTML_SCRIPT; |
| 2357 Source get scriptSource => _scriptSource; |
| 2358 /** |
| 2359 * Set the source specified in the {@code source} attribute. |
| 2360 * @param scriptSource the script source or {@code null} if unspecified |
| 2361 */ |
| 2362 void set scriptSource(Source scriptSource2) { |
| 2363 this._scriptSource = scriptSource2; |
| 2364 } |
| 2365 } |
| 2366 /** |
| 2239 * Instances of the class {@code FieldElementImpl} implement a {@code FieldEleme
nt}. | 2367 * Instances of the class {@code FieldElementImpl} implement a {@code FieldEleme
nt}. |
| 2368 * @coverage dart.engine.element |
| 2240 */ | 2369 */ |
| 2241 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { | 2370 class FieldElementImpl extends PropertyInducingElementImpl implements FieldEleme
nt { |
| 2242 /** | 2371 /** |
| 2243 * An empty array of field elements. | 2372 * An empty array of field elements. |
| 2244 */ | 2373 */ |
| 2245 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); | 2374 static List<FieldElement> EMPTY_ARRAY = new List<FieldElement>(0); |
| 2246 /** | 2375 /** |
| 2247 * Initialize a newly created field element to have the given name. | 2376 * Initialize a newly created field element to have the given name. |
| 2248 * @param name the name of this element | 2377 * @param name the name of this element |
| 2249 */ | 2378 */ |
| 2250 FieldElementImpl.con1(Identifier name) : super.con1(name) { | 2379 FieldElementImpl.con1(Identifier name) : super.con1(name) { |
| 2251 _jtd_constructor_165_impl(name); | 2380 _jtd_constructor_170_impl(name); |
| 2252 } | 2381 } |
| 2253 _jtd_constructor_165_impl(Identifier name) { | 2382 _jtd_constructor_170_impl(Identifier name) { |
| 2254 } | 2383 } |
| 2255 /** | 2384 /** |
| 2256 * Initialize a newly created synthetic field element to have the given name. | 2385 * Initialize a newly created synthetic field element to have the given name. |
| 2257 * @param name the name of this element | 2386 * @param name the name of this element |
| 2258 */ | 2387 */ |
| 2259 FieldElementImpl.con2(String name) : super.con2(name) { | 2388 FieldElementImpl.con2(String name) : super.con2(name) { |
| 2260 _jtd_constructor_166_impl(name); | 2389 _jtd_constructor_171_impl(name); |
| 2261 } | 2390 } |
| 2262 _jtd_constructor_166_impl(String name) { | 2391 _jtd_constructor_171_impl(String name) { |
| 2263 } | 2392 } |
| 2264 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); | 2393 accept(ElementVisitor visitor) => visitor.visitFieldElement(this); |
| 2265 ClassElement get enclosingElement => super.enclosingElement as ClassElement; | 2394 ClassElement get enclosingElement => super.enclosingElement as ClassElement; |
| 2266 ElementKind get kind => ElementKind.FIELD; | 2395 ElementKind get kind => ElementKind.FIELD; |
| 2267 bool isStatic() => hasModifier(Modifier.STATIC); | 2396 bool isStatic() => hasModifier(Modifier.STATIC); |
| 2268 /** | 2397 /** |
| 2269 * Set whether this field is static to correspond to the given value. | 2398 * Set whether this field is static to correspond to the given value. |
| 2270 * @param isStatic {@code true} if the field is static | 2399 * @param isStatic {@code true} if the field is static |
| 2271 */ | 2400 */ |
| 2272 void set static(bool isStatic) { | 2401 void set static(bool isStatic) { |
| 2273 setModifier(Modifier.STATIC, isStatic); | 2402 setModifier(Modifier.STATIC, isStatic); |
| 2274 } | 2403 } |
| 2275 } | 2404 } |
| 2276 /** | 2405 /** |
| 2277 * Instances of the class {@code FunctionElementImpl} implement a {@code Functio
nElement}. | 2406 * Instances of the class {@code FunctionElementImpl} implement a {@code Functio
nElement}. |
| 2407 * @coverage dart.engine.element |
| 2278 */ | 2408 */ |
| 2279 class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
nt { | 2409 class FunctionElementImpl extends ExecutableElementImpl implements FunctionEleme
nt { |
| 2280 /** | 2410 /** |
| 2281 * The offset to the beginning of the visible range for this element. | 2411 * The offset to the beginning of the visible range for this element. |
| 2282 */ | 2412 */ |
| 2283 int _visibleRangeOffset = 0; | 2413 int _visibleRangeOffset = 0; |
| 2284 /** | 2414 /** |
| 2285 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a | 2415 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a |
| 2286 * visible range. | 2416 * visible range. |
| 2287 */ | 2417 */ |
| 2288 int _visibleRangeLength = -1; | 2418 int _visibleRangeLength = -1; |
| 2289 /** | 2419 /** |
| 2290 * An empty array of function elements. | 2420 * An empty array of function elements. |
| 2291 */ | 2421 */ |
| 2292 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); | 2422 static List<FunctionElement> EMPTY_ARRAY = new List<FunctionElement>(0); |
| 2293 /** | 2423 /** |
| 2294 * Initialize a newly created synthetic function element. | 2424 * Initialize a newly created synthetic function element. |
| 2295 */ | 2425 */ |
| 2296 FunctionElementImpl() : super.con2("", -1) { | 2426 FunctionElementImpl() : super.con2("", -1) { |
| 2297 _jtd_constructor_167_impl(); | 2427 _jtd_constructor_172_impl(); |
| 2298 } | 2428 } |
| 2299 _jtd_constructor_167_impl() { | 2429 _jtd_constructor_172_impl() { |
| 2300 synthetic = true; | 2430 synthetic = true; |
| 2301 } | 2431 } |
| 2302 /** | 2432 /** |
| 2303 * Initialize a newly created function element to have the given name. | 2433 * Initialize a newly created function element to have the given name. |
| 2304 * @param name the name of this element | 2434 * @param name the name of this element |
| 2305 */ | 2435 */ |
| 2306 FunctionElementImpl.con1(Identifier name) : super.con1(name) { | 2436 FunctionElementImpl.con1(Identifier name) : super.con1(name) { |
| 2307 _jtd_constructor_168_impl(name); | 2437 _jtd_constructor_173_impl(name); |
| 2308 } | 2438 } |
| 2309 _jtd_constructor_168_impl(Identifier name) { | 2439 _jtd_constructor_173_impl(Identifier name) { |
| 2310 } | 2440 } |
| 2311 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); | 2441 accept(ElementVisitor visitor) => visitor.visitFunctionElement(this); |
| 2312 String get identifier => name; | 2442 String get identifier => name; |
| 2313 ElementKind get kind => ElementKind.FUNCTION; | 2443 ElementKind get kind => ElementKind.FUNCTION; |
| 2314 SourceRange get visibleRange { | 2444 SourceRange get visibleRange { |
| 2315 if (_visibleRangeLength < 0) { | 2445 if (_visibleRangeLength < 0) { |
| 2316 return null; | 2446 return null; |
| 2317 } | 2447 } |
| 2318 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); | 2448 return new SourceRange(_visibleRangeOffset, _visibleRangeLength); |
| 2319 } | 2449 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2332 void appendTo(JavaStringBuilder builder) { | 2462 void appendTo(JavaStringBuilder builder) { |
| 2333 String name13 = name; | 2463 String name13 = name; |
| 2334 if (name13 != null) { | 2464 if (name13 != null) { |
| 2335 builder.append(name13); | 2465 builder.append(name13); |
| 2336 } | 2466 } |
| 2337 super.appendTo(builder); | 2467 super.appendTo(builder); |
| 2338 } | 2468 } |
| 2339 } | 2469 } |
| 2340 /** | 2470 /** |
| 2341 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. | 2471 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. |
| 2472 * @coverage dart.engine.element |
| 2342 */ | 2473 */ |
| 2343 class HideCombinatorImpl implements HideCombinator { | 2474 class HideCombinatorImpl implements HideCombinator { |
| 2344 /** | 2475 /** |
| 2345 * The names that are not to be made visible in the importing library even if
they are defined in | 2476 * The names that are not to be made visible in the importing library even if
they are defined in |
| 2346 * the imported library. | 2477 * the imported library. |
| 2347 */ | 2478 */ |
| 2348 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; | 2479 List<String> _hiddenNames = StringUtilities.EMPTY_ARRAY; |
| 2349 /** | 2480 /** |
| 2350 * Initialize a newly created combinator. | 2481 * Initialize a newly created combinator. |
| 2351 */ | 2482 */ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 2368 if (i > 0) { | 2499 if (i > 0) { |
| 2369 builder.append(", "); | 2500 builder.append(", "); |
| 2370 } | 2501 } |
| 2371 builder.append(_hiddenNames[i]); | 2502 builder.append(_hiddenNames[i]); |
| 2372 } | 2503 } |
| 2373 return builder.toString(); | 2504 return builder.toString(); |
| 2374 } | 2505 } |
| 2375 } | 2506 } |
| 2376 /** | 2507 /** |
| 2377 * Instances of the class {@code HtmlElementImpl} implement an {@link HtmlElemen
t}. | 2508 * Instances of the class {@code HtmlElementImpl} implement an {@link HtmlElemen
t}. |
| 2509 * @coverage dart.engine.element |
| 2378 */ | 2510 */ |
| 2379 class HtmlElementImpl extends ElementImpl implements HtmlElement { | 2511 class HtmlElementImpl extends ElementImpl implements HtmlElement { |
| 2380 /** | 2512 /** |
| 2381 * An empty array of HTML file elements. | 2513 * An empty array of HTML file elements. |
| 2382 */ | 2514 */ |
| 2383 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>(0); | 2515 static List<HtmlElement> EMPTY_ARRAY = new List<HtmlElement>(0); |
| 2384 /** | 2516 /** |
| 2385 * The analysis context in which this library is defined. | 2517 * The analysis context in which this library is defined. |
| 2386 */ | 2518 */ |
| 2387 AnalysisContext _context; | 2519 AnalysisContext _context; |
| 2388 /** | 2520 /** |
| 2389 * The scripts contained in or referenced from script tags in the HTML file. | 2521 * The scripts contained in or referenced from script tags in the HTML file. |
| 2390 */ | 2522 */ |
| 2391 List<HtmlScriptElement> _scripts = new List<HtmlScriptElement>(0); | 2523 List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY; |
| 2392 /** | 2524 /** |
| 2393 * The source that corresponds to this HTML file. | 2525 * The source that corresponds to this HTML file. |
| 2394 */ | 2526 */ |
| 2395 Source _source; | 2527 Source _source; |
| 2396 /** | 2528 /** |
| 2397 * Initialize a newly created HTML element to have the given name. | 2529 * Initialize a newly created HTML element to have the given name. |
| 2398 * @param context the analysis context in which the HTML file is defined | 2530 * @param context the analysis context in which the HTML file is defined |
| 2399 * @param name the name of this element | 2531 * @param name the name of this element |
| 2400 */ | 2532 */ |
| 2401 HtmlElementImpl(AnalysisContext context, String name) : super.con2(name, -1) { | 2533 HtmlElementImpl(AnalysisContext context, String name) : super.con2(name, -1) { |
| 2402 this._context = context; | 2534 this._context = context; |
| 2403 } | 2535 } |
| 2404 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); | 2536 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); |
| 2405 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _source == ((object as CompilationUnitElementImpl)).source; | 2537 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _source == ((object as CompilationUnitElementImpl)).source; |
| 2406 AnalysisContext get context => _context; | 2538 AnalysisContext get context => _context; |
| 2407 ElementKind get kind => ElementKind.HTML; | 2539 ElementKind get kind => ElementKind.HTML; |
| 2408 List<HtmlScriptElement> get scripts => _scripts; | 2540 List<HtmlScriptElement> get scripts => _scripts; |
| 2409 Source get source => _source; | 2541 Source get source => _source; |
| 2410 int get hashCode => _source.hashCode; | 2542 int get hashCode => _source.hashCode; |
| 2411 /** | 2543 /** |
| 2412 * Set the scripts contained in the HTML file to the given scripts. | 2544 * Set the scripts contained in the HTML file to the given scripts. |
| 2413 * @param scripts the scripts | 2545 * @param scripts the scripts |
| 2414 */ | 2546 */ |
| 2415 void set scripts(List<HtmlScriptElement> scripts2) { | 2547 void set scripts(List<HtmlScriptElement> scripts2) { |
| 2548 for (HtmlScriptElement script in scripts2) { |
| 2549 ((script as HtmlScriptElementImpl)).enclosingElement = this; |
| 2550 } |
| 2416 this._scripts = scripts2; | 2551 this._scripts = scripts2; |
| 2417 } | 2552 } |
| 2418 /** | 2553 /** |
| 2419 * Set the source that corresponds to this HTML file to the given source. | 2554 * Set the source that corresponds to this HTML file to the given source. |
| 2420 * @param source the source that corresponds to this HTML file | 2555 * @param source the source that corresponds to this HTML file |
| 2421 */ | 2556 */ |
| 2422 void set source(Source source6) { | 2557 void set source(Source source6) { |
| 2423 this._source = source6; | 2558 this._source = source6; |
| 2424 } | 2559 } |
| 2425 void visitChildren(ElementVisitor<Object> visitor) { | 2560 void visitChildren(ElementVisitor<Object> visitor) { |
| 2426 super.visitChildren(visitor); | 2561 super.visitChildren(visitor); |
| 2427 safelyVisitChildren(_scripts, visitor); | 2562 safelyVisitChildren(_scripts, visitor); |
| 2428 } | 2563 } |
| 2429 void appendTo(JavaStringBuilder builder) { | 2564 void appendTo(JavaStringBuilder builder) { |
| 2430 if (_source == null) { | 2565 if (_source == null) { |
| 2431 builder.append("{HTML file}"); | 2566 builder.append("{HTML file}"); |
| 2432 } else { | 2567 } else { |
| 2433 builder.append(_source.fullName); | 2568 builder.append(_source.fullName); |
| 2434 } | 2569 } |
| 2435 } | 2570 } |
| 2436 } | 2571 } |
| 2437 /** | 2572 /** |
| 2573 * Instances of the class {@code HtmlScriptElementImpl} implement an {@link Html
ScriptElement}. |
| 2574 * @coverage dart.engine.element |
| 2575 */ |
| 2576 abstract class HtmlScriptElementImpl extends ElementImpl implements HtmlScriptEl
ement { |
| 2577 /** |
| 2578 * An empty array of HTML script elements. |
| 2579 */ |
| 2580 static List<HtmlScriptElement> EMPTY_ARRAY = new List<HtmlScriptElement>(0); |
| 2581 /** |
| 2582 * Initialize a newly created script element to have the specified tag name an
d offset. |
| 2583 * @param node the XML node from which this element is derived (not {@code nul
l}) |
| 2584 */ |
| 2585 HtmlScriptElementImpl(XmlTagNode node) : super.con2(node.tag.lexeme, node.tag.
offset) { |
| 2586 } |
| 2587 } |
| 2588 /** |
| 2438 * Instances of the class {@code ImportElementImpl} implement an {@link ImportEl
ement}. | 2589 * Instances of the class {@code ImportElementImpl} implement an {@link ImportEl
ement}. |
| 2590 * @coverage dart.engine.element |
| 2439 */ | 2591 */ |
| 2440 class ImportElementImpl extends ElementImpl implements ImportElement { | 2592 class ImportElementImpl extends ElementImpl implements ImportElement { |
| 2441 /** | 2593 /** |
| 2442 * The library that is imported into this library by this import directive. | 2594 * The library that is imported into this library by this import directive. |
| 2443 */ | 2595 */ |
| 2444 LibraryElement _importedLibrary; | 2596 LibraryElement _importedLibrary; |
| 2445 /** | 2597 /** |
| 2446 * The combinators that were specified as part of the import directive in the
order in which they | 2598 * The combinators that were specified as part of the import directive in the
order in which they |
| 2447 * were specified. | 2599 * were specified. |
| 2448 */ | 2600 */ |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2489 super.visitChildren(visitor); | 2641 super.visitChildren(visitor); |
| 2490 safelyVisitChild(_prefix, visitor); | 2642 safelyVisitChild(_prefix, visitor); |
| 2491 } | 2643 } |
| 2492 void appendTo(JavaStringBuilder builder) { | 2644 void appendTo(JavaStringBuilder builder) { |
| 2493 builder.append("import "); | 2645 builder.append("import "); |
| 2494 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); | 2646 ((_importedLibrary as LibraryElementImpl)).appendTo(builder); |
| 2495 } | 2647 } |
| 2496 } | 2648 } |
| 2497 /** | 2649 /** |
| 2498 * Instances of the class {@code LabelElementImpl} implement a {@code LabelEleme
nt}. | 2650 * Instances of the class {@code LabelElementImpl} implement a {@code LabelEleme
nt}. |
| 2651 * @coverage dart.engine.element |
| 2499 */ | 2652 */ |
| 2500 class LabelElementImpl extends ElementImpl implements LabelElement { | 2653 class LabelElementImpl extends ElementImpl implements LabelElement { |
| 2501 /** | 2654 /** |
| 2502 * A flag indicating whether this label is associated with a {@code switch} st
atement. | 2655 * A flag indicating whether this label is associated with a {@code switch} st
atement. |
| 2503 */ | 2656 */ |
| 2504 bool _onSwitchStatement = false; | 2657 bool _onSwitchStatement = false; |
| 2505 /** | 2658 /** |
| 2506 * A flag indicating whether this label is associated with a {@code switch} me
mber ({@code case}or {@code default}). | 2659 * A flag indicating whether this label is associated with a {@code switch} me
mber ({@code case}or {@code default}). |
| 2507 */ | 2660 */ |
| 2508 bool _onSwitchMember = false; | 2661 bool _onSwitchMember = false; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2529 */ | 2682 */ |
| 2530 bool isOnSwitchMember() => _onSwitchMember; | 2683 bool isOnSwitchMember() => _onSwitchMember; |
| 2531 /** | 2684 /** |
| 2532 * Return {@code true} if this label is associated with a {@code switch} state
ment. | 2685 * Return {@code true} if this label is associated with a {@code switch} state
ment. |
| 2533 * @return {@code true} if this label is associated with a {@code switch} stat
ement | 2686 * @return {@code true} if this label is associated with a {@code switch} stat
ement |
| 2534 */ | 2687 */ |
| 2535 bool isOnSwitchStatement() => _onSwitchStatement; | 2688 bool isOnSwitchStatement() => _onSwitchStatement; |
| 2536 } | 2689 } |
| 2537 /** | 2690 /** |
| 2538 * Instances of the class {@code LibraryElementImpl} implement a {@code LibraryE
lement}. | 2691 * Instances of the class {@code LibraryElementImpl} implement a {@code LibraryE
lement}. |
| 2692 * @coverage dart.engine.element |
| 2539 */ | 2693 */ |
| 2540 class LibraryElementImpl extends ElementImpl implements LibraryElement { | 2694 class LibraryElementImpl extends ElementImpl implements LibraryElement { |
| 2541 /** | 2695 /** |
| 2542 * An empty array of library elements. | 2696 * An empty array of library elements. |
| 2543 */ | 2697 */ |
| 2544 static List<LibraryElement> EMPTY_ARRAY = new List<LibraryElement>(0); | 2698 static List<LibraryElement> EMPTY_ARRAY = new List<LibraryElement>(0); |
| 2545 /** | 2699 /** |
| 2700 * Determine if the given library is up to date with respect to the given time
stamp. |
| 2701 * @param library the library to process |
| 2702 * @param timeStamp the time stamp to check against |
| 2703 * @param visitedLibraries the set of visited libraries |
| 2704 */ |
| 2705 static bool isUpToDate(LibraryElement library, int timeStamp, Set<LibraryEleme
nt> visitedLibraries) { |
| 2706 if (!visitedLibraries.contains(library)) { |
| 2707 javaSetAdd(visitedLibraries, library); |
| 2708 if (timeStamp < library.definingCompilationUnit.source.modificationStamp)
{ |
| 2709 return false; |
| 2710 } |
| 2711 for (CompilationUnitElement element in library.parts) { |
| 2712 if (timeStamp < element.source.modificationStamp) { |
| 2713 return false; |
| 2714 } |
| 2715 } |
| 2716 for (LibraryElement importedLibrary in library.importedLibraries) { |
| 2717 if (!isUpToDate(importedLibrary, timeStamp, visitedLibraries)) { |
| 2718 return false; |
| 2719 } |
| 2720 } |
| 2721 for (LibraryElement exportedLibrary in library.exportedLibraries) { |
| 2722 if (!isUpToDate(exportedLibrary, timeStamp, visitedLibraries)) { |
| 2723 return false; |
| 2724 } |
| 2725 } |
| 2726 } |
| 2727 return true; |
| 2728 } |
| 2729 /** |
| 2546 * The analysis context in which this library is defined. | 2730 * The analysis context in which this library is defined. |
| 2547 */ | 2731 */ |
| 2548 AnalysisContext _context; | 2732 AnalysisContext _context; |
| 2549 /** | 2733 /** |
| 2550 * The compilation unit that defines this library. | 2734 * The compilation unit that defines this library. |
| 2551 */ | 2735 */ |
| 2552 CompilationUnitElement _definingCompilationUnit; | 2736 CompilationUnitElement _definingCompilationUnit; |
| 2553 /** | 2737 /** |
| 2554 * The entry point for this library, or {@code null} if this library does not
have an entry point. | 2738 * The entry point for this library, or {@code null} if this library does not
have an entry point. |
| 2555 */ | 2739 */ |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2569 /** | 2753 /** |
| 2570 * Initialize a newly created library element to have the given name. | 2754 * Initialize a newly created library element to have the given name. |
| 2571 * @param context the analysis context in which the library is defined | 2755 * @param context the analysis context in which the library is defined |
| 2572 * @param name the name of this element | 2756 * @param name the name of this element |
| 2573 */ | 2757 */ |
| 2574 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co
n1(name) { | 2758 LibraryElementImpl(AnalysisContext context, LibraryIdentifier name) : super.co
n1(name) { |
| 2575 this._context = context; | 2759 this._context = context; |
| 2576 } | 2760 } |
| 2577 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); | 2761 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); |
| 2578 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _definingCompilationUnit == ((object as LibraryElementImpl)).definingCompilat
ionUnit; | 2762 bool operator ==(Object object) => identical(runtimeType, object.runtimeType)
&& _definingCompilationUnit == ((object as LibraryElementImpl)).definingCompilat
ionUnit; |
| 2579 ElementImpl getChild(String identifier27) { | 2763 ElementImpl getChild(String identifier28) { |
| 2580 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier ==
identifier27) { | 2764 if (((_definingCompilationUnit as CompilationUnitElementImpl)).identifier ==
identifier28) { |
| 2581 return _definingCompilationUnit as CompilationUnitElementImpl; | 2765 return _definingCompilationUnit as CompilationUnitElementImpl; |
| 2582 } | 2766 } |
| 2583 for (CompilationUnitElement part in _parts) { | 2767 for (CompilationUnitElement part in _parts) { |
| 2584 if (((part as CompilationUnitElementImpl)).identifier == identifier27) { | 2768 if (((part as CompilationUnitElementImpl)).identifier == identifier28) { |
| 2585 return part as CompilationUnitElementImpl; | 2769 return part as CompilationUnitElementImpl; |
| 2586 } | 2770 } |
| 2587 } | 2771 } |
| 2588 return null; | 2772 return null; |
| 2589 } | 2773 } |
| 2590 AnalysisContext get context => _context; | 2774 AnalysisContext get context => _context; |
| 2591 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; | 2775 CompilationUnitElement get definingCompilationUnit => _definingCompilationUnit
; |
| 2592 FunctionElement get entryPoint => _entryPoint; | 2776 FunctionElement get entryPoint => _entryPoint; |
| 2593 List<LibraryElement> get exportedLibraries { | 2777 List<LibraryElement> get exportedLibraries { |
| 2594 Set<LibraryElement> libraries = new Set<LibraryElement>(); | 2778 Set<LibraryElement> libraries = new Set<LibraryElement>(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 2617 PrefixElement prefix4 = element.prefix; | 2801 PrefixElement prefix4 = element.prefix; |
| 2618 if (prefix4 != null) { | 2802 if (prefix4 != null) { |
| 2619 javaSetAdd(prefixes, prefix4); | 2803 javaSetAdd(prefixes, prefix4); |
| 2620 } | 2804 } |
| 2621 } | 2805 } |
| 2622 return new List.from(prefixes); | 2806 return new List.from(prefixes); |
| 2623 } | 2807 } |
| 2624 int get hashCode => _definingCompilationUnit.hashCode; | 2808 int get hashCode => _definingCompilationUnit.hashCode; |
| 2625 bool isBrowserApplication() => _entryPoint != null && isOrImportsBrowserLibrar
y(); | 2809 bool isBrowserApplication() => _entryPoint != null && isOrImportsBrowserLibrar
y(); |
| 2626 bool isDartCore() => name == "dart.core"; | 2810 bool isDartCore() => name == "dart.core"; |
| 2811 bool isUpToDate2(int timeStamp) { |
| 2812 Set<LibraryElement> visitedLibraries = new Set(); |
| 2813 return isUpToDate(this, timeStamp, visitedLibraries); |
| 2814 } |
| 2627 /** | 2815 /** |
| 2628 * Set the compilation unit that defines this library to the given compilation
unit. | 2816 * Set the compilation unit that defines this library to the given compilation
unit. |
| 2629 * @param definingCompilationUnit the compilation unit that defines this libra
ry | 2817 * @param definingCompilationUnit the compilation unit that defines this libra
ry |
| 2630 */ | 2818 */ |
| 2631 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t2) { | 2819 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t2) { |
| 2632 ((definingCompilationUnit2 as CompilationUnitElementImpl)).enclosingElement
= this; | 2820 ((definingCompilationUnit2 as CompilationUnitElementImpl)).enclosingElement
= this; |
| 2633 this._definingCompilationUnit = definingCompilationUnit2; | 2821 this._definingCompilationUnit = definingCompilationUnit2; |
| 2634 } | 2822 } |
| 2635 /** | 2823 /** |
| 2636 * Set the entry point for this library to the given function. | 2824 * Set the entry point for this library to the given function. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2678 safelyVisitChild(_definingCompilationUnit, visitor); | 2866 safelyVisitChild(_definingCompilationUnit, visitor); |
| 2679 safelyVisitChildren(_exports, visitor); | 2867 safelyVisitChildren(_exports, visitor); |
| 2680 safelyVisitChildren(_imports, visitor); | 2868 safelyVisitChildren(_imports, visitor); |
| 2681 safelyVisitChildren(_parts, visitor); | 2869 safelyVisitChildren(_parts, visitor); |
| 2682 } | 2870 } |
| 2683 /** | 2871 /** |
| 2684 * Answer {@code true} if the receiver directly or indirectly imports the dart
:html libraries. | 2872 * Answer {@code true} if the receiver directly or indirectly imports the dart
:html libraries. |
| 2685 * @return {@code true} if the receiver directly or indirectly imports the dar
t:html libraries | 2873 * @return {@code true} if the receiver directly or indirectly imports the dar
t:html libraries |
| 2686 */ | 2874 */ |
| 2687 bool isOrImportsBrowserLibrary() { | 2875 bool isOrImportsBrowserLibrary() { |
| 2688 List<LibraryElement> visited = new List<LibraryElement>(10); | 2876 List<LibraryElement> visited = new List<LibraryElement>(); |
| 2689 Source htmlLibSource = definingCompilationUnit.source.resolve("dart:html"); | 2877 Source htmlLibSource = definingCompilationUnit.source.resolve("dart:html"); |
| 2690 visited.add(this); | 2878 visited.add(this); |
| 2691 for (int index = 0; index < visited.length; index++) { | 2879 for (int index = 0; index < visited.length; index++) { |
| 2692 LibraryElement library = visited[index]; | 2880 LibraryElement library = visited[index]; |
| 2693 Source source10 = library.definingCompilationUnit.source; | 2881 Source source10 = library.definingCompilationUnit.source; |
| 2694 if (source10 == htmlLibSource) { | 2882 if (source10 == htmlLibSource) { |
| 2695 return true; | 2883 return true; |
| 2696 } | 2884 } |
| 2697 for (LibraryElement importedLibrary in library.importedLibraries) { | 2885 for (LibraryElement importedLibrary in library.importedLibraries) { |
| 2698 if (!visited.contains(importedLibrary)) { | 2886 if (!visited.contains(importedLibrary)) { |
| 2699 visited.add(importedLibrary); | 2887 visited.add(importedLibrary); |
| 2700 } | 2888 } |
| 2701 } | 2889 } |
| 2702 for (LibraryElement exportedLibrary in library.exportedLibraries) { | 2890 for (LibraryElement exportedLibrary in library.exportedLibraries) { |
| 2703 if (!visited.contains(exportedLibrary)) { | 2891 if (!visited.contains(exportedLibrary)) { |
| 2704 visited.add(exportedLibrary); | 2892 visited.add(exportedLibrary); |
| 2705 } | 2893 } |
| 2706 } | 2894 } |
| 2707 } | 2895 } |
| 2708 return false; | 2896 return false; |
| 2709 } | 2897 } |
| 2710 } | 2898 } |
| 2711 /** | 2899 /** |
| 2712 * Instances of the class {@code LocalVariableElementImpl} implement a {@code Lo
calVariableElement}. | 2900 * Instances of the class {@code LocalVariableElementImpl} implement a {@code Lo
calVariableElement}. |
| 2901 * @coverage dart.engine.element |
| 2713 */ | 2902 */ |
| 2714 class LocalVariableElementImpl extends VariableElementImpl implements LocalVaria
bleElement { | 2903 class LocalVariableElementImpl extends VariableElementImpl implements LocalVaria
bleElement { |
| 2715 /** | 2904 /** |
| 2716 * The offset to the beginning of the visible range for this element. | 2905 * The offset to the beginning of the visible range for this element. |
| 2717 */ | 2906 */ |
| 2718 int _visibleRangeOffset = 0; | 2907 int _visibleRangeOffset = 0; |
| 2719 /** | 2908 /** |
| 2720 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a | 2909 * The length of the visible range for this element, or {@code -1} if this ele
ment does not have a |
| 2721 * visible range. | 2910 * visible range. |
| 2722 */ | 2911 */ |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2751 _visibleRangeLength = length; | 2940 _visibleRangeLength = length; |
| 2752 } | 2941 } |
| 2753 void appendTo(JavaStringBuilder builder) { | 2942 void appendTo(JavaStringBuilder builder) { |
| 2754 builder.append(type); | 2943 builder.append(type); |
| 2755 builder.append(" "); | 2944 builder.append(" "); |
| 2756 builder.append(name); | 2945 builder.append(name); |
| 2757 } | 2946 } |
| 2758 } | 2947 } |
| 2759 /** | 2948 /** |
| 2760 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. | 2949 * Instances of the class {@code MethodElementImpl} implement a {@code MethodEle
ment}. |
| 2950 * @coverage dart.engine.element |
| 2761 */ | 2951 */ |
| 2762 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { | 2952 class MethodElementImpl extends ExecutableElementImpl implements MethodElement { |
| 2763 /** | 2953 /** |
| 2764 * An empty array of method elements. | 2954 * An empty array of method elements. |
| 2765 */ | 2955 */ |
| 2766 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); | 2956 static List<MethodElement> EMPTY_ARRAY = new List<MethodElement>(0); |
| 2767 /** | 2957 /** |
| 2768 * Initialize a newly created method element to have the given name. | 2958 * Initialize a newly created method element to have the given name. |
| 2769 * @param name the name of this element | 2959 * @param name the name of this element |
| 2770 */ | 2960 */ |
| 2771 MethodElementImpl.con1(Identifier name) : super.con1(name) { | 2961 MethodElementImpl.con1(Identifier name) : super.con1(name) { |
| 2772 _jtd_constructor_175_impl(name); | 2962 _jtd_constructor_181_impl(name); |
| 2773 } | 2963 } |
| 2774 _jtd_constructor_175_impl(Identifier name) { | 2964 _jtd_constructor_181_impl(Identifier name) { |
| 2775 } | 2965 } |
| 2776 /** | 2966 /** |
| 2777 * Initialize a newly created method element to have the given name. | 2967 * Initialize a newly created method element to have the given name. |
| 2778 * @param name the name of this element | 2968 * @param name the name of this element |
| 2779 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 2969 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 2780 * declaration of this element | 2970 * declaration of this element |
| 2781 */ | 2971 */ |
| 2782 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff
set) { | 2972 MethodElementImpl.con2(String name, int nameOffset) : super.con2(name, nameOff
set) { |
| 2783 _jtd_constructor_176_impl(name, nameOffset); | 2973 _jtd_constructor_182_impl(name, nameOffset); |
| 2784 } | 2974 } |
| 2785 _jtd_constructor_176_impl(String name, int nameOffset) { | 2975 _jtd_constructor_182_impl(String name, int nameOffset) { |
| 2786 } | 2976 } |
| 2787 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); | 2977 accept(ElementVisitor visitor) => visitor.visitMethodElement(this); |
| 2788 ClassElement get enclosingElement => super.enclosingElement as ClassElement; | 2978 ClassElement get enclosingElement => super.enclosingElement as ClassElement; |
| 2789 ElementKind get kind => ElementKind.METHOD; | 2979 ElementKind get kind => ElementKind.METHOD; |
| 2790 bool isAbstract() => hasModifier(Modifier.ABSTRACT); | 2980 bool isAbstract() => hasModifier(Modifier.ABSTRACT); |
| 2791 bool isStatic() => hasModifier(Modifier.STATIC); | 2981 bool isStatic() => hasModifier(Modifier.STATIC); |
| 2792 /** | 2982 /** |
| 2793 * Set whether this method is abstract to correspond to the given value. | 2983 * Set whether this method is abstract to correspond to the given value. |
| 2794 * @param isAbstract {@code true} if the method is abstract | 2984 * @param isAbstract {@code true} if the method is abstract |
| 2795 */ | 2985 */ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2806 void appendTo(JavaStringBuilder builder) { | 2996 void appendTo(JavaStringBuilder builder) { |
| 2807 builder.append(enclosingElement.name); | 2997 builder.append(enclosingElement.name); |
| 2808 builder.append("."); | 2998 builder.append("."); |
| 2809 builder.append(name); | 2999 builder.append(name); |
| 2810 super.appendTo(builder); | 3000 super.appendTo(builder); |
| 2811 } | 3001 } |
| 2812 } | 3002 } |
| 2813 /** | 3003 /** |
| 2814 * The enumeration {@code Modifier} defines constants for all of the modifiers d
efined by the Dart | 3004 * The enumeration {@code Modifier} defines constants for all of the modifiers d
efined by the Dart |
| 2815 * language and for a few additional flags that are useful. | 3005 * language and for a few additional flags that are useful. |
| 3006 * @coverage dart.engine.element |
| 2816 */ | 3007 */ |
| 2817 class Modifier { | 3008 class Modifier { |
| 2818 static final Modifier ABSTRACT = new Modifier('ABSTRACT', 0); | 3009 static final Modifier ABSTRACT = new Modifier('ABSTRACT', 0); |
| 2819 static final Modifier CONST = new Modifier('CONST', 1); | 3010 static final Modifier CONST = new Modifier('CONST', 1); |
| 2820 static final Modifier FACTORY = new Modifier('FACTORY', 2); | 3011 static final Modifier FACTORY = new Modifier('FACTORY', 2); |
| 2821 static final Modifier FINAL = new Modifier('FINAL', 3); | 3012 static final Modifier FINAL = new Modifier('FINAL', 3); |
| 2822 static final Modifier GETTER = new Modifier('GETTER', 4); | 3013 static final Modifier GETTER = new Modifier('GETTER', 4); |
| 2823 static final Modifier INITIALIZING_FORMAL = new Modifier('INITIALIZING_FORMAL'
, 5); | 3014 static final Modifier INITIALIZING_FORMAL = new Modifier('INITIALIZING_FORMAL'
, 5); |
| 2824 static final Modifier MIXIN = new Modifier('MIXIN', 6); | 3015 static final Modifier MIXIN = new Modifier('MIXIN', 6); |
| 2825 static final Modifier SETTER = new Modifier('SETTER', 7); | 3016 static final Modifier SETTER = new Modifier('SETTER', 7); |
| 2826 static final Modifier STATIC = new Modifier('STATIC', 8); | 3017 static final Modifier STATIC = new Modifier('STATIC', 8); |
| 2827 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9); | 3018 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9); |
| 2828 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10); | 3019 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10); |
| 2829 static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER,
INITIALIZING_FORMAL, MIXIN, SETTER, STATIC, SYNTHETIC, TYPEDEF]; | 3020 static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER,
INITIALIZING_FORMAL, MIXIN, SETTER, STATIC, SYNTHETIC, TYPEDEF]; |
| 2830 final String __name; | 3021 final String __name; |
| 2831 final int __ordinal; | 3022 final int __ordinal; |
| 3023 int get ordinal => __ordinal; |
| 2832 Modifier(this.__name, this.__ordinal) { | 3024 Modifier(this.__name, this.__ordinal) { |
| 2833 } | 3025 } |
| 2834 String toString() => __name; | 3026 String toString() => __name; |
| 2835 } | 3027 } |
| 2836 /** | 3028 /** |
| 2837 * Instances of the class {@code MultiplyDefinedElementImpl} represent a collect
ion of elements that | 3029 * Instances of the class {@code MultiplyDefinedElementImpl} represent a collect
ion of elements that |
| 2838 * have the same name within the same scope. | 3030 * have the same name within the same scope. |
| 3031 * @coverage dart.engine.element |
| 2839 */ | 3032 */ |
| 2840 class MultiplyDefinedElementImpl implements MultiplyDefinedElement { | 3033 class MultiplyDefinedElementImpl implements MultiplyDefinedElement { |
| 2841 /** | 3034 /** |
| 2842 * The analysis context in which the multiply defined elements are defined. | 3035 * The analysis context in which the multiply defined elements are defined. |
| 2843 */ | 3036 */ |
| 2844 AnalysisContext _context; | 3037 AnalysisContext _context; |
| 2845 /** | 3038 /** |
| 2846 * The name of the conflicting elements. | 3039 * The name of the conflicting elements. |
| 2847 */ | 3040 */ |
| 2848 String _name; | 3041 String _name; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 */ | 3114 */ |
| 2922 List<Element> computeConflictingElements(Element firstElement, Element secondE
lement) { | 3115 List<Element> computeConflictingElements(Element firstElement, Element secondE
lement) { |
| 2923 List<Element> elements = new List<Element>(); | 3116 List<Element> elements = new List<Element>(); |
| 2924 add(elements, firstElement); | 3117 add(elements, firstElement); |
| 2925 add(elements, secondElement); | 3118 add(elements, secondElement); |
| 2926 return new List.from(elements); | 3119 return new List.from(elements); |
| 2927 } | 3120 } |
| 2928 } | 3121 } |
| 2929 /** | 3122 /** |
| 2930 * Instances of the class {@code ParameterElementImpl} implement a {@code Parame
terElement}. | 3123 * Instances of the class {@code ParameterElementImpl} implement a {@code Parame
terElement}. |
| 3124 * @coverage dart.engine.element |
| 2931 */ | 3125 */ |
| 2932 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { | 3126 class ParameterElementImpl extends VariableElementImpl implements ParameterEleme
nt { |
| 2933 /** | 3127 /** |
| 2934 * The kind of this parameter. | 3128 * The kind of this parameter. |
| 2935 */ | 3129 */ |
| 2936 ParameterKind _parameterKind; | 3130 ParameterKind _parameterKind; |
| 2937 /** | 3131 /** |
| 2938 * The offset to the beginning of the visible range for this element. | 3132 * The offset to the beginning of the visible range for this element. |
| 2939 */ | 3133 */ |
| 2940 int _visibleRangeOffset = 0; | 3134 int _visibleRangeOffset = 0; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2992 builder.append(type); | 3186 builder.append(type); |
| 2993 builder.append(" "); | 3187 builder.append(" "); |
| 2994 builder.append(name); | 3188 builder.append(name); |
| 2995 builder.append(" ("); | 3189 builder.append(" ("); |
| 2996 builder.append(kind); | 3190 builder.append(kind); |
| 2997 builder.append(")"); | 3191 builder.append(")"); |
| 2998 } | 3192 } |
| 2999 } | 3193 } |
| 3000 /** | 3194 /** |
| 3001 * Instances of the class {@code PrefixElementImpl} implement a {@code PrefixEle
ment}. | 3195 * Instances of the class {@code PrefixElementImpl} implement a {@code PrefixEle
ment}. |
| 3196 * @coverage dart.engine.element |
| 3002 */ | 3197 */ |
| 3003 class PrefixElementImpl extends ElementImpl implements PrefixElement { | 3198 class PrefixElementImpl extends ElementImpl implements PrefixElement { |
| 3004 /** | 3199 /** |
| 3005 * An array containing all of the libraries that are imported using this prefi
x. | 3200 * An array containing all of the libraries that are imported using this prefi
x. |
| 3006 */ | 3201 */ |
| 3007 List<LibraryElement> _importedLibraries = LibraryElementImpl.EMPTY_ARRAY; | 3202 List<LibraryElement> _importedLibraries = LibraryElementImpl.EMPTY_ARRAY; |
| 3008 /** | 3203 /** |
| 3009 * An empty array of prefix elements. | 3204 * An empty array of prefix elements. |
| 3010 */ | 3205 */ |
| 3011 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0); | 3206 static List<PrefixElement> EMPTY_ARRAY = new List<PrefixElement>(0); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3029 } | 3224 } |
| 3030 this._importedLibraries = importedLibraries2; | 3225 this._importedLibraries = importedLibraries2; |
| 3031 } | 3226 } |
| 3032 void appendTo(JavaStringBuilder builder) { | 3227 void appendTo(JavaStringBuilder builder) { |
| 3033 builder.append("as "); | 3228 builder.append("as "); |
| 3034 super.appendTo(builder); | 3229 super.appendTo(builder); |
| 3035 } | 3230 } |
| 3036 } | 3231 } |
| 3037 /** | 3232 /** |
| 3038 * Instances of the class {@code PropertyAccessorElementImpl} implement a{@code
PropertyAccessorElement}. | 3233 * Instances of the class {@code PropertyAccessorElementImpl} implement a{@code
PropertyAccessorElement}. |
| 3234 * @coverage dart.engine.element |
| 3039 */ | 3235 */ |
| 3040 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { | 3236 class PropertyAccessorElementImpl extends ExecutableElementImpl implements Prope
rtyAccessorElement { |
| 3041 /** | 3237 /** |
| 3042 * The variable associated with this accessor. | 3238 * The variable associated with this accessor. |
| 3043 */ | 3239 */ |
| 3044 PropertyInducingElement _variable; | 3240 PropertyInducingElement _variable; |
| 3045 /** | 3241 /** |
| 3046 * An empty array of property accessor elements. | 3242 * An empty array of property accessor elements. |
| 3047 */ | 3243 */ |
| 3048 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>(0); | 3244 static List<PropertyAccessorElement> EMPTY_ARRAY = new List<PropertyAccessorEl
ement>(0); |
| 3049 /** | 3245 /** |
| 3050 * Initialize a newly created property accessor element to have the given name
. | 3246 * Initialize a newly created property accessor element to have the given name
. |
| 3051 * @param name the name of this element | 3247 * @param name the name of this element |
| 3052 */ | 3248 */ |
| 3053 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { | 3249 PropertyAccessorElementImpl.con1(Identifier name) : super.con1(name) { |
| 3054 _jtd_constructor_181_impl(name); | 3250 _jtd_constructor_187_impl(name); |
| 3055 } | 3251 } |
| 3056 _jtd_constructor_181_impl(Identifier name) { | 3252 _jtd_constructor_187_impl(Identifier name) { |
| 3057 } | 3253 } |
| 3058 /** | 3254 /** |
| 3059 * Initialize a newly created synthetic property accessor element to be associ
ated with the given | 3255 * Initialize a newly created synthetic property accessor element to be associ
ated with the given |
| 3060 * variable. | 3256 * variable. |
| 3061 * @param variable the variable with which this access is associated | 3257 * @param variable the variable with which this access is associated |
| 3062 */ | 3258 */ |
| 3063 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe
r.con2(variable2.name, -1) { | 3259 PropertyAccessorElementImpl.con2(PropertyInducingElementImpl variable2) : supe
r.con2(variable2.name, -1) { |
| 3064 _jtd_constructor_182_impl(variable2); | 3260 _jtd_constructor_188_impl(variable2); |
| 3065 } | 3261 } |
| 3066 _jtd_constructor_182_impl(PropertyInducingElementImpl variable2) { | 3262 _jtd_constructor_188_impl(PropertyInducingElementImpl variable2) { |
| 3067 this._variable = variable2; | 3263 this._variable = variable2; |
| 3068 synthetic = true; | 3264 synthetic = true; |
| 3069 } | 3265 } |
| 3070 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); | 3266 accept(ElementVisitor visitor) => visitor.visitPropertyAccessorElement(this); |
| 3071 bool operator ==(Object object) => super == object && identical(isGetter(), ((
object as PropertyAccessorElement)).isGetter()); | 3267 bool operator ==(Object object) => super == object && identical(isGetter(), ((
object as PropertyAccessorElement)).isGetter()); |
| 3072 ElementKind get kind { | 3268 ElementKind get kind { |
| 3073 if (isGetter()) { | 3269 if (isGetter()) { |
| 3074 return ElementKind.GETTER; | 3270 return ElementKind.GETTER; |
| 3075 } | 3271 } |
| 3076 return ElementKind.SETTER; | 3272 return ElementKind.SETTER; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 3101 this._variable = variable3; | 3297 this._variable = variable3; |
| 3102 } | 3298 } |
| 3103 void appendTo(JavaStringBuilder builder) { | 3299 void appendTo(JavaStringBuilder builder) { |
| 3104 builder.append(isGetter() ? "get " : "set "); | 3300 builder.append(isGetter() ? "get " : "set "); |
| 3105 builder.append(variable.name); | 3301 builder.append(variable.name); |
| 3106 super.appendTo(builder); | 3302 super.appendTo(builder); |
| 3107 } | 3303 } |
| 3108 } | 3304 } |
| 3109 /** | 3305 /** |
| 3110 * Instances of the class {@code PropertyInducingElementImpl} implement a{@code
PropertyInducingElement}. | 3306 * Instances of the class {@code PropertyInducingElementImpl} implement a{@code
PropertyInducingElement}. |
| 3307 * @coverage dart.engine.element |
| 3111 */ | 3308 */ |
| 3112 abstract class PropertyInducingElementImpl extends VariableElementImpl implement
s PropertyInducingElement { | 3309 abstract class PropertyInducingElementImpl extends VariableElementImpl implement
s PropertyInducingElement { |
| 3113 /** | 3310 /** |
| 3114 * The getter associated with this element. | 3311 * The getter associated with this element. |
| 3115 */ | 3312 */ |
| 3116 PropertyAccessorElement _getter; | 3313 PropertyAccessorElement _getter; |
| 3117 /** | 3314 /** |
| 3118 * The setter associated with this element, or {@code null} if the element is
effectively{@code final} and therefore does not have a setter associated with it
. | 3315 * The setter associated with this element, or {@code null} if the element is
effectively{@code final} and therefore does not have a setter associated with it
. |
| 3119 */ | 3316 */ |
| 3120 PropertyAccessorElement _setter; | 3317 PropertyAccessorElement _setter; |
| 3121 /** | 3318 /** |
| 3122 * An empty array of elements. | 3319 * An empty array of elements. |
| 3123 */ | 3320 */ |
| 3124 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl
ement>(0); | 3321 static List<PropertyInducingElement> EMPTY_ARRAY = new List<PropertyInducingEl
ement>(0); |
| 3125 /** | 3322 /** |
| 3126 * Initialize a newly created element to have the given name. | 3323 * Initialize a newly created element to have the given name. |
| 3127 * @param name the name of this element | 3324 * @param name the name of this element |
| 3128 */ | 3325 */ |
| 3129 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { | 3326 PropertyInducingElementImpl.con1(Identifier name) : super.con1(name) { |
| 3130 _jtd_constructor_183_impl(name); | 3327 _jtd_constructor_189_impl(name); |
| 3131 } | 3328 } |
| 3132 _jtd_constructor_183_impl(Identifier name) { | 3329 _jtd_constructor_189_impl(Identifier name) { |
| 3133 } | 3330 } |
| 3134 /** | 3331 /** |
| 3135 * Initialize a newly created synthetic element to have the given name. | 3332 * Initialize a newly created synthetic element to have the given name. |
| 3136 * @param name the name of this element | 3333 * @param name the name of this element |
| 3137 */ | 3334 */ |
| 3138 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { | 3335 PropertyInducingElementImpl.con2(String name) : super.con2(name, -1) { |
| 3139 _jtd_constructor_184_impl(name); | 3336 _jtd_constructor_190_impl(name); |
| 3140 } | 3337 } |
| 3141 _jtd_constructor_184_impl(String name) { | 3338 _jtd_constructor_190_impl(String name) { |
| 3142 synthetic = true; | 3339 synthetic = true; |
| 3143 } | 3340 } |
| 3144 PropertyAccessorElement get getter => _getter; | 3341 PropertyAccessorElement get getter => _getter; |
| 3145 PropertyAccessorElement get setter => _setter; | 3342 PropertyAccessorElement get setter => _setter; |
| 3146 /** | 3343 /** |
| 3147 * Set the getter associated with this element to the given accessor. | 3344 * Set the getter associated with this element to the given accessor. |
| 3148 * @param getter the getter associated with this element | 3345 * @param getter the getter associated with this element |
| 3149 */ | 3346 */ |
| 3150 void set getter(PropertyAccessorElement getter2) { | 3347 void set getter(PropertyAccessorElement getter2) { |
| 3151 this._getter = getter2; | 3348 this._getter = getter2; |
| 3152 } | 3349 } |
| 3153 /** | 3350 /** |
| 3154 * Set the setter associated with this element to the given accessor. | 3351 * Set the setter associated with this element to the given accessor. |
| 3155 * @param setter the setter associated with this element | 3352 * @param setter the setter associated with this element |
| 3156 */ | 3353 */ |
| 3157 void set setter(PropertyAccessorElement setter2) { | 3354 void set setter(PropertyAccessorElement setter2) { |
| 3158 this._setter = setter2; | 3355 this._setter = setter2; |
| 3159 } | 3356 } |
| 3160 } | 3357 } |
| 3161 /** | 3358 /** |
| 3162 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. | 3359 * Instances of the class {@code ShowCombinatorImpl} implement a {@link ShowComb
inator}. |
| 3360 * @coverage dart.engine.element |
| 3163 */ | 3361 */ |
| 3164 class ShowCombinatorImpl implements ShowCombinator { | 3362 class ShowCombinatorImpl implements ShowCombinator { |
| 3165 /** | 3363 /** |
| 3166 * The names that are to be made visible in the importing library if they are
defined in the | 3364 * The names that are to be made visible in the importing library if they are
defined in the |
| 3167 * imported library. | 3365 * imported library. |
| 3168 */ | 3366 */ |
| 3169 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; | 3367 List<String> _shownNames = StringUtilities.EMPTY_ARRAY; |
| 3170 /** | 3368 /** |
| 3171 * Initialize a newly created combinator. | 3369 * Initialize a newly created combinator. |
| 3172 */ | 3370 */ |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3189 if (i > 0) { | 3387 if (i > 0) { |
| 3190 builder.append(", "); | 3388 builder.append(", "); |
| 3191 } | 3389 } |
| 3192 builder.append(_shownNames[i]); | 3390 builder.append(_shownNames[i]); |
| 3193 } | 3391 } |
| 3194 return builder.toString(); | 3392 return builder.toString(); |
| 3195 } | 3393 } |
| 3196 } | 3394 } |
| 3197 /** | 3395 /** |
| 3198 * Instances of the class {@code TopLevelVariableElementImpl} implement a{@code
TopLevelVariableElement}. | 3396 * Instances of the class {@code TopLevelVariableElementImpl} implement a{@code
TopLevelVariableElement}. |
| 3397 * @coverage dart.engine.element |
| 3199 */ | 3398 */ |
| 3200 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements
TopLevelVariableElement { | 3399 class TopLevelVariableElementImpl extends PropertyInducingElementImpl implements
TopLevelVariableElement { |
| 3201 /** | 3400 /** |
| 3202 * An empty array of top-level variable elements. | 3401 * An empty array of top-level variable elements. |
| 3203 */ | 3402 */ |
| 3204 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl
ement>(0); | 3403 static List<TopLevelVariableElement> EMPTY_ARRAY = new List<TopLevelVariableEl
ement>(0); |
| 3205 /** | 3404 /** |
| 3206 * Initialize a newly created top-level variable element to have the given nam
e. | 3405 * Initialize a newly created top-level variable element to have the given nam
e. |
| 3207 * @param name the name of this element | 3406 * @param name the name of this element |
| 3208 */ | 3407 */ |
| 3209 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { | 3408 TopLevelVariableElementImpl.con1(Identifier name) : super.con1(name) { |
| 3210 _jtd_constructor_186_impl(name); | 3409 _jtd_constructor_192_impl(name); |
| 3211 } | 3410 } |
| 3212 _jtd_constructor_186_impl(Identifier name) { | 3411 _jtd_constructor_192_impl(Identifier name) { |
| 3213 } | 3412 } |
| 3214 /** | 3413 /** |
| 3215 * Initialize a newly created synthetic top-level variable element to have the
given name. | 3414 * Initialize a newly created synthetic top-level variable element to have the
given name. |
| 3216 * @param name the name of this element | 3415 * @param name the name of this element |
| 3217 */ | 3416 */ |
| 3218 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { | 3417 TopLevelVariableElementImpl.con2(String name) : super.con2(name) { |
| 3219 _jtd_constructor_187_impl(name); | 3418 _jtd_constructor_193_impl(name); |
| 3220 } | 3419 } |
| 3221 _jtd_constructor_187_impl(String name) { | 3420 _jtd_constructor_193_impl(String name) { |
| 3222 } | 3421 } |
| 3223 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); | 3422 accept(ElementVisitor visitor) => visitor.visitTopLevelVariableElement(this); |
| 3224 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; | 3423 ElementKind get kind => ElementKind.TOP_LEVEL_VARIABLE; |
| 3225 bool isStatic() => true; | 3424 bool isStatic() => true; |
| 3226 } | 3425 } |
| 3227 /** | 3426 /** |
| 3228 * Instances of the class {@code TypeAliasElementImpl} implement a {@code TypeAl
iasElement}. | 3427 * Instances of the class {@code TypeAliasElementImpl} implement a {@code TypeAl
iasElement}. |
| 3428 * @coverage dart.engine.element |
| 3229 */ | 3429 */ |
| 3230 class TypeAliasElementImpl extends ElementImpl implements TypeAliasElement { | 3430 class TypeAliasElementImpl extends ElementImpl implements TypeAliasElement { |
| 3231 /** | 3431 /** |
| 3232 * An array containing all of the parameters defined by this type alias. | 3432 * An array containing all of the parameters defined by this type alias. |
| 3233 */ | 3433 */ |
| 3234 List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY; | 3434 List<ParameterElement> _parameters = ParameterElementImpl.EMPTY_ARRAY; |
| 3235 /** | 3435 /** |
| 3236 * The type of function defined by this type alias. | 3436 * The type of function defined by this type alias. |
| 3237 */ | 3437 */ |
| 3238 FunctionType _type; | 3438 FunctionType _type; |
| 3239 /** | 3439 /** |
| 3240 * An array containing all of the type variables defined for this type. | 3440 * An array containing all of the type variables defined for this type. |
| 3241 */ | 3441 */ |
| 3242 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; | 3442 List<TypeVariableElement> _typeVariables = TypeVariableElementImpl.EMPTY_ARRAY
; |
| 3243 /** | 3443 /** |
| 3244 * An empty array of type alias elements. | 3444 * An empty array of type alias elements. |
| 3245 */ | 3445 */ |
| 3246 static List<TypeAliasElement> EMPTY_ARRAY = new List<TypeAliasElement>(0); | 3446 static List<TypeAliasElement> EMPTY_ARRAY = new List<TypeAliasElement>(0); |
| 3247 /** | 3447 /** |
| 3248 * Initialize a newly created type alias element to have the given name. | 3448 * Initialize a newly created type alias element to have the given name. |
| 3249 * @param name the name of this element | 3449 * @param name the name of this element |
| 3250 */ | 3450 */ |
| 3251 TypeAliasElementImpl(Identifier name) : super.con1(name) { | 3451 TypeAliasElementImpl(Identifier name) : super.con1(name) { |
| 3252 } | 3452 } |
| 3253 accept(ElementVisitor visitor) => visitor.visitTypeAliasElement(this); | 3453 accept(ElementVisitor visitor) => visitor.visitTypeAliasElement(this); |
| 3254 ElementImpl getChild(String identifier28) { | 3454 ElementImpl getChild(String identifier29) { |
| 3255 for (VariableElement parameter in _parameters) { | 3455 for (VariableElement parameter in _parameters) { |
| 3256 if (((parameter as VariableElementImpl)).identifier == identifier28) { | 3456 if (((parameter as VariableElementImpl)).identifier == identifier29) { |
| 3257 return parameter as VariableElementImpl; | 3457 return parameter as VariableElementImpl; |
| 3258 } | 3458 } |
| 3259 } | 3459 } |
| 3260 for (TypeVariableElement typeVariable in _typeVariables) { | 3460 for (TypeVariableElement typeVariable in _typeVariables) { |
| 3261 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier28
) { | 3461 if (((typeVariable as TypeVariableElementImpl)).identifier == identifier29
) { |
| 3262 return typeVariable as TypeVariableElementImpl; | 3462 return typeVariable as TypeVariableElementImpl; |
| 3263 } | 3463 } |
| 3264 } | 3464 } |
| 3265 return null; | 3465 return null; |
| 3266 } | 3466 } |
| 3267 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi
lationUnitElement; | 3467 CompilationUnitElement get enclosingElement => super.enclosingElement as Compi
lationUnitElement; |
| 3268 ElementKind get kind => ElementKind.TYPE_ALIAS; | 3468 ElementKind get kind => ElementKind.TYPE_ALIAS; |
| 3269 List<ParameterElement> get parameters => _parameters; | 3469 List<ParameterElement> get parameters => _parameters; |
| 3270 FunctionType get type => _type; | 3470 FunctionType get type => _type; |
| 3271 List<TypeVariableElement> get typeVariables => _typeVariables; | 3471 List<TypeVariableElement> get typeVariables => _typeVariables; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 } | 3527 } |
| 3328 builder.append(")"); | 3528 builder.append(")"); |
| 3329 if (_type != null) { | 3529 if (_type != null) { |
| 3330 builder.append(" -> "); | 3530 builder.append(" -> "); |
| 3331 builder.append(_type.returnType); | 3531 builder.append(_type.returnType); |
| 3332 } | 3532 } |
| 3333 } | 3533 } |
| 3334 } | 3534 } |
| 3335 /** | 3535 /** |
| 3336 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ
eVariableElement}. | 3536 * Instances of the class {@code TypeVariableElementImpl} implement a {@code Typ
eVariableElement}. |
| 3537 * @coverage dart.engine.element |
| 3337 */ | 3538 */ |
| 3338 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement
{ | 3539 class TypeVariableElementImpl extends ElementImpl implements TypeVariableElement
{ |
| 3339 /** | 3540 /** |
| 3340 * The type defined by this type variable. | 3541 * The type defined by this type variable. |
| 3341 */ | 3542 */ |
| 3342 TypeVariableType _type; | 3543 TypeVariableType _type; |
| 3343 /** | 3544 /** |
| 3344 * The type representing the bound associated with this variable, or {@code nu
ll} if this variable | 3545 * The type representing the bound associated with this variable, or {@code nu
ll} if this variable |
| 3345 * does not have an explicit bound. | 3546 * does not have an explicit bound. |
| 3346 */ | 3547 */ |
| (...skipping 29 matching lines...) Expand all Loading... |
| 3376 void appendTo(JavaStringBuilder builder) { | 3577 void appendTo(JavaStringBuilder builder) { |
| 3377 builder.append(name); | 3578 builder.append(name); |
| 3378 if (_bound != null) { | 3579 if (_bound != null) { |
| 3379 builder.append(" extends "); | 3580 builder.append(" extends "); |
| 3380 builder.append(_bound); | 3581 builder.append(_bound); |
| 3381 } | 3582 } |
| 3382 } | 3583 } |
| 3383 } | 3584 } |
| 3384 /** | 3585 /** |
| 3385 * Instances of the class {@code VariableElementImpl} implement a {@code Variabl
eElement}. | 3586 * Instances of the class {@code VariableElementImpl} implement a {@code Variabl
eElement}. |
| 3587 * @coverage dart.engine.element |
| 3386 */ | 3588 */ |
| 3387 abstract class VariableElementImpl extends ElementImpl implements VariableElemen
t { | 3589 abstract class VariableElementImpl extends ElementImpl implements VariableElemen
t { |
| 3388 /** | 3590 /** |
| 3389 * The declared type of this variable. | 3591 * The declared type of this variable. |
| 3390 */ | 3592 */ |
| 3391 Type2 _type; | 3593 Type2 _type; |
| 3392 /** | 3594 /** |
| 3393 * A synthetic function representing this variable's initializer, or {@code nu
ll} if this variable | 3595 * A synthetic function representing this variable's initializer, or {@code nu
ll} if this variable |
| 3394 * does not have an initializer. | 3596 * does not have an initializer. |
| 3395 */ | 3597 */ |
| 3396 FunctionElement _initializer; | 3598 FunctionElement _initializer; |
| 3397 /** | 3599 /** |
| 3398 * An empty array of variable elements. | 3600 * An empty array of variable elements. |
| 3399 */ | 3601 */ |
| 3400 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); | 3602 static List<VariableElement> EMPTY_ARRAY = new List<VariableElement>(0); |
| 3401 /** | 3603 /** |
| 3402 * Initialize a newly created variable element to have the given name. | 3604 * Initialize a newly created variable element to have the given name. |
| 3403 * @param name the name of this element | 3605 * @param name the name of this element |
| 3404 */ | 3606 */ |
| 3405 VariableElementImpl.con1(Identifier name) : super.con1(name) { | 3607 VariableElementImpl.con1(Identifier name) : super.con1(name) { |
| 3406 _jtd_constructor_190_impl(name); | 3608 _jtd_constructor_196_impl(name); |
| 3407 } | 3609 } |
| 3408 _jtd_constructor_190_impl(Identifier name) { | 3610 _jtd_constructor_196_impl(Identifier name) { |
| 3409 } | 3611 } |
| 3410 /** | 3612 /** |
| 3411 * Initialize a newly created variable element to have the given name. | 3613 * Initialize a newly created variable element to have the given name. |
| 3412 * @param name the name of this element | 3614 * @param name the name of this element |
| 3413 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 3615 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 3414 * declaration of this element | 3616 * declaration of this element |
| 3415 */ | 3617 */ |
| 3416 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset) { | 3618 VariableElementImpl.con2(String name, int nameOffset) : super.con2(name, nameO
ffset) { |
| 3417 _jtd_constructor_191_impl(name, nameOffset); | 3619 _jtd_constructor_197_impl(name, nameOffset); |
| 3418 } | 3620 } |
| 3419 _jtd_constructor_191_impl(String name, int nameOffset) { | 3621 _jtd_constructor_197_impl(String name, int nameOffset) { |
| 3420 } | 3622 } |
| 3421 FunctionElement get initializer => _initializer; | 3623 FunctionElement get initializer => _initializer; |
| 3422 Type2 get type => _type; | 3624 Type2 get type => _type; |
| 3423 bool isConst() => hasModifier(Modifier.CONST); | 3625 bool isConst() => hasModifier(Modifier.CONST); |
| 3424 bool isFinal() => hasModifier(Modifier.FINAL); | 3626 bool isFinal() => hasModifier(Modifier.FINAL); |
| 3425 /** | 3627 /** |
| 3426 * Set whether this variable is const to correspond to the given value. | 3628 * Set whether this variable is const to correspond to the given value. |
| 3427 * @param isConst {@code true} if the variable is const | 3629 * @param isConst {@code true} if the variable is const |
| 3428 */ | 3630 */ |
| 3429 void set const2(bool isConst) { | 3631 void set const2(bool isConst) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 3458 safelyVisitChild(_initializer, visitor); | 3660 safelyVisitChild(_initializer, visitor); |
| 3459 } | 3661 } |
| 3460 void appendTo(JavaStringBuilder builder) { | 3662 void appendTo(JavaStringBuilder builder) { |
| 3461 builder.append(type); | 3663 builder.append(type); |
| 3462 builder.append(" "); | 3664 builder.append(" "); |
| 3463 builder.append(name); | 3665 builder.append(name); |
| 3464 } | 3666 } |
| 3465 } | 3667 } |
| 3466 /** | 3668 /** |
| 3467 * The unique instance of the class {@code BottomTypeImpl} implements the type {
@code bottom}. | 3669 * The unique instance of the class {@code BottomTypeImpl} implements the type {
@code bottom}. |
| 3670 * @coverage dart.engine.type |
| 3468 */ | 3671 */ |
| 3469 class BottomTypeImpl extends TypeImpl { | 3672 class BottomTypeImpl extends TypeImpl { |
| 3470 /** | 3673 /** |
| 3471 * The unique instance of this class. | 3674 * The unique instance of this class. |
| 3472 */ | 3675 */ |
| 3473 static BottomTypeImpl _INSTANCE = new BottomTypeImpl(); | 3676 static BottomTypeImpl _INSTANCE = new BottomTypeImpl(); |
| 3474 /** | 3677 /** |
| 3475 * Return the unique instance of this class. | 3678 * Return the unique instance of this class. |
| 3476 * @return the unique instance of this class | 3679 * @return the unique instance of this class |
| 3477 */ | 3680 */ |
| 3478 static BottomTypeImpl get instance => _INSTANCE; | 3681 static BottomTypeImpl get instance => _INSTANCE; |
| 3479 /** | 3682 /** |
| 3480 * Prevent the creation of instances of this class. | 3683 * Prevent the creation of instances of this class. |
| 3481 */ | 3684 */ |
| 3482 BottomTypeImpl() : super(null, "<bottom>") { | 3685 BottomTypeImpl() : super(null, "<bottom>") { |
| 3483 } | 3686 } |
| 3484 bool operator ==(Object object) => identical(object, this); | 3687 bool operator ==(Object object) => identical(object, this); |
| 3485 bool isMoreSpecificThan(Type2 type) => true; | 3688 bool isMoreSpecificThan(Type2 type) => true; |
| 3486 bool isSubtypeOf(Type2 type) => true; | 3689 bool isSubtypeOf(Type2 type) => true; |
| 3487 bool isSupertypeOf(Type2 type) => false; | 3690 bool isSupertypeOf(Type2 type) => false; |
| 3488 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp
es) => this; | 3691 BottomTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTyp
es) => this; |
| 3489 } | 3692 } |
| 3490 /** | 3693 /** |
| 3491 * The unique instance of the class {@code DynamicTypeImpl} implements the type
{@code dynamic}. | 3694 * The unique instance of the class {@code DynamicTypeImpl} implements the type
{@code dynamic}. |
| 3695 * @coverage dart.engine.type |
| 3492 */ | 3696 */ |
| 3493 class DynamicTypeImpl extends TypeImpl { | 3697 class DynamicTypeImpl extends TypeImpl { |
| 3494 /** | 3698 /** |
| 3495 * The unique instance of this class. | 3699 * The unique instance of this class. |
| 3496 */ | 3700 */ |
| 3497 static DynamicTypeImpl _INSTANCE = new DynamicTypeImpl(); | 3701 static DynamicTypeImpl _INSTANCE = new DynamicTypeImpl(); |
| 3498 /** | 3702 /** |
| 3499 * Return the unique instance of this class. | 3703 * Return the unique instance of this class. |
| 3500 * @return the unique instance of this class | 3704 * @return the unique instance of this class |
| 3501 */ | 3705 */ |
| 3502 static DynamicTypeImpl get instance => _INSTANCE; | 3706 static DynamicTypeImpl get instance => _INSTANCE; |
| 3503 /** | 3707 /** |
| 3504 * Prevent the creation of instances of this class. | 3708 * Prevent the creation of instances of this class. |
| 3505 */ | 3709 */ |
| 3506 DynamicTypeImpl() : super(new DynamicElementImpl(), Keyword.DYNAMIC.syntax) { | 3710 DynamicTypeImpl() : super(new DynamicElementImpl(), Keyword.DYNAMIC.syntax) { |
| 3507 ((element as DynamicElementImpl)).type = this; | 3711 ((element as DynamicElementImpl)).type = this; |
| 3508 } | 3712 } |
| 3509 bool operator ==(Object object) => object is DynamicTypeImpl; | 3713 bool operator ==(Object object) => object is DynamicTypeImpl; |
| 3510 bool isDynamic() => true; | 3714 bool isDynamic() => true; |
| 3511 bool isMoreSpecificThan(Type2 type) => false; | 3715 bool isMoreSpecificThan(Type2 type) => false; |
| 3512 bool isSubtypeOf(Type2 type) => identical(this, type); | 3716 bool isSubtypeOf(Type2 type) => identical(this, type); |
| 3513 bool isSupertypeOf(Type2 type) => true; | 3717 bool isSupertypeOf(Type2 type) => true; |
| 3514 DynamicTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTy
pes) => this; | 3718 DynamicTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterTy
pes) => this; |
| 3515 } | 3719 } |
| 3516 /** | 3720 /** |
| 3517 * Instances of the class {@code FunctionTypeImpl} defines the behavior common t
o objects | 3721 * Instances of the class {@code FunctionTypeImpl} defines the behavior common t
o objects |
| 3518 * representing the type of a function, method, constructor, getter, or setter. | 3722 * representing the type of a function, method, constructor, getter, or setter. |
| 3723 * @coverage dart.engine.type |
| 3519 */ | 3724 */ |
| 3520 class FunctionTypeImpl extends TypeImpl implements FunctionType { | 3725 class FunctionTypeImpl extends TypeImpl implements FunctionType { |
| 3521 /** | 3726 /** |
| 3522 * Return {@code true} if all of the name/type pairs in the first map are equa
l to the | 3727 * Return {@code true} if all of the name/type pairs in the first map are equa
l to the |
| 3523 * corresponding name/type pairs in the second map. The maps are expected to i
terate over their | 3728 * corresponding name/type pairs in the second map. The maps are expected to i
terate over their |
| 3524 * entries in the same order in which those entries were added to the map. | 3729 * entries in the same order in which those entries were added to the map. |
| 3525 * @param firstTypes the first map of name/type pairs being compared | 3730 * @param firstTypes the first map of name/type pairs being compared |
| 3526 * @param secondTypes the second map of name/type pairs being compared | 3731 * @param secondTypes the second map of name/type pairs being compared |
| 3527 * @return {@code true} if all of the name/type pairs in the first map are equ
al to the | 3732 * @return {@code true} if all of the name/type pairs in the first map are equ
al to the |
| 3528 * corresponding name/type pairs in the second map | 3733 * corresponding name/type pairs in the second map |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3584 /** | 3789 /** |
| 3585 * The type of object returned by this type of function. | 3790 * The type of object returned by this type of function. |
| 3586 */ | 3791 */ |
| 3587 Type2 _returnType = VoidTypeImpl.instance; | 3792 Type2 _returnType = VoidTypeImpl.instance; |
| 3588 /** | 3793 /** |
| 3589 * Initialize a newly created function type to be declared by the given elemen
t and to have the | 3794 * Initialize a newly created function type to be declared by the given elemen
t and to have the |
| 3590 * given name. | 3795 * given name. |
| 3591 * @param element the element representing the declaration of the function typ
e | 3796 * @param element the element representing the declaration of the function typ
e |
| 3592 */ | 3797 */ |
| 3593 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n
ull ? null : element.name) { | 3798 FunctionTypeImpl.con1(ExecutableElement element) : super(element, element == n
ull ? null : element.name) { |
| 3594 _jtd_constructor_242_impl(element); | 3799 _jtd_constructor_248_impl(element); |
| 3595 } | 3800 } |
| 3596 _jtd_constructor_242_impl(ExecutableElement element) { | 3801 _jtd_constructor_248_impl(ExecutableElement element) { |
| 3597 } | 3802 } |
| 3598 /** | 3803 /** |
| 3599 * Initialize a newly created function type to be declared by the given elemen
t and to have the | 3804 * Initialize a newly created function type to be declared by the given elemen
t and to have the |
| 3600 * given name. | 3805 * given name. |
| 3601 * @param element the element representing the declaration of the function typ
e | 3806 * @param element the element representing the declaration of the function typ
e |
| 3602 */ | 3807 */ |
| 3603 FunctionTypeImpl.con2(TypeAliasElement element) : super(element, element == nu
ll ? null : element.name) { | 3808 FunctionTypeImpl.con2(TypeAliasElement element) : super(element, element == nu
ll ? null : element.name) { |
| 3604 _jtd_constructor_243_impl(element); | 3809 _jtd_constructor_249_impl(element); |
| 3605 } | 3810 } |
| 3606 _jtd_constructor_243_impl(TypeAliasElement element) { | 3811 _jtd_constructor_249_impl(TypeAliasElement element) { |
| 3607 } | 3812 } |
| 3608 bool operator ==(Object object) { | 3813 bool operator ==(Object object) { |
| 3609 if (object is! FunctionTypeImpl) { | 3814 if (object is! FunctionTypeImpl) { |
| 3610 return false; | 3815 return false; |
| 3611 } | 3816 } |
| 3612 FunctionTypeImpl otherType = object as FunctionTypeImpl; | 3817 FunctionTypeImpl otherType = object as FunctionTypeImpl; |
| 3613 return element == otherType.element && JavaArrays.equals(_normalParameterTyp
es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType
s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType
._namedParameterTypes); | 3818 return element == otherType.element && JavaArrays.equals(_normalParameterTyp
es, otherType._normalParameterTypes) && JavaArrays.equals(_optionalParameterType
s, otherType._optionalParameterTypes) && equals2(_namedParameterTypes, otherType
._namedParameterTypes); |
| 3614 } | 3819 } |
| 3615 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; | 3820 Map<String, Type2> get namedParameterTypes => _namedParameterTypes; |
| 3616 List<Type2> get normalParameterTypes => _normalParameterTypes; | 3821 List<Type2> get normalParameterTypes => _normalParameterTypes; |
| 3617 List<Type2> get optionalParameterTypes => _optionalParameterTypes; | 3822 List<Type2> get optionalParameterTypes => _optionalParameterTypes; |
| 3618 Type2 get returnType => _returnType; | 3823 Type2 get returnType => _returnType; |
| 3619 List<Type2> get typeArguments => _typeArguments; | 3824 List<Type2> get typeArguments => _typeArguments; |
| 3620 int get hashCode { | 3825 int get hashCode { |
| 3621 Element element37 = element; | 3826 Element element39 = element; |
| 3622 if (element37 == null) { | 3827 if (element39 == null) { |
| 3623 return 0; | 3828 return 0; |
| 3624 } | 3829 } |
| 3625 return element37.hashCode; | 3830 return element39.hashCode; |
| 3626 } | 3831 } |
| 3627 bool isSubtypeOf(Type2 type) { | 3832 bool isSubtypeOf(Type2 type) { |
| 3628 if (type == null) { | 3833 if (type == null) { |
| 3629 return false; | 3834 return false; |
| 3630 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct
ion()) { | 3835 } else if (identical(this, type) || type.isDynamic() || type.isDartCoreFunct
ion()) { |
| 3631 return true; | 3836 return true; |
| 3632 } else if (type is! FunctionType) { | 3837 } else if (type is! FunctionType) { |
| 3633 return false; | 3838 return false; |
| 3634 } else if (this == type) { | 3839 } else if (this == type) { |
| 3635 return true; | 3840 return true; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3726 this._typeArguments = typeArguments4; | 3931 this._typeArguments = typeArguments4; |
| 3727 } | 3932 } |
| 3728 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); | 3933 FunctionTypeImpl substitute4(List<Type2> argumentTypes) => substitute2(argumen
tTypes, typeArguments); |
| 3729 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { | 3934 FunctionTypeImpl substitute2(List<Type2> argumentTypes, List<Type2> parameterT
ypes) { |
| 3730 if (argumentTypes.length != parameterTypes.length) { | 3935 if (argumentTypes.length != parameterTypes.length) { |
| 3731 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); | 3936 throw new IllegalArgumentException("argumentTypes.length (${argumentTypes.
length}) != parameterTypes.length (${parameterTypes.length})"); |
| 3732 } | 3937 } |
| 3733 if (argumentTypes.length == 0) { | 3938 if (argumentTypes.length == 0) { |
| 3734 return this; | 3939 return this; |
| 3735 } | 3940 } |
| 3736 Element element38 = element; | 3941 Element element40 = element; |
| 3737 FunctionTypeImpl newType = (element38 is ExecutableElement) ? new FunctionTy
peImpl.con1((element38 as ExecutableElement)) : new FunctionTypeImpl.con2((eleme
nt38 as TypeAliasElement)); | 3942 FunctionTypeImpl newType = (element40 is ExecutableElement) ? new FunctionTy
peImpl.con1((element40 as ExecutableElement)) : new FunctionTypeImpl.con2((eleme
nt40 as TypeAliasElement)); |
| 3738 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes); | 3943 newType.returnType = _returnType.substitute2(argumentTypes, parameterTypes); |
| 3739 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar
gumentTypes, parameterTypes); | 3944 newType.normalParameterTypes = TypeImpl.substitute(_normalParameterTypes, ar
gumentTypes, parameterTypes); |
| 3740 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes
, argumentTypes, parameterTypes); | 3945 newType.optionalParameterTypes = TypeImpl.substitute(_optionalParameterTypes
, argumentTypes, parameterTypes); |
| 3741 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp
es, parameterTypes); | 3946 newType._namedParameterTypes = substitute3(_namedParameterTypes, argumentTyp
es, parameterTypes); |
| 3742 return newType; | 3947 return newType; |
| 3743 } | 3948 } |
| 3744 void appendTo(JavaStringBuilder builder) { | 3949 void appendTo(JavaStringBuilder builder) { |
| 3745 builder.append("("); | 3950 builder.append("("); |
| 3746 bool needsComma = false; | 3951 bool needsComma = false; |
| 3747 if (_normalParameterTypes.length > 0) { | 3952 if (_normalParameterTypes.length > 0) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3795 builder.append("null"); | 4000 builder.append("null"); |
| 3796 } else { | 4001 } else { |
| 3797 ((_returnType as TypeImpl)).appendTo(builder); | 4002 ((_returnType as TypeImpl)).appendTo(builder); |
| 3798 } | 4003 } |
| 3799 } | 4004 } |
| 3800 } | 4005 } |
| 3801 /** | 4006 /** |
| 3802 * Instances of the class {@code InterfaceTypeImpl} defines the behavior common
to objects | 4007 * Instances of the class {@code InterfaceTypeImpl} defines the behavior common
to objects |
| 3803 * representing the type introduced by either a class or an interface, or a refe
rence to such a | 4008 * representing the type introduced by either a class or an interface, or a refe
rence to such a |
| 3804 * type. | 4009 * type. |
| 4010 * @coverage dart.engine.type |
| 3805 */ | 4011 */ |
| 3806 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { | 4012 class InterfaceTypeImpl extends TypeImpl implements InterfaceType { |
| 3807 /** | 4013 /** |
| 3808 * An empty array of types. | 4014 * An empty array of types. |
| 3809 */ | 4015 */ |
| 3810 static List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>(0); | 4016 static List<InterfaceType> EMPTY_ARRAY = new List<InterfaceType>(0); |
| 3811 /** | 4017 /** |
| 3812 * This method computes the longest inheritance path from some passed {@link T
ype} to Object. | 4018 * This method computes the longest inheritance path from some passed {@link T
ype} to Object. |
| 3813 * @param type the {@link Type} to compute the longest inheritance path of fro
m the passed{@link Type} to Object | 4019 * @param type the {@link Type} to compute the longest inheritance path of fro
m the passed{@link Type} to Object |
| 3814 * @return the computed longest inheritance path to Object | 4020 * @return the computed longest inheritance path to Object |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3859 /** | 4065 /** |
| 3860 * Returns the set of all superinterfaces of the passed {@link Type}. This is
a recursive method, | 4066 * Returns the set of all superinterfaces of the passed {@link Type}. This is
a recursive method, |
| 3861 * callers should call the public {@link #computeSuperinterfaceSet(Type)}. | 4067 * callers should call the public {@link #computeSuperinterfaceSet(Type)}. |
| 3862 * @param type the {@link Type} to compute the set of superinterfaces of | 4068 * @param type the {@link Type} to compute the set of superinterfaces of |
| 3863 * @param set a {@link HashSet} used recursively by this method | 4069 * @param set a {@link HashSet} used recursively by this method |
| 3864 * @return the {@link Set} of superinterfaces of the passed {@link Type} | 4070 * @return the {@link Set} of superinterfaces of the passed {@link Type} |
| 3865 * @see #computeSuperinterfaceSet(Type) | 4071 * @see #computeSuperinterfaceSet(Type) |
| 3866 * @see #getLeastUpperBound(Type) | 4072 * @see #getLeastUpperBound(Type) |
| 3867 */ | 4073 */ |
| 3868 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In
terfaceType> set) { | 4074 static Set<InterfaceType> computeSuperinterfaceSet2(InterfaceType type, Set<In
terfaceType> set) { |
| 3869 Element element39 = type.element; | 4075 Element element41 = type.element; |
| 3870 if (element39 != null && element39 is ClassElement) { | 4076 if (element41 != null && element41 is ClassElement) { |
| 3871 ClassElement classElement = element39 as ClassElement; | 4077 ClassElement classElement = element41 as ClassElement; |
| 3872 List<InterfaceType> superinterfaces = classElement.interfaces; | 4078 List<InterfaceType> superinterfaces = classElement.interfaces; |
| 3873 for (InterfaceType superinterface in superinterfaces) { | 4079 for (InterfaceType superinterface in superinterfaces) { |
| 3874 javaSetAdd(set, superinterface); | 4080 javaSetAdd(set, superinterface); |
| 3875 computeSuperinterfaceSet2(superinterface, set); | 4081 computeSuperinterfaceSet2(superinterface, set); |
| 3876 } | 4082 } |
| 3877 InterfaceType supertype4 = classElement.supertype; | 4083 InterfaceType supertype4 = classElement.supertype; |
| 3878 if (supertype4 != null) { | 4084 if (supertype4 != null) { |
| 3879 javaSetAdd(set, supertype4); | 4085 javaSetAdd(set, supertype4); |
| 3880 computeSuperinterfaceSet2(supertype4, set); | 4086 computeSuperinterfaceSet2(supertype4, set); |
| 3881 } | 4087 } |
| 3882 } | 4088 } |
| 3883 return set; | 4089 return set; |
| 3884 } | 4090 } |
| 3885 /** | 4091 /** |
| 3886 * An array containing the actual types of the type arguments. | 4092 * An array containing the actual types of the type arguments. |
| 3887 */ | 4093 */ |
| 3888 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; | 4094 List<Type2> _typeArguments = TypeImpl.EMPTY_ARRAY; |
| 3889 /** | 4095 /** |
| 3890 * Initialize a newly created type to be declared by the given element. | 4096 * Initialize a newly created type to be declared by the given element. |
| 3891 * @param element the element representing the declaration of the type | 4097 * @param element the element representing the declaration of the type |
| 3892 */ | 4098 */ |
| 3893 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) { | 4099 InterfaceTypeImpl.con1(ClassElement element) : super(element, element.name) { |
| 3894 _jtd_constructor_244_impl(element); | 4100 _jtd_constructor_250_impl(element); |
| 3895 } | 4101 } |
| 3896 _jtd_constructor_244_impl(ClassElement element) { | 4102 _jtd_constructor_250_impl(ClassElement element) { |
| 3897 } | 4103 } |
| 3898 /** | 4104 /** |
| 3899 * Initialize a newly created type to have the given name. This constructor sh
ould only be used in | 4105 * Initialize a newly created type to have the given name. This constructor sh
ould only be used in |
| 3900 * cases where there is no declaration of the type. | 4106 * cases where there is no declaration of the type. |
| 3901 * @param name the name of the type | 4107 * @param name the name of the type |
| 3902 */ | 4108 */ |
| 3903 InterfaceTypeImpl.con2(String name) : super(null, name) { | 4109 InterfaceTypeImpl.con2(String name) : super(null, name) { |
| 3904 _jtd_constructor_245_impl(name); | 4110 _jtd_constructor_251_impl(name); |
| 3905 } | 4111 } |
| 3906 _jtd_constructor_245_impl(String name) { | 4112 _jtd_constructor_251_impl(String name) { |
| 3907 } | 4113 } |
| 3908 bool operator ==(Object object) { | 4114 bool operator ==(Object object) { |
| 3909 if (object is! InterfaceTypeImpl) { | 4115 if (object is! InterfaceTypeImpl) { |
| 3910 return false; | 4116 return false; |
| 3911 } | 4117 } |
| 3912 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; | 4118 InterfaceTypeImpl otherType = object as InterfaceTypeImpl; |
| 3913 return element == otherType.element && JavaArrays.equals(_typeArguments, oth
erType._typeArguments); | 4119 return element == otherType.element && JavaArrays.equals(_typeArguments, oth
erType._typeArguments); |
| 3914 } | 4120 } |
| 3915 ClassElement get element => super.element as ClassElement; | 4121 ClassElement get element => super.element as ClassElement; |
| 3916 Type2 getLeastUpperBound(Type2 type) { | 4122 Type2 getLeastUpperBound(Type2 type) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3952 } | 4158 } |
| 3953 } | 4159 } |
| 3954 return null; | 4160 return null; |
| 3955 } | 4161 } |
| 3956 Type2 get superclass { | 4162 Type2 get superclass { |
| 3957 ClassElement classElement = element; | 4163 ClassElement classElement = element; |
| 3958 return element.supertype.substitute2(_typeArguments, TypeVariableTypeImpl.ge
tTypes(classElement.typeVariables)); | 4164 return element.supertype.substitute2(_typeArguments, TypeVariableTypeImpl.ge
tTypes(classElement.typeVariables)); |
| 3959 } | 4165 } |
| 3960 List<Type2> get typeArguments => _typeArguments; | 4166 List<Type2> get typeArguments => _typeArguments; |
| 3961 int get hashCode { | 4167 int get hashCode { |
| 3962 ClassElement element40 = element; | 4168 ClassElement element42 = element; |
| 3963 if (element40 == null) { | 4169 if (element42 == null) { |
| 3964 return 0; | 4170 return 0; |
| 3965 } | 4171 } |
| 3966 return element40.hashCode; | 4172 return element42.hashCode; |
| 3967 } | 4173 } |
| 3968 bool isDartCoreFunction() { | 4174 bool isDartCoreFunction() { |
| 3969 ClassElement element41 = element; | 4175 ClassElement element43 = element; |
| 3970 if (element41 == null) { | 4176 if (element43 == null) { |
| 3971 return false; | 4177 return false; |
| 3972 } | 4178 } |
| 3973 return element41.name == "Function" && element41.library.isDartCore(); | 4179 return element43.name == "Function" && element43.library.isDartCore(); |
| 3974 } | 4180 } |
| 3975 bool isDirectSupertypeOf(InterfaceType type) { | 4181 bool isDirectSupertypeOf(InterfaceType type) { |
| 3976 ClassElement i = element; | 4182 ClassElement i = element; |
| 3977 ClassElement j = type.element; | 4183 ClassElement j = type.element; |
| 3978 InterfaceType supertype5 = j.supertype; | 4184 InterfaceType supertype5 = j.supertype; |
| 3979 if (supertype5 == null) { | 4185 if (supertype5 == null) { |
| 3980 return false; | 4186 return false; |
| 3981 } | 4187 } |
| 3982 ClassElement supertypeElement = supertype5.element; | 4188 ClassElement supertypeElement = supertype5.element; |
| 3983 if (supertypeElement == i) { | 4189 if (supertypeElement == i) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4108 } | 4314 } |
| 4109 ((_typeArguments[i] as TypeImpl)).appendTo(builder); | 4315 ((_typeArguments[i] as TypeImpl)).appendTo(builder); |
| 4110 } | 4316 } |
| 4111 builder.append(">"); | 4317 builder.append(">"); |
| 4112 } | 4318 } |
| 4113 } | 4319 } |
| 4114 } | 4320 } |
| 4115 /** | 4321 /** |
| 4116 * The abstract class {@code TypeImpl} implements the behavior common to objects
representing the | 4322 * The abstract class {@code TypeImpl} implements the behavior common to objects
representing the |
| 4117 * declared type of elements in the element model. | 4323 * declared type of elements in the element model. |
| 4324 * @coverage dart.engine.type |
| 4118 */ | 4325 */ |
| 4119 abstract class TypeImpl implements Type2 { | 4326 abstract class TypeImpl implements Type2 { |
| 4120 /** | 4327 /** |
| 4121 * Return an array containing the results of using the given argument types an
d parameter types to | 4328 * Return an array containing the results of using the given argument types an
d parameter types to |
| 4122 * perform a substitution on all of the given types. | 4329 * perform a substitution on all of the given types. |
| 4123 * @param types the types on which a substitution is to be performed | 4330 * @param types the types on which a substitution is to be performed |
| 4124 * @param argumentTypes the argument types for the substitution | 4331 * @param argumentTypes the argument types for the substitution |
| 4125 * @param parameterTypes the parameter types for the substitution | 4332 * @param parameterTypes the parameter types for the substitution |
| 4126 * @return the result of performing the substitution on each of the types | 4333 * @return the result of performing the substitution on each of the types |
| 4127 */ | 4334 */ |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4180 if (_name == null) { | 4387 if (_name == null) { |
| 4181 builder.append("<unnamed type>"); | 4388 builder.append("<unnamed type>"); |
| 4182 } else { | 4389 } else { |
| 4183 builder.append(_name); | 4390 builder.append(_name); |
| 4184 } | 4391 } |
| 4185 } | 4392 } |
| 4186 } | 4393 } |
| 4187 /** | 4394 /** |
| 4188 * Instances of the class {@code TypeVariableTypeImpl} defines the behavior of o
bjects representing | 4395 * Instances of the class {@code TypeVariableTypeImpl} defines the behavior of o
bjects representing |
| 4189 * the type introduced by a type variable. | 4396 * the type introduced by a type variable. |
| 4397 * @coverage dart.engine.type |
| 4190 */ | 4398 */ |
| 4191 class TypeVariableTypeImpl extends TypeImpl implements TypeVariableType { | 4399 class TypeVariableTypeImpl extends TypeImpl implements TypeVariableType { |
| 4192 /** | 4400 /** |
| 4193 * Return an array containing the type variable types defined by the given arr
ay of type variable | 4401 * Return an array containing the type variable types defined by the given arr
ay of type variable |
| 4194 * elements. | 4402 * elements. |
| 4195 * @param typeVariables the type variable elements defining the type variable
types to be returned | 4403 * @param typeVariables the type variable elements defining the type variable
types to be returned |
| 4196 * @return the type variable types defined by the type variable elements | 4404 * @return the type variable types defined by the type variable elements |
| 4197 */ | 4405 */ |
| 4198 static List<TypeVariableType> getTypes(List<TypeVariableElement> typeVariables
) { | 4406 static List<TypeVariableType> getTypes(List<TypeVariableElement> typeVariables
) { |
| 4199 int count = typeVariables.length; | 4407 int count = typeVariables.length; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 4223 for (int i = 0; i < length7; i++) { | 4431 for (int i = 0; i < length7; i++) { |
| 4224 if (parameterTypes[i] == this) { | 4432 if (parameterTypes[i] == this) { |
| 4225 return argumentTypes[i]; | 4433 return argumentTypes[i]; |
| 4226 } | 4434 } |
| 4227 } | 4435 } |
| 4228 return this; | 4436 return this; |
| 4229 } | 4437 } |
| 4230 } | 4438 } |
| 4231 /** | 4439 /** |
| 4232 * The unique instance of the class {@code VoidTypeImpl} implements the type {@c
ode void}. | 4440 * The unique instance of the class {@code VoidTypeImpl} implements the type {@c
ode void}. |
| 4441 * @coverage dart.engine.type |
| 4233 */ | 4442 */ |
| 4234 class VoidTypeImpl extends TypeImpl implements VoidType { | 4443 class VoidTypeImpl extends TypeImpl implements VoidType { |
| 4235 /** | 4444 /** |
| 4236 * The unique instance of this class. | 4445 * The unique instance of this class. |
| 4237 */ | 4446 */ |
| 4238 static VoidTypeImpl _INSTANCE = new VoidTypeImpl(); | 4447 static VoidTypeImpl _INSTANCE = new VoidTypeImpl(); |
| 4239 /** | 4448 /** |
| 4240 * Return the unique instance of this class. | 4449 * Return the unique instance of this class. |
| 4241 * @return the unique instance of this class | 4450 * @return the unique instance of this class |
| 4242 */ | 4451 */ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4257 * <ol> | 4466 * <ol> |
| 4258 * <li>The types of functions that only have required parameters. These have the
general form | 4467 * <li>The types of functions that only have required parameters. These have the
general form |
| 4259 * <i>(T<sub>1</sub>, …, T<sub>n</sub>) → T</i>.</li> | 4468 * <i>(T<sub>1</sub>, …, T<sub>n</sub>) → T</i>.</li> |
| 4260 * <li>The types of functions with optional positional parameters. These have th
e general form | 4469 * <li>The types of functions with optional positional parameters. These have th
e general form |
| 4261 * <i>(T<sub>1</sub>, …, T<sub>n</sub>, [T<sub>n+1</sub>, …, T<sub
>n+k</sub>]) → | 4470 * <i>(T<sub>1</sub>, …, T<sub>n</sub>, [T<sub>n+1</sub>, …, T<sub
>n+k</sub>]) → |
| 4262 * T</i>.</li> | 4471 * T</i>.</li> |
| 4263 * <li>The types of functions with named positional parameters. These have the g
eneral form | 4472 * <li>The types of functions with named positional parameters. These have the g
eneral form |
| 4264 * <i>(T<sub>1</sub>, …, T<sub>n</sub>, {T<sub>x1</sub> x1, …, T<s
ub>xk</sub> xk}) | 4473 * <i>(T<sub>1</sub>, …, T<sub>n</sub>, {T<sub>x1</sub> x1, …, T<s
ub>xk</sub> xk}) |
| 4265 * → T</i>.</li> | 4474 * → T</i>.</li> |
| 4266 * </ol> | 4475 * </ol> |
| 4476 * @coverage dart.engine.type |
| 4267 */ | 4477 */ |
| 4268 abstract class FunctionType implements Type2 { | 4478 abstract class FunctionType implements Type2 { |
| 4269 /** | 4479 /** |
| 4270 * Return a map from the names of named parameters to the types of the named p
arameters of this | 4480 * Return a map from the names of named parameters to the types of the named p
arameters of this |
| 4271 * type of function. The entries in the map will be iterated in the same order
as the order in | 4481 * type of function. The entries in the map will be iterated in the same order
as the order in |
| 4272 * which the named parameters were defined. If there were no named parameters
declared then the | 4482 * which the named parameters were defined. If there were no named parameters
declared then the |
| 4273 * map will be empty. | 4483 * map will be empty. |
| 4274 * @return a map from the name to the types of the named parameters of this ty
pe of function | 4484 * @return a map from the name to the types of the named parameters of this ty
pe of function |
| 4275 */ | 4485 */ |
| 4276 Map<String, Type2> get namedParameterTypes; | 4486 Map<String, Type2> get namedParameterTypes; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4371 * This is fully equivalent to {@code substitute(argumentTypes, getTypeArgumen
ts())}. | 4581 * This is fully equivalent to {@code substitute(argumentTypes, getTypeArgumen
ts())}. |
| 4372 * @param argumentTypes the actual type arguments being substituted for the ty
pe parameters | 4582 * @param argumentTypes the actual type arguments being substituted for the ty
pe parameters |
| 4373 * @return the result of performing the substitution | 4583 * @return the result of performing the substitution |
| 4374 */ | 4584 */ |
| 4375 FunctionType substitute4(List<Type2> argumentTypes); | 4585 FunctionType substitute4(List<Type2> argumentTypes); |
| 4376 FunctionType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes
); | 4586 FunctionType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes
); |
| 4377 } | 4587 } |
| 4378 /** | 4588 /** |
| 4379 * The interface {@code InterfaceType} defines the behavior common to objects re
presenting the type | 4589 * The interface {@code InterfaceType} defines the behavior common to objects re
presenting the type |
| 4380 * introduced by either a class or an interface, or a reference to such a type. | 4590 * introduced by either a class or an interface, or a reference to such a type. |
| 4591 * @coverage dart.engine.type |
| 4381 */ | 4592 */ |
| 4382 abstract class InterfaceType implements Type2 { | 4593 abstract class InterfaceType implements Type2 { |
| 4383 ClassElement get element; | 4594 ClassElement get element; |
| 4384 /** | 4595 /** |
| 4385 * Return the least upper bound of this type and the given type, or {@code nul
l} if there is no | 4596 * Return the least upper bound of this type and the given type, or {@code nul
l} if there is no |
| 4386 * least upper bound. | 4597 * least upper bound. |
| 4387 * <p> | 4598 * <p> |
| 4388 * Given two interfaces <i>I</i> and <i>J</i>, let <i>S<sub>I</sub></i> be the
set of | 4599 * Given two interfaces <i>I</i> and <i>J</i>, let <i>S<sub>I</sub></i> be the
set of |
| 4389 * superinterfaces of <i>I<i>, let <i>S<sub>J</sub></i> be the set of superint
erfaces of <i>J</i> | 4600 * superinterfaces of <i>I<i>, let <i>S<sub>J</sub></i> be the set of superint
erfaces of <i>J</i> |
| 4390 * and let <i>S = (I ∪ S<sub>I</sub>) ∩ (J ∪ S<sub>J</sub>)</i>. F
urthermore, we | 4601 * and let <i>S = (I ∪ S<sub>I</sub>) ∩ (J ∪ S<sub>J</sub>)</i>. F
urthermore, we |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4462 * This is fully equivalent to {@code substitute(argumentTypes, getTypeArgumen
ts())}. | 4673 * This is fully equivalent to {@code substitute(argumentTypes, getTypeArgumen
ts())}. |
| 4463 * @param argumentTypes the actual type arguments being substituted for the ty
pe parameters | 4674 * @param argumentTypes the actual type arguments being substituted for the ty
pe parameters |
| 4464 * @return the result of performing the substitution | 4675 * @return the result of performing the substitution |
| 4465 */ | 4676 */ |
| 4466 InterfaceType substitute5(List<Type2> argumentTypes); | 4677 InterfaceType substitute5(List<Type2> argumentTypes); |
| 4467 InterfaceType substitute2(List<Type2> argumentTypes, List<Type2> parameterType
s); | 4678 InterfaceType substitute2(List<Type2> argumentTypes, List<Type2> parameterType
s); |
| 4468 } | 4679 } |
| 4469 /** | 4680 /** |
| 4470 * The interface {@code Type} defines the behavior of objects representing the d
eclared type of | 4681 * The interface {@code Type} defines the behavior of objects representing the d
eclared type of |
| 4471 * elements in the element model. | 4682 * elements in the element model. |
| 4683 * @coverage dart.engine.type |
| 4472 */ | 4684 */ |
| 4473 abstract class Type2 { | 4685 abstract class Type2 { |
| 4474 /** | 4686 /** |
| 4475 * Return the element representing the declaration of this type, or {@code nul
l} if the type has | 4687 * Return the element representing the declaration of this type, or {@code nul
l} if the type has |
| 4476 * not, or cannot, be associated with an element. The former case will occur i
f the element model | 4688 * not, or cannot, be associated with an element. The former case will occur i
f the element model |
| 4477 * is not yet complete; the latter case will occur if this object represents a
n undefined type. | 4689 * is not yet complete; the latter case will occur if this object represents a
n undefined type. |
| 4478 * @return the element representing the declaration of this type | 4690 * @return the element representing the declaration of this type |
| 4479 */ | 4691 */ |
| 4480 Element get element; | 4692 Element get element; |
| 4481 /** | 4693 /** |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4545 * directly. | 4757 * directly. |
| 4546 * @param argumentTypes the actual type arguments being substituted for the pa
rameters | 4758 * @param argumentTypes the actual type arguments being substituted for the pa
rameters |
| 4547 * @param parameterTypes the parameters to be replaced | 4759 * @param parameterTypes the parameters to be replaced |
| 4548 * @return the result of performing the substitution | 4760 * @return the result of performing the substitution |
| 4549 */ | 4761 */ |
| 4550 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 4762 Type2 substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 4551 } | 4763 } |
| 4552 /** | 4764 /** |
| 4553 * The interface {@code TypeVariableType} defines the behavior of objects repres
enting the type | 4765 * The interface {@code TypeVariableType} defines the behavior of objects repres
enting the type |
| 4554 * introduced by a type variable. | 4766 * introduced by a type variable. |
| 4767 * @coverage dart.engine.type |
| 4555 */ | 4768 */ |
| 4556 abstract class TypeVariableType implements Type2 { | 4769 abstract class TypeVariableType implements Type2 { |
| 4557 TypeVariableElement get element; | 4770 TypeVariableElement get element; |
| 4558 } | 4771 } |
| 4559 /** | 4772 /** |
| 4560 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. | 4773 * The interface {@code VoidType} defines the behavior of the unique object repr
esenting the type{@code void}. |
| 4774 * @coverage dart.engine.type |
| 4561 */ | 4775 */ |
| 4562 abstract class VoidType implements Type2 { | 4776 abstract class VoidType implements Type2 { |
| 4563 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 4777 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 4564 } | 4778 } |
| OLD | NEW |