Community
Participate
Working Groups
20020416 Minor All of its subtypes has get/setModifier. It would be possible to have it in BodyDeclaration
Each kind of BodyDeclaration has a different set of modifiers that are legal for that type. So even if there was BodyDeclaration.get/setModifiers, we might still want to retain separate spec refinements in each subclass. More fundamentally, it feels like the fact that all BodyDeclarations have modifiers is incidental, rather than something inherent. Would anyone really care if a new kind of BodyDeclaration was added to the language that happens to not have modifiers? I'd bet that anyone going for modifiers also already knows the kind of node they are dealing with. So while it would be possible to make this factoring, I can't see anyone benefitting from this minor change.
*** Bug 14267 has been marked as a duplicate of this bug. ***