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

Side by Side Diff: compiler/java/com/google/dart/compiler/resolver/Elements.java

Issue 10703046: Issue 3753. Support for @deprecated annotation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Analyze for @deprecated all invocable elements Created 8 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 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 package com.google.dart.compiler.resolver; 5 package com.google.dart.compiler.resolver;
6 6
7 import com.google.common.annotations.VisibleForTesting; 7 import com.google.common.annotations.VisibleForTesting;
8 import com.google.common.base.Objects; 8 import com.google.common.base.Objects;
9 import com.google.common.collect.ImmutableSet; 9 import com.google.common.collect.ImmutableSet;
10 import com.google.common.collect.Lists; 10 import com.google.common.collect.Lists;
11 import com.google.common.collect.Sets; 11 import com.google.common.collect.Sets;
12 import com.google.dart.compiler.DartSource; 12 import com.google.dart.compiler.DartSource;
13 import com.google.dart.compiler.LibrarySource; 13 import com.google.dart.compiler.LibrarySource;
14 import com.google.dart.compiler.Source; 14 import com.google.dart.compiler.Source;
15 import com.google.dart.compiler.ast.DartBinaryExpression; 15 import com.google.dart.compiler.ast.DartBinaryExpression;
16 import com.google.dart.compiler.ast.DartClass; 16 import com.google.dart.compiler.ast.DartClass;
17 import com.google.dart.compiler.ast.DartClassMember; 17 import com.google.dart.compiler.ast.DartClassMember;
18 import com.google.dart.compiler.ast.DartField; 18 import com.google.dart.compiler.ast.DartField;
19 import com.google.dart.compiler.ast.DartFunctionExpression; 19 import com.google.dart.compiler.ast.DartFunctionExpression;
20 import com.google.dart.compiler.ast.DartFunctionTypeAlias; 20 import com.google.dart.compiler.ast.DartFunctionTypeAlias;
21 import com.google.dart.compiler.ast.DartIdentifier; 21 import com.google.dart.compiler.ast.DartIdentifier;
22 import com.google.dart.compiler.ast.DartLabel; 22 import com.google.dart.compiler.ast.DartLabel;
23 import com.google.dart.compiler.ast.DartMetadata;
23 import com.google.dart.compiler.ast.DartMethodDefinition; 24 import com.google.dart.compiler.ast.DartMethodDefinition;
24 import com.google.dart.compiler.ast.DartNativeBlock; 25 import com.google.dart.compiler.ast.DartNativeBlock;
25 import com.google.dart.compiler.ast.DartNode; 26 import com.google.dart.compiler.ast.DartNode;
26 import com.google.dart.compiler.ast.DartParameter; 27 import com.google.dart.compiler.ast.DartParameter;
27 import com.google.dart.compiler.ast.DartSuperExpression; 28 import com.google.dart.compiler.ast.DartSuperExpression;
28 import com.google.dart.compiler.ast.DartTypeNode; 29 import com.google.dart.compiler.ast.DartTypeNode;
29 import com.google.dart.compiler.ast.DartTypeParameter; 30 import com.google.dart.compiler.ast.DartTypeParameter;
30 import com.google.dart.compiler.ast.DartVariable; 31 import com.google.dart.compiler.ast.DartVariable;
31 import com.google.dart.compiler.ast.LibraryUnit; 32 import com.google.dart.compiler.ast.LibraryUnit;
32 import com.google.dart.compiler.ast.Modifiers; 33 import com.google.dart.compiler.ast.Modifiers;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 public static void setType(Element element, Type type) { 210 public static void setType(Element element, Type type) {
210 ((AbstractNodeElement) element).setType(type); 211 ((AbstractNodeElement) element).setType(type);
211 } 212 }
212 213
213 public static void setOverridden(MethodElement methodElement, Set<Element> ove rridden) { 214 public static void setOverridden(MethodElement methodElement, Set<Element> ove rridden) {
214 ((MethodElementImplementation) methodElement).setOverridden(overridden); 215 ((MethodElementImplementation) methodElement).setOverridden(overridden);
215 } 216 }
216 217
217 static FieldElementImplementation fieldFromNode(DartField node, 218 static FieldElementImplementation fieldFromNode(DartField node,
218 EnclosingElement holder, 219 EnclosingElement holder,
220 DartMetadata metadata,
219 Modifiers modifiers) { 221 Modifiers modifiers) {
220 return FieldElementImplementation.fromNode(node, holder, modifiers); 222 return FieldElementImplementation.fromNode(node, holder, metadata, modifiers );
221 } 223 }
222 224
223 static ClassElement classFromNode(DartClass node, LibraryElement library) { 225 static ClassElement classFromNode(DartClass node, LibraryElement library) {
224 return ClassElementImplementation.fromNode(node, library); 226 return ClassElementImplementation.fromNode(node, library);
225 } 227 }
226 228
227 public static ClassElement classNamed(String name) { 229 public static ClassElement classNamed(String name) {
228 return ClassElementImplementation.named(name); 230 return ClassElementImplementation.named(name);
229 } 231 }
230 232
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 if (element instanceof MethodElement) { 702 if (element instanceof MethodElement) {
701 MethodElement methodElement = (MethodElement) element; 703 MethodElement methodElement = (MethodElement) element;
702 return Objects.equal(methodElement.getName(), "assert") 704 return Objects.equal(methodElement.getName(), "assert")
703 && methodElement.getEnclosingElement() instanceof LibraryElement 705 && methodElement.getEnclosingElement() instanceof LibraryElement
704 && methodElement.getEnclosingElement().getName().equals("dart://core/c ore_runtime.dart"); 706 && methodElement.getEnclosingElement().getName().equals("dart://core/c ore_runtime.dart");
705 } 707 }
706 return false; 708 return false;
707 } 709 }
708 710
709 } 711 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698