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

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

Issue 18612009: New analyzer_experimental snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // This code was auto-generated, is not intended to be edited, and is subject to 1 // This code was auto-generated, is not intended to be edited, and is subject to
2 // significant change. Please see the README file for more information. 2 // significant change. Please see the README file for more information.
3 library engine.element; 3 library engine.element;
4 import 'dart:collection'; 4 import 'dart:collection';
5 import 'java_core.dart'; 5 import 'java_core.dart';
6 import 'java_engine.dart'; 6 import 'java_engine.dart';
7 import 'source.dart'; 7 import 'source.dart';
8 import 'scanner.dart' show Keyword; 8 import 'scanner.dart' show Keyword;
9 import 'ast.dart' show Identifier, LibraryIdentifier; 9 import 'ast.dart' show Identifier, LibraryIdentifier;
10 import 'sdk.dart' show DartSdk; 10 import 'sdk.dart' show DartSdk;
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 15 , "local variable"); 580 static final ElementKind LOCAL_VARIABLE = new ElementKind('LOCAL_VARIABLE', 15 , "local variable");
581 static final ElementKind METHOD = new ElementKind('METHOD', 16, "method"); 581 static final ElementKind METHOD = new ElementKind('METHOD', 16, "method");
582 static final ElementKind NAME = new ElementKind('NAME', 17, "<name>"); 582 static final ElementKind NAME = new ElementKind('NAME', 17, "<name>");
583 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 18, "paramet er"); 583 static final ElementKind PARAMETER = new ElementKind('PARAMETER', 18, "paramet er");
584 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix "); 584 static final ElementKind PREFIX = new ElementKind('PREFIX', 19, "import prefix ");
585 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter"); 585 static final ElementKind SETTER = new ElementKind('SETTER', 20, "setter");
586 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 21, "top level variable"); 586 static final ElementKind TOP_LEVEL_VARIABLE = new ElementKind('TOP_LEVEL_VARIA BLE', 21, "top level variable");
587 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 22, "function type alias"); 587 static final ElementKind FUNCTION_TYPE_ALIAS = new ElementKind('FUNCTION_TYPE_ ALIAS', 22, "function type alias");
588 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23, "type variable"); 588 static final ElementKind TYPE_VARIABLE = new ElementKind('TYPE_VARIABLE', 23, "type variable");
589 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe >"); 589 static final ElementKind UNIVERSE = new ElementKind('UNIVERSE', 24, "<universe >");
590 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, FUNCTION_TYPE_ALIAS, TYPE_VARIABLE, UNI VERSE]; 590 static final List<ElementKind> values = [
591 CLASS,
592 COMPILATION_UNIT,
593 CONSTRUCTOR,
594 DYNAMIC,
595 EMBEDDED_HTML_SCRIPT,
596 ERROR,
597 EXPORT,
598 EXTERNAL_HTML_SCRIPT,
599 FIELD,
600 FUNCTION,
601 GETTER,
602 HTML,
603 IMPORT,
604 LABEL,
605 LIBRARY,
606 LOCAL_VARIABLE,
607 METHOD,
608 NAME,
609 PARAMETER,
610 PREFIX,
611 SETTER,
612 TOP_LEVEL_VARIABLE,
613 FUNCTION_TYPE_ALIAS,
614 TYPE_VARIABLE,
615 UNIVERSE];
591 616
592 /// The name of this enum constant, as declared in the enum declaration. 617 /// The name of this enum constant, as declared in the enum declaration.
593 final String name; 618 final String name;
594 619
595 /// The position in the enum declaration. 620 /// The position in the enum declaration.
596 final int ordinal; 621 final int ordinal;
597 622
598 /** 623 /**
599 * Return the kind of the given element, or [ERROR] if the element is `null`. This is 624 * Return the kind of the given element, or [ERROR] if the element is `null`. This is
600 * a utility method that can reduce the need for null checks in other places. 625 * a utility method that can reduce the need for null checks in other places.
(...skipping 3692 matching lines...) Expand 10 before | Expand all | Expand 10 after
4293 static final Modifier CONST = new Modifier('CONST', 1); 4318 static final Modifier CONST = new Modifier('CONST', 1);
4294 static final Modifier FACTORY = new Modifier('FACTORY', 2); 4319 static final Modifier FACTORY = new Modifier('FACTORY', 2);
4295 static final Modifier FINAL = new Modifier('FINAL', 3); 4320 static final Modifier FINAL = new Modifier('FINAL', 3);
4296 static final Modifier GETTER = new Modifier('GETTER', 4); 4321 static final Modifier GETTER = new Modifier('GETTER', 4);
4297 static final Modifier MIXIN = new Modifier('MIXIN', 5); 4322 static final Modifier MIXIN = new Modifier('MIXIN', 5);
4298 static final Modifier REFERENCES_SUPER = new Modifier('REFERENCES_SUPER', 6); 4323 static final Modifier REFERENCES_SUPER = new Modifier('REFERENCES_SUPER', 6);
4299 static final Modifier SETTER = new Modifier('SETTER', 7); 4324 static final Modifier SETTER = new Modifier('SETTER', 7);
4300 static final Modifier STATIC = new Modifier('STATIC', 8); 4325 static final Modifier STATIC = new Modifier('STATIC', 8);
4301 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9); 4326 static final Modifier SYNTHETIC = new Modifier('SYNTHETIC', 9);
4302 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10); 4327 static final Modifier TYPEDEF = new Modifier('TYPEDEF', 10);
4303 static final List<Modifier> values = [ABSTRACT, CONST, FACTORY, FINAL, GETTER, MIXIN, REFERENCES_SUPER, SETTER, STATIC, SYNTHETIC, TYPEDEF]; 4328 static final List<Modifier> values = [
4329 ABSTRACT,
4330 CONST,
4331 FACTORY,
4332 FINAL,
4333 GETTER,
4334 MIXIN,
4335 REFERENCES_SUPER,
4336 SETTER,
4337 STATIC,
4338 SYNTHETIC,
4339 TYPEDEF];
4304 4340
4305 /// The name of this enum constant, as declared in the enum declaration. 4341 /// The name of this enum constant, as declared in the enum declaration.
4306 final String name; 4342 final String name;
4307 4343
4308 /// The position in the enum declaration. 4344 /// The position in the enum declaration.
4309 final int ordinal; 4345 final int ordinal;
4310 Modifier(this.name, this.ordinal); 4346 Modifier(this.name, this.ordinal);
4311 int compareTo(Modifier other) => ordinal - other.ordinal; 4347 int compareTo(Modifier other) => ordinal - other.ordinal;
4312 int get hashCode => ordinal; 4348 int get hashCode => ordinal;
4313 String toString() => name; 4349 String toString() => name;
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
6208 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments); 6244 return element == otherType.element && JavaArrays.equals(_typeArguments, oth erType._typeArguments);
6209 } 6245 }
6210 List<PropertyAccessorElement> get accessors { 6246 List<PropertyAccessorElement> get accessors {
6211 List<PropertyAccessorElement> accessors = element.accessors; 6247 List<PropertyAccessorElement> accessors = element.accessors;
6212 List<PropertyAccessorElement> members = new List<PropertyAccessorElement>(ac cessors.length); 6248 List<PropertyAccessorElement> members = new List<PropertyAccessorElement>(ac cessors.length);
6213 for (int i = 0; i < accessors.length; i++) { 6249 for (int i = 0; i < accessors.length; i++) {
6214 members[i] = PropertyAccessorMember.from(accessors[i], this); 6250 members[i] = PropertyAccessorMember.from(accessors[i], this);
6215 } 6251 }
6216 return members; 6252 return members;
6217 } 6253 }
6254 String get displayName {
6255 String name = this.name;
6256 List<Type2> typeArguments = this.typeArguments;
6257 bool allDynamic = true;
6258 for (Type2 type in typeArguments) {
6259 if (type != null && !type.isDynamic) {
6260 allDynamic = false;
6261 break;
6262 }
6263 }
6264 if (!allDynamic) {
6265 JavaStringBuilder builder = new JavaStringBuilder();
6266 builder.append(name);
6267 builder.append("<");
6268 for (int i = 0; i < typeArguments.length; i++) {
6269 if (i != 0) {
6270 builder.append(", ");
6271 }
6272 Type2 typeArg = typeArguments[i];
6273 builder.append(typeArg.displayName);
6274 }
6275 builder.append(">");
6276 name = builder.toString();
6277 }
6278 return name;
6279 }
6218 ClassElement get element => super.element as ClassElement; 6280 ClassElement get element => super.element as ClassElement;
6219 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this); 6281 PropertyAccessorElement getGetter(String getterName) => PropertyAccessorMember .from(((element as ClassElementImpl)).getGetter(getterName), this);
6220 List<InterfaceType> get interfaces { 6282 List<InterfaceType> get interfaces {
6221 ClassElement classElement = element; 6283 ClassElement classElement = element;
6222 List<InterfaceType> interfaces = classElement.interfaces; 6284 List<InterfaceType> interfaces = classElement.interfaces;
6223 List<TypeVariableElement> typeVariables = classElement.typeVariables; 6285 List<TypeVariableElement> typeVariables = classElement.typeVariables;
6224 List<Type2> parameterTypes = classElement.type.typeArguments; 6286 List<Type2> parameterTypes = classElement.type.typeArguments;
6225 if (typeVariables.length == 0) { 6287 if (typeVariables.length == 0) {
6226 return interfaces; 6288 return interfaces;
6227 } 6289 }
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
7378 } 7440 }
7379 /** 7441 /**
7380 * The interface `VoidType` defines the behavior of the unique object representi ng the type 7442 * The interface `VoidType` defines the behavior of the unique object representi ng the type
7381 * `void`. 7443 * `void`.
7382 * 7444 *
7383 * @coverage dart.engine.type 7445 * @coverage dart.engine.type
7384 */ 7446 */
7385 abstract class VoidType implements Type2 { 7447 abstract class VoidType implements Type2 {
7386 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes); 7448 VoidType substitute2(List<Type2> argumentTypes, List<Type2> parameterTypes);
7387 } 7449 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/constant.dart ('k') | pkg/analyzer_experimental/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698