> 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.


This is documentend in the Innerclass specification,
http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc.html
in section "Class Name Transformation"
http://java.sun.com/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc7.html

-Patrik



--
Patrik Reali, [EMAIL PROTECTED]
http://www.inf.ethz.ch/personal/reali/
http://www.oberon.ethz.ch/native/


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to