You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Darren Hartford <dh...@ghsinc.com> on 2008/08/15 16:46:31 UTC

[commons-discovery] Find classes implementing an Interface

I have an interface called IFindMe.  

 

I have 3 classes that implement this interface.

 

I want to search for and retrieve all classes that implement IFindMe
(i.e. should be 3 classes).

 

Can commons-discovery do this?  Going through the Best Practices and the
Guidelines and the Javadoc and trying, the present answer is 'no'.
Please provide an example, or if commons-discovery can not solve this
problem maybe a pointer to how one could (either through reflection, or
parsing through the classpath, or however...).

 

Thanky,

-D


Re: [commons-discovery] Find classes implementing an Interface

Posted by James Carman <ja...@carmanconsulting.com>.
To achieve that, you'd have to do some classpath scanning.

On Fri, Aug 15, 2008 at 10:46 AM, Darren Hartford <dh...@ghsinc.com> wrote:
> I have an interface called IFindMe.
>
>
>
> I have 3 classes that implement this interface.
>
>
>
> I want to search for and retrieve all classes that implement IFindMe
> (i.e. should be 3 classes).
>
>
>
> Can commons-discovery do this?  Going through the Best Practices and the
> Guidelines and the Javadoc and trying, the present answer is 'no'.
> Please provide an example, or if commons-discovery can not solve this
> problem maybe a pointer to how one could (either through reflection, or
> parsing through the classpath, or however...).
>
>
>
> Thanky,
>
> -D
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org