| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, the Dartino 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 library servicec.targets; | |
| 6 | |
| 7 // Using pre-Dart 1.8 enums, to allow masking. | |
| 8 class Target { | |
| 9 static const JAVA = const Target._(1); | |
| 10 static const CC = const Target._(2); | |
| 11 // When editing: new targets should be a power of 2, and ALL should be the | |
| 12 // next power of 2 minus 1. | |
| 13 static const ALL = const Target._(3); | |
| 14 | |
| 15 static get values => [JAVA, CC, ALL]; | |
| 16 | |
| 17 final int value; | |
| 18 | |
| 19 const Target._(this.value); | |
| 20 | |
| 21 bool includes(Target t) { | |
| 22 return value & t.value > 0; | |
| 23 } | |
| 24 } | |
| OLD | NEW |