[Mono-list] System.Reflection.MemberAttributes

Miguel de Icaza miguel@ximian.com
29 Aug 2001 01:58:43 -0400


> In modifiers.cs MethodAttributes or FieldAttributes methods
> do not check for Modifiers.NEW, Modifiers.PROTECTED etc.

The reason is that there is a single grammar production (due to the
limitations of the parser) for assembling all possible attributes.
Even invalid ones can be specified.

The parser basically collects them all, even when they are not valid
in all contexts.  A later phase (Check.Modifiers) actually ensures
that they are valid.

The various methods you see in the code are just functions that map
from the Modifiers enumeration to the various System.Reflection flags
(and not all of them apply).

Miguel.