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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 package com.google.dart.compiler.ast;
6
7 /**
8 * Some metadata information attached to the {@link DartDeclaration}.
9 */
10 public class DartMetadata {
11 public static final DartMetadata EMPTY = new DartMetadata(false, false);
12 private boolean deprecated;
13 private boolean override;
14
15 private DartMetadata(boolean deprecated, boolean override) {
16 this.deprecated = deprecated;
17 this.override = override;
18 }
19
20 public DartMetadata makeDeprecated() {
21 return new DartMetadata(true, override);
22 }
23
24 public DartMetadata makeOverride() {
25 return new DartMetadata(deprecated, true);
26 }
27
28 public boolean isDeprecated() {
29 return deprecated;
30 }
31
32 public boolean isOverride() {
33 return override;
34 }
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698