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

Unified Diff: compiler/java/com/google/dart/compiler/ast/DartMetadata.java

Issue 10661022: Issue 3752. Support for @override annotations (as structured doc comments) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/ast/DartMetadata.java
diff --git a/compiler/java/com/google/dart/compiler/ast/DartMetadata.java b/compiler/java/com/google/dart/compiler/ast/DartMetadata.java
new file mode 100644
index 0000000000000000000000000000000000000000..36a1ab51f459bb4b771b809731cd823bb8895cf0
--- /dev/null
+++ b/compiler/java/com/google/dart/compiler/ast/DartMetadata.java
@@ -0,0 +1,35 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+package com.google.dart.compiler.ast;
+
+/**
+ * Some metadata information attached to the {@link DartDeclaration}.
+ */
+public class DartMetadata {
+ public static final DartMetadata EMPTY = new DartMetadata(false, false);
+ private boolean deprecated;
+ private boolean override;
+
+ private DartMetadata(boolean deprecated, boolean override) {
+ this.deprecated = deprecated;
+ this.override = override;
+ }
+
+ public DartMetadata makeDeprecated() {
+ return new DartMetadata(true, override);
+ }
+
+ public DartMetadata makeOverride() {
+ return new DartMetadata(deprecated, true);
+ }
+
+ public boolean isDeprecated() {
+ return deprecated;
+ }
+
+ public boolean isOverride() {
+ return override;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698