commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Commons Discovery - how can you find all classes that implements your interface ?
Date Wed, 23 Jan 2008 21:40:39 GMT
I found this 'Commons Discovery' component when I was googling to try to figure
out how to implement a method like this, which should locate all classes that
are available at the classpath that implements a certain interface:
Class[] getImplementingClasses(Class someInterface)'
or even better (more
'public Class[] getSubtypes(Class someBaseType)'
(where basetype
can be either an interface or a baseclass, while a subtype can be a subclass
or subinterface)

It seems to me as this should be possible, considering
the following quote from the homepage:
"Fundamentally, Discovery locates
classes that implement a given Java interface."

However, I can not find
any code example about how to do this.

/ Tom

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message