On Fri, Mar 20, 2009 at 8:57 PM, John Rose <[email protected]> wrote:

> /** Disclose the source(s) that this loader is likely to use in the
> future for resolving class names.
>  *  The result is purely advisory, as the loader may actually use
> different sources when actually requested to load a class.
>  */
> List<URL> ClassLoader.getSourceURLs();
>
> /** Given a package qualifier, return the names (minus the qualifier)
> of all classes which this loader is likely to be able to load in the
> future.
>  *  If includeSubpackages, include in the list the names (partially
> qualified) of classes in subpackages also.
>  *  Passing the arguments ("", true) will produce a list of al
> loadable classes in all packages, included the anonymous package.
>  *  The result is purely advisory, as the loader may actually produce
> different names when actually requested to load a class.
>  */
> List<String> ClassLoader.listPackageClasses(String package, boolean
> includeSubpackages);
>
> (Actually, List might have to be Enumeration for coherence with
> existing CL methods.)
That would be just about perfect (caveats are fine and expected), and
it would not take very much bending at all to get the packagecache
mechanism to provide a similar API for the cases that it covers (so
that older JDKs could use something like this).

-Frank

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to