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

Side by Side Diff: pkg/analyzer/lib/src/generated/element_handle.dart

Issue 1410643003: Add a public API for the results of constant evaluation (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
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 library engine.element_handle; 5 library engine.element_handle;
6 6
7 import 'ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'element.dart'; 8 import 'package:analyzer/src/generated/constant.dart';
9 import 'engine.dart'; 9 import 'package:analyzer/src/generated/element.dart';
10 import 'java_core.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
11 import 'java_engine.dart'; 11 import 'package:analyzer/src/generated/java_core.dart';
12 import 'resolver.dart'; 12 import 'package:analyzer/src/generated/java_engine.dart';
13 import 'source.dart'; 13 import 'package:analyzer/src/generated/resolver.dart';
14 import 'utilities_dart.dart'; 14 import 'package:analyzer/src/generated/source.dart';
15 import 'package:analyzer/src/generated/utilities_dart.dart';
15 16
16 /** 17 /**
17 * Instances of the class `ClassElementHandle` implement a handle to a `ClassEle ment`. 18 * Instances of the class `ClassElementHandle` implement a handle to a `ClassEle ment`.
18 */ 19 */
19 class ClassElementHandle extends ElementHandle implements ClassElement { 20 class ClassElementHandle extends ElementHandle implements ClassElement {
20 /** 21 /**
21 * Initialize a newly created element handle to represent the given element. 22 * Initialize a newly created element handle to represent the given element.
22 * 23 *
23 * @param element the element being represented 24 * @param element the element being represented
24 */ 25 */
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 * Initialize a newly created element handle to represent the given element. 1086 * Initialize a newly created element handle to represent the given element.
1086 * 1087 *
1087 * @param element the element being represented 1088 * @param element the element being represented
1088 */ 1089 */
1089 VariableElementHandle(VariableElement element) : super(element); 1090 VariableElementHandle(VariableElement element) : super(element);
1090 1091
1091 @override 1092 @override
1092 VariableElement get actualElement => super.actualElement as VariableElement; 1093 VariableElement get actualElement => super.actualElement as VariableElement;
1093 1094
1094 @override 1095 @override
1096 DartObject get constantValue => actualElement.constantValue;
1097
1098 @override
1095 bool get hasImplicitType => actualElement.hasImplicitType; 1099 bool get hasImplicitType => actualElement.hasImplicitType;
1096 1100
1097 @override 1101 @override
1098 FunctionElement get initializer => actualElement.initializer; 1102 FunctionElement get initializer => actualElement.initializer;
1099 1103
1100 @override 1104 @override
1101 bool get isConst => actualElement.isConst; 1105 bool get isConst => actualElement.isConst;
1102 1106
1103 @override 1107 @override
1104 bool get isFinal => actualElement.isFinal; 1108 bool get isFinal => actualElement.isFinal;
(...skipping 14 matching lines...) Expand all
1119 } 1123 }
1120 1124
1121 /** 1125 /**
1122 * TODO(scheglov) invalid implementation 1126 * TODO(scheglov) invalid implementation
1123 */ 1127 */
1124 class WeakReference<T> { 1128 class WeakReference<T> {
1125 final T value; 1129 final T value;
1126 WeakReference(this.value); 1130 WeakReference(this.value);
1127 T get() => value; 1131 T get() => value;
1128 } 1132 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698