Tom, Thanks for being on topic. This thread has drifted all over the place.
I wasn't thinking clearly on the proposed interface. Your suggestion is the correct way to go. I was originally thinking that the below interface would be macros that are used to pull the relevant bits out of the "modifier int". I now realize that the below looks like a virtual method call on instances of class/method/field... oops... I will take another stab at the modifiers API and also pick another aspect of the JIT/Classloader interface for discussion. Maybe class_lookup_field_recursive... On 27 Jun 2005 09:30:01 -0600, Tom Tromey <[EMAIL PROTECTED]> wrote: > >>>>> "Weldon" == Weldon Washburn <[EMAIL PROTECTED]> writes: > > Weldon> Below is a first stab at the API to retrieve the values > Weldon> contained in internal classloader data structures. > > Weldon> Comment/questions are appreciated. > > Weldon> Class access and property modifiers (table 4.1) > Weldon> bool Class::is_public(); // ACC_PUBLIC > Weldon> bool Class::is_final(); // ACC_FINAL > [ ... ] > > Why not have a single API for retrieving all the flags encoded as a > word? We already need this capability to implement things like > Class.getModifiers. The flag values are unlikely to change, and we > won't even have to code them in the source anyway (we can generate > them from Modifier.class). > > Also, it is worth clarifying whether, for Class, this returns the > "real" modifiers or the modifiers from the InnerClasses attribute. > The former are typically needed internally but the latter are needed > in some situations (Class.newInstance I think). > > Tom >
