[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Class methods
From: |
Tom Tromey |
Subject: |
Re: Class methods |
Date: |
20 Feb 2003 20:53:35 -0700 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
>>>>> "Archie" == Archie Cobbs <address@hidden> writes:
Archie> It seems from a first look that these java.lang.Class methods
Archie> which are currently native:
Archie> Class.getClasses()
Archie> [ ... ]
Archie> could be implemented entirely in Java, by relying on these methods:
Archie> Class.getDeclaredClasses()
Archie> [ ... ]
Archie> Would this work? It would save a lot of native code writing
Archie> for JVM implementors.
I took a quick look at this. The various methods make different
SecurityManager calls. So a straightforward implementation wouldn't
be correct.
I guess it could be done by doing something like what is done in
ResourceBundle. That seems like a pretty wordy approach though.
And it seems like it would be pretty inefficient (though perhaps it
doesn't matter).
We could also just define a single native API and then let Class do
the security checks and most of the work. This may not actually
reduce the size of the native code all that much.
Tom