OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 public boolean isClass() { | 68 public boolean isClass() { |
69 return "class".equals(type); | 69 return "class".equals(type); |
70 } | 70 } |
71 | 71 |
72 public boolean isGlobal() { | 72 public boolean isGlobal() { |
73 return "global".equals(type); | 73 return "global".equals(type); |
74 } | 74 } |
75 | 75 |
76 public boolean isGlobalLike() { | 76 public boolean isGlobalLike() { |
77 return isGlobal() || isLibraries() || isClass(); | 77 return isGlobal() || isLibraries() || isClass() || isIsolate(); |
| 78 } |
| 79 |
| 80 public boolean isIsolate() { |
| 81 return "isolate".equals(type); |
78 } | 82 } |
79 | 83 |
80 public boolean isLibraries() { | 84 public boolean isLibraries() { |
81 // TODO: this scope should be named 'libraries' | 85 // TODO: this scope should be named 'libraries' |
82 return "library".equals(type); | 86 return "library".equals(type); |
83 } | 87 } |
84 | 88 |
85 @Override | 89 @Override |
86 public String toString() { | 90 public String toString() { |
87 return "[" + type + "," + object + "]"; | 91 return "[" + type + "," + object + "]"; |
88 } | 92 } |
89 } | 93 } |
OLD | NEW |