| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.element; | 8 library engine.element; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 List<String> get hiddenNames; | 1147 List<String> get hiddenNames; |
| 1148 } | 1148 } |
| 1149 | 1149 |
| 1150 /** | 1150 /** |
| 1151 * The interface `HtmlElement` defines the behavior of elements representing an
HTML file. | 1151 * The interface `HtmlElement` defines the behavior of elements representing an
HTML file. |
| 1152 * | 1152 * |
| 1153 * @coverage dart.engine.element | 1153 * @coverage dart.engine.element |
| 1154 */ | 1154 */ |
| 1155 abstract class HtmlElement implements Element { | 1155 abstract class HtmlElement implements Element { |
| 1156 /** | 1156 /** |
| 1157 * Return the [CompilationUnitElement] associated with this Angular HTML file,
maybe |
| 1158 * `null` if not an Angular file. |
| 1159 */ |
| 1160 CompilationUnitElement get angularCompilationUnit; |
| 1161 |
| 1162 /** |
| 1157 * Return an array containing all of the script elements contained in the HTML
file. This includes | 1163 * Return an array containing all of the script elements contained in the HTML
file. This includes |
| 1158 * scripts with libraries that are defined by the content of a script tag as w
ell as libraries | 1164 * scripts with libraries that are defined by the content of a script tag as w
ell as libraries |
| 1159 * that are referenced in the {@core source} attribute of a script tag. | 1165 * that are referenced in the {@core source} attribute of a script tag. |
| 1160 * | 1166 * |
| 1161 * @return the script elements in the HTML file (not `null`, contains no `null
`s) | 1167 * @return the script elements in the HTML file (not `null`, contains no `null
`s) |
| 1162 */ | 1168 */ |
| 1163 List<HtmlScriptElement> get scripts; | 1169 List<HtmlScriptElement> get scripts; |
| 1164 } | 1170 } |
| 1165 | 1171 |
| 1166 /** | 1172 /** |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1335 */ | 1341 */ |
| 1336 List<LibraryElement> get visibleLibraries; | 1342 List<LibraryElement> get visibleLibraries; |
| 1337 | 1343 |
| 1338 /** | 1344 /** |
| 1339 * Return `true` if the defining compilation unit of this library contains at
least one | 1345 * Return `true` if the defining compilation unit of this library contains at
least one |
| 1340 * import directive whose URI uses the "dart-ext" scheme. | 1346 * import directive whose URI uses the "dart-ext" scheme. |
| 1341 */ | 1347 */ |
| 1342 bool hasExtUri(); | 1348 bool hasExtUri(); |
| 1343 | 1349 |
| 1344 /** | 1350 /** |
| 1351 * Return `true` if this library is created for Angular analysis. |
| 1352 * |
| 1353 * @return `true` if this library is created for Angular analysis |
| 1354 */ |
| 1355 bool get isAngularHtml; |
| 1356 |
| 1357 /** |
| 1345 * Answer `true` if this library is an application that can be run in the brow
ser. | 1358 * Answer `true` if this library is an application that can be run in the brow
ser. |
| 1346 * | 1359 * |
| 1347 * @return `true` if this library is an application that can be run in the bro
wser | 1360 * @return `true` if this library is an application that can be run in the bro
wser |
| 1348 */ | 1361 */ |
| 1349 bool get isBrowserApplication; | 1362 bool get isBrowserApplication; |
| 1350 | 1363 |
| 1351 /** | 1364 /** |
| 1352 * Return `true` if this library is the dart:core library. | 1365 * Return `true` if this library is the dart:core library. |
| 1353 * | 1366 * |
| 1354 * @return `true` if this library is the dart:core library | 1367 * @return `true` if this library is the dart:core library |
| (...skipping 2815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4170 | 4183 |
| 4171 void visitChildren(ElementVisitor visitor) { | 4184 void visitChildren(ElementVisitor visitor) { |
| 4172 super.visitChildren(visitor); | 4185 super.visitChildren(visitor); |
| 4173 safelyVisitChildren(_functions, visitor); | 4186 safelyVisitChildren(_functions, visitor); |
| 4174 safelyVisitChildren(_labels, visitor); | 4187 safelyVisitChildren(_labels, visitor); |
| 4175 safelyVisitChildren(_localVariables, visitor); | 4188 safelyVisitChildren(_localVariables, visitor); |
| 4176 safelyVisitChildren(_parameters, visitor); | 4189 safelyVisitChildren(_parameters, visitor); |
| 4177 } | 4190 } |
| 4178 | 4191 |
| 4179 void appendTo(JavaStringBuilder builder) { | 4192 void appendTo(JavaStringBuilder builder) { |
| 4180 builder.append("("); | 4193 if (this.kind != ElementKind.GETTER) { |
| 4181 String closing = null; | 4194 builder.append("("); |
| 4182 ParameterKind kind = ParameterKind.REQUIRED; | 4195 String closing = null; |
| 4183 int parameterCount = _parameters.length; | 4196 ParameterKind kind = ParameterKind.REQUIRED; |
| 4184 for (int i = 0; i < parameterCount; i++) { | 4197 int parameterCount = _parameters.length; |
| 4185 if (i > 0) { | 4198 for (int i = 0; i < parameterCount; i++) { |
| 4186 builder.append(", "); | 4199 if (i > 0) { |
| 4200 builder.append(", "); |
| 4201 } |
| 4202 ParameterElementImpl parameter = _parameters[i] as ParameterElementImpl; |
| 4203 ParameterKind parameterKind = parameter.parameterKind; |
| 4204 if (parameterKind != kind) { |
| 4205 if (closing != null) { |
| 4206 builder.append(closing); |
| 4207 } |
| 4208 if (identical(parameterKind, ParameterKind.POSITIONAL)) { |
| 4209 builder.append("["); |
| 4210 closing = "]"; |
| 4211 } else if (identical(parameterKind, ParameterKind.NAMED)) { |
| 4212 builder.append("{"); |
| 4213 closing = "}"; |
| 4214 } else { |
| 4215 closing = null; |
| 4216 } |
| 4217 } |
| 4218 kind = parameterKind; |
| 4219 parameter.appendToWithoutDelimiters(builder); |
| 4187 } | 4220 } |
| 4188 ParameterElementImpl parameter = _parameters[i] as ParameterElementImpl; | 4221 if (closing != null) { |
| 4189 ParameterKind parameterKind = parameter.parameterKind; | 4222 builder.append(closing); |
| 4190 if (parameterKind != kind) { | |
| 4191 if (closing != null) { | |
| 4192 builder.append(closing); | |
| 4193 } | |
| 4194 if (identical(parameterKind, ParameterKind.POSITIONAL)) { | |
| 4195 builder.append("["); | |
| 4196 closing = "]"; | |
| 4197 } else if (identical(parameterKind, ParameterKind.NAMED)) { | |
| 4198 builder.append("{"); | |
| 4199 closing = "}"; | |
| 4200 } else { | |
| 4201 closing = null; | |
| 4202 } | |
| 4203 } | 4223 } |
| 4204 kind = parameterKind; | 4224 builder.append(")"); |
| 4205 parameter.appendToWithoutDelimiters(builder); | |
| 4206 } | 4225 } |
| 4207 if (closing != null) { | |
| 4208 builder.append(closing); | |
| 4209 } | |
| 4210 builder.append(")"); | |
| 4211 if (type != null) { | 4226 if (type != null) { |
| 4212 builder.append(Element.RIGHT_ARROW); | 4227 builder.append(Element.RIGHT_ARROW); |
| 4213 builder.append(type.returnType); | 4228 builder.append(type.returnType); |
| 4214 } | 4229 } |
| 4215 } | 4230 } |
| 4216 } | 4231 } |
| 4217 | 4232 |
| 4218 /** | 4233 /** |
| 4219 * Instances of the class `ExportElementImpl` implement an [ExportElement]. | 4234 * Instances of the class `ExportElementImpl` implement an [ExportElement]. |
| 4220 * | 4235 * |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4619 * The scripts contained in or referenced from script tags in the HTML file. | 4634 * The scripts contained in or referenced from script tags in the HTML file. |
| 4620 */ | 4635 */ |
| 4621 List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY; | 4636 List<HtmlScriptElement> _scripts = HtmlScriptElementImpl.EMPTY_ARRAY; |
| 4622 | 4637 |
| 4623 /** | 4638 /** |
| 4624 * The source that corresponds to this HTML file. | 4639 * The source that corresponds to this HTML file. |
| 4625 */ | 4640 */ |
| 4626 Source source; | 4641 Source source; |
| 4627 | 4642 |
| 4628 /** | 4643 /** |
| 4644 * The element associated with Dart pieces in this HTML unit or `null` if the
receiver is |
| 4645 * not resolved. |
| 4646 */ |
| 4647 CompilationUnitElement angularCompilationUnit; |
| 4648 |
| 4649 /** |
| 4629 * Initialize a newly created HTML element to have the given name. | 4650 * Initialize a newly created HTML element to have the given name. |
| 4630 * | 4651 * |
| 4631 * @param context the analysis context in which the HTML file is defined | 4652 * @param context the analysis context in which the HTML file is defined |
| 4632 * @param name the name of this element | 4653 * @param name the name of this element |
| 4633 */ | 4654 */ |
| 4634 HtmlElementImpl(this.context, String name) : super.con2(name, -1); | 4655 HtmlElementImpl(this.context, String name) : super.con2(name, -1); |
| 4635 | 4656 |
| 4636 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); | 4657 accept(ElementVisitor visitor) => visitor.visitHtmlElement(this); |
| 4637 | 4658 |
| 4638 bool operator ==(Object object) { | 4659 bool operator ==(Object object) { |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4892 */ | 4913 */ |
| 4893 List<ExportElement> _exports = ExportElement.EMPTY_ARRAY; | 4914 List<ExportElement> _exports = ExportElement.EMPTY_ARRAY; |
| 4894 | 4915 |
| 4895 /** | 4916 /** |
| 4896 * An array containing all of the compilation units that are included in this
library using a | 4917 * An array containing all of the compilation units that are included in this
library using a |
| 4897 * `part` directive. | 4918 * `part` directive. |
| 4898 */ | 4919 */ |
| 4899 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY; | 4920 List<CompilationUnitElement> _parts = CompilationUnitElementImpl.EMPTY_ARRAY; |
| 4900 | 4921 |
| 4901 /** | 4922 /** |
| 4923 * Is `true` if this library is created for Angular analysis. |
| 4924 */ |
| 4925 bool _isAngularHtml2 = false; |
| 4926 |
| 4927 /** |
| 4902 * Initialize a newly created library element to have the given name. | 4928 * Initialize a newly created library element to have the given name. |
| 4903 * | 4929 * |
| 4904 * @param context the analysis context in which the library is defined | 4930 * @param context the analysis context in which the library is defined |
| 4905 * @param name the name of this element | 4931 * @param name the name of this element |
| 4906 */ | 4932 */ |
| 4907 LibraryElementImpl(this.context, LibraryIdentifier name) : super.con1(name); | 4933 LibraryElementImpl(this.context, LibraryIdentifier name) : super.con1(name); |
| 4908 | 4934 |
| 4909 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); | 4935 accept(ElementVisitor visitor) => visitor.visitLibraryElement(this); |
| 4910 | 4936 |
| 4911 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC
ompilationUnit; | 4937 bool operator ==(Object object) => object != null && runtimeType == object.run
timeType && _definingCompilationUnit == (object as LibraryElementImpl).definingC
ompilationUnit; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5008 List<LibraryElement> get visibleLibraries { | 5034 List<LibraryElement> get visibleLibraries { |
| 5009 Set<LibraryElement> visibleLibraries = new Set(); | 5035 Set<LibraryElement> visibleLibraries = new Set(); |
| 5010 addVisibleLibraries(visibleLibraries, false); | 5036 addVisibleLibraries(visibleLibraries, false); |
| 5011 return new List.from(visibleLibraries); | 5037 return new List.from(visibleLibraries); |
| 5012 } | 5038 } |
| 5013 | 5039 |
| 5014 bool hasExtUri() => hasModifier(Modifier.HAS_EXT_URI); | 5040 bool hasExtUri() => hasModifier(Modifier.HAS_EXT_URI); |
| 5015 | 5041 |
| 5016 int get hashCode => _definingCompilationUnit.hashCode; | 5042 int get hashCode => _definingCompilationUnit.hashCode; |
| 5017 | 5043 |
| 5044 bool get isAngularHtml => _isAngularHtml2; |
| 5045 |
| 5018 bool get isBrowserApplication => entryPoint != null && isOrImportsBrowserLibra
ry; | 5046 bool get isBrowserApplication => entryPoint != null && isOrImportsBrowserLibra
ry; |
| 5019 | 5047 |
| 5020 bool get isDartCore => name == "dart.core"; | 5048 bool get isDartCore => name == "dart.core"; |
| 5021 | 5049 |
| 5022 bool get isInSdk => StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x7
4, 0x2E); | 5050 bool get isInSdk => StringUtilities.startsWith5(name, 0, 0x64, 0x61, 0x72, 0x7
4, 0x2E); |
| 5023 | 5051 |
| 5024 bool isUpToDate2(int timeStamp) { | 5052 bool isUpToDate2(int timeStamp) { |
| 5025 Set<LibraryElement> visitedLibraries = new Set(); | 5053 Set<LibraryElement> visitedLibraries = new Set(); |
| 5026 return isUpToDate(this, timeStamp, visitedLibraries); | 5054 return isUpToDate(this, timeStamp, visitedLibraries); |
| 5027 } | 5055 } |
| 5028 | 5056 |
| 5029 /** | 5057 /** |
| 5058 * Specifies if this library is created for Angular analysis. |
| 5059 */ |
| 5060 void set angularHtml(bool isAngularHtml) { |
| 5061 this._isAngularHtml2 = isAngularHtml; |
| 5062 } |
| 5063 |
| 5064 /** |
| 5030 * Set the compilation unit that defines this library to the given compilation
unit. | 5065 * Set the compilation unit that defines this library to the given compilation
unit. |
| 5031 * | 5066 * |
| 5032 * @param definingCompilationUnit the compilation unit that defines this libra
ry | 5067 * @param definingCompilationUnit the compilation unit that defines this libra
ry |
| 5033 */ | 5068 */ |
| 5034 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t) { | 5069 void set definingCompilationUnit(CompilationUnitElement definingCompilationUni
t) { |
| 5035 (definingCompilationUnit as CompilationUnitElementImpl).enclosingElement = t
his; | 5070 (definingCompilationUnit as CompilationUnitElementImpl).enclosingElement = t
his; |
| 5036 this._definingCompilationUnit = definingCompilationUnit; | 5071 this._definingCompilationUnit = definingCompilationUnit; |
| 5037 } | 5072 } |
| 5038 | 5073 |
| 5039 /** | 5074 /** |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6237 } | 6272 } |
| 6238 } | 6273 } |
| 6239 | 6274 |
| 6240 /** | 6275 /** |
| 6241 * Implementation of `AngularComponentElement`. | 6276 * Implementation of `AngularComponentElement`. |
| 6242 * | 6277 * |
| 6243 * @coverage dart.engine.element | 6278 * @coverage dart.engine.element |
| 6244 */ | 6279 */ |
| 6245 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen
ts AngularComponentElement { | 6280 class AngularComponentElementImpl extends AngularHasSelectorElementImpl implemen
ts AngularComponentElement { |
| 6246 /** | 6281 /** |
| 6282 * The offset of the defining <code>NgComponent</code> annotation. |
| 6283 */ |
| 6284 int _annotationOffset = 0; |
| 6285 |
| 6286 /** |
| 6247 * The array containing all of the properties declared by this component. | 6287 * The array containing all of the properties declared by this component. |
| 6248 */ | 6288 */ |
| 6249 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; | 6289 List<AngularPropertyElement> _properties = AngularPropertyElement.EMPTY_ARRAY; |
| 6250 | 6290 |
| 6251 /** | 6291 /** |
| 6252 * The the CSS file URI. | 6292 * The the CSS file URI. |
| 6253 */ | 6293 */ |
| 6254 String styleUri; | 6294 String styleUri; |
| 6255 | 6295 |
| 6256 /** | 6296 /** |
| (...skipping 16 matching lines...) Expand all Loading... |
| 6273 */ | 6313 */ |
| 6274 int templateUriOffset = 0; | 6314 int templateUriOffset = 0; |
| 6275 | 6315 |
| 6276 /** | 6316 /** |
| 6277 * Initialize a newly created Angular component to have the given name. | 6317 * Initialize a newly created Angular component to have the given name. |
| 6278 * | 6318 * |
| 6279 * @param name the name of this element | 6319 * @param name the name of this element |
| 6280 * @param nameOffset the offset of the name of this element in the file that c
ontains the | 6320 * @param nameOffset the offset of the name of this element in the file that c
ontains the |
| 6281 * declaration of this element | 6321 * declaration of this element |
| 6282 */ | 6322 */ |
| 6283 AngularComponentElementImpl(String name, int nameOffset) : super(name, nameOff
set); | 6323 AngularComponentElementImpl(String name, int nameOffset, int annotationOffset)
: super(name, nameOffset) { |
| 6324 this._annotationOffset = annotationOffset; |
| 6325 } |
| 6284 | 6326 |
| 6285 accept(ElementVisitor visitor) => visitor.visitAngularComponentElement(this); | 6327 accept(ElementVisitor visitor) => visitor.visitAngularComponentElement(this); |
| 6286 | 6328 |
| 6287 ElementKind get kind => ElementKind.ANGULAR_COMPONENT; | 6329 ElementKind get kind => ElementKind.ANGULAR_COMPONENT; |
| 6288 | 6330 |
| 6289 List<AngularPropertyElement> get properties => _properties; | 6331 List<AngularPropertyElement> get properties => _properties; |
| 6290 | 6332 |
| 6291 /** | 6333 /** |
| 6292 * Set an array containing all of the properties declared by this component. | 6334 * Set an array containing all of the properties declared by this component. |
| 6293 * | 6335 * |
| 6294 * @param properties the properties to set | 6336 * @param properties the properties to set |
| 6295 */ | 6337 */ |
| 6296 void set properties(List<AngularPropertyElement> properties) { | 6338 void set properties(List<AngularPropertyElement> properties) { |
| 6297 for (AngularPropertyElement property in properties) { | 6339 for (AngularPropertyElement property in properties) { |
| 6298 encloseElement(property as AngularPropertyElementImpl); | 6340 encloseElement(property as AngularPropertyElementImpl); |
| 6299 } | 6341 } |
| 6300 this._properties = properties; | 6342 this._properties = properties; |
| 6301 } | 6343 } |
| 6302 | 6344 |
| 6303 void visitChildren(ElementVisitor visitor) { | 6345 void visitChildren(ElementVisitor visitor) { |
| 6304 safelyVisitChildren(_properties, visitor); | 6346 safelyVisitChildren(_properties, visitor); |
| 6305 super.visitChildren(visitor); | 6347 super.visitChildren(visitor); |
| 6306 } | 6348 } |
| 6349 |
| 6350 String get identifier => "AngularComponent@${_annotationOffset}"; |
| 6307 } | 6351 } |
| 6308 | 6352 |
| 6309 /** | 6353 /** |
| 6310 * Implementation of `AngularControllerElement`. | 6354 * Implementation of `AngularControllerElement`. |
| 6311 * | 6355 * |
| 6312 * @coverage dart.engine.element | 6356 * @coverage dart.engine.element |
| 6313 */ | 6357 */ |
| 6314 class AngularControllerElementImpl extends AngularHasSelectorElementImpl impleme
nts AngularControllerElement { | 6358 class AngularControllerElementImpl extends AngularHasSelectorElementImpl impleme
nts AngularControllerElement { |
| 6315 /** | 6359 /** |
| 6316 * Initialize a newly created Angular controller to have the given name. | 6360 * Initialize a newly created Angular controller to have the given name. |
| (...skipping 3286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9603 | 9647 |
| 9604 /** | 9648 /** |
| 9605 * The interface `VoidType` defines the behavior of the unique object representi
ng the type | 9649 * The interface `VoidType` defines the behavior of the unique object representi
ng the type |
| 9606 * `void`. | 9650 * `void`. |
| 9607 * | 9651 * |
| 9608 * @coverage dart.engine.type | 9652 * @coverage dart.engine.type |
| 9609 */ | 9653 */ |
| 9610 abstract class VoidType implements Type2 { | 9654 abstract class VoidType implements Type2 { |
| 9611 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); | 9655 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); |
| 9612 } | 9656 } |
| OLD | NEW |