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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.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, 6 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 side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java b/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
index 5d2d93fdb71c54ee14b61d1ed43c97012f8b65f0..58cf94df102d1cb9c63786ee1be766a28310b18a 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
@@ -7,6 +7,7 @@ package com.google.dart.compiler.resolver;
import com.google.common.collect.Lists;
import com.google.dart.compiler.ast.DartClass;
import com.google.dart.compiler.ast.DartDeclaration;
+import com.google.dart.compiler.ast.DartMetadata;
import com.google.dart.compiler.ast.DartParameterizedTypeNode;
import com.google.dart.compiler.ast.DartStringLiteral;
import com.google.dart.compiler.ast.Modifiers;
@@ -30,6 +31,7 @@ class ClassElementImplementation extends AbstractNodeElement implements ClassNod
private final List<InterfaceType> interfaces = Lists.newArrayList();
private final boolean isInterface;
private final String nativeName;
+ private final DartMetadata metadata;
private final Modifiers modifiers;
private final AtomicReference<List<InterfaceType>> allSupertypes =
new AtomicReference<List<InterfaceType>>();
@@ -60,11 +62,13 @@ class ClassElementImplementation extends AbstractNodeElement implements ClassNod
this.library = library;
if (node != null) {
isInterface = node.isInterface();
+ metadata = node.getMetadata();
modifiers = node.getModifiers();
nameLocation = node.getName().getSourceInfo();
declarationNameWithTypeParameter = new DartParameterizedTypeNode(node.getName(), node.getTypeParameters()).toSource();
} else {
isInterface = false;
+ metadata = DartMetadata.EMPTY;
modifiers = Modifiers.NONE;
nameLocation = SourceInfo.UNKNOWN;
declarationNameWithTypeParameter = "";
@@ -157,6 +161,11 @@ class ClassElementImplementation extends AbstractNodeElement implements ClassNod
}
@Override
+ public DartMetadata getMetadata() {
+ return metadata;
+ }
+
+ @Override
public Modifiers getModifiers() {
return modifiers;
}

Powered by Google App Engine
This is Rietveld 408576698