Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
| index 58c23443c05a05cf1ada8e72d587754292e46156..76b16e4be3d39777100247c1f9db35e322f1491d 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/elements/modelx.dart |
| @@ -1892,6 +1892,18 @@ abstract class BaseClassElementX extends ElementX implements ClassElement { |
| includeSuperAndInjectedMembers: includeSuperAndInjectedMembers); |
| } |
| + /// Similar to [forEachInstanceField] but visits static fields. |
| + void forEachStaticField(void f(ClassElement enclosingClass, Element field)) { |
|
ngeoffray
2013/07/17 07:41:11
Does the user of this function care of the enclosi
ahe
2013/07/17 08:39:15
Yes, but since it is used analogous to forEachInst
|
| + // Filters so that [f] is only invoked with static fields. |
| + void fieldFilter(ClassElement enclosingClass, Element member) { |
| + if (!member.isInstanceMember() && member.kind == ElementKind.FIELD) { |
| + f(enclosingClass, member); |
| + } |
| + } |
| + |
| + forEachMember(fieldFilter); |
| + } |
| + |
| void forEachBackendMember(void f(Element member)) { |
| backendMembers.forEach(f); |
| } |