OLD | NEW |
(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 } |
OLD | NEW |