On Thu, 2 Aug 2001, C. Scott Ananian wrote:
> On Thu, 2 Aug 2001 [EMAIL PROTECTED] wrote:
>
> > > Does anyone have a hint as to how the inner class methods of
> > > java.lang.Class (getDeclaringClass, getClasses, etc.) would be implemented
> > > by a JVM? Don't they depend on how the Java compiler implements inner
> > > classes? AFAIK the JVM isn't aware of inner classes at all.
> >
> > The inner class "Y" of class "X" is compiled as "X$Y".
> > So if a class name contains "$", it must be an innerclass.
>
> actually, no. '$' is still a valid identifier character, although
> recommended only for machine-generated code. I can name my class 'A$B'
> without having an outer class 'A' at all.
Plus, it wouldn't give you a way to enumerate all of X's inner classes
anyway.
--
Patrick Doyle
[EMAIL PROTECTED]
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath