🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1461

Re: How to find all Classes in a Package?

#1461
From: Owen Green
Date: Wed, 12 Dec 2001 20:39
18 lines
1764 bytes
John McGrath [TeamB] <ng-b@JPMcGrath.net> wrote in message
news:MPG.168178dd884c019898adab@forums.borland.com...
> On Wed, 12 Dec 2001 12:11:17 -0600, Tim Perrigo wrote:
>
> > Can anyone tell me how to retrieve a list (array or Collection)
> > of all Classes (java.lang.Class) in a particular package?  Any
> > help would be much appreciated!
>
> I do not think that information is available.  The only approach I know
> of would be to mimic the logic of the ClassLoader.  In other words, you
> would need to use the classpath to look at all of the JAR files and
> directories, and find all of the class files contained in them.
>
I think you can get some of the way using the JDI, but that's obviously not
very practical....

Owen
Technical Details
Message-ID: <3c17bf7e_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!news.uni-paderborn.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <MPG.168159c4e78ee51a989682@newsgroups.borland.com> <MPG.168178dd884c019898adab@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,4e00fc170de58cf3
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-12-12 12:40:18 PST
From: "Owen Green" <owen@begonefoulmachine.kennulz.demon.co.uk>
Newsgroups: borland.public.jbuilder.java.api
References: <MPG.168159c4e78ee51a989682@newsgroups.borland.com> <MPG.168178dd884c019898adab@forums.borland.com>
Subject: Re: How to find all Classes in a Package?
Date: Wed, 12 Dec 2001 20:39:44 -0000
Lines: 20
Organization: Unique Interactive
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
NNTP-Posting-Host: 193.237.54.9
Message-ID: <3c17bf7e_1@dnews>
X-Trace: dnews 1008189310 193.237.54.9 (12 Dec 2001 12:35:10 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!news.uni-paderborn.de!newsfeed01.sul.t-online.de!t-online.de!dnews