Re: Reflection: discovering the implementations of an interface
- From: Piotr Kobzda <pikob@xxxxxxxxx>
- Date: Tue, 10 Oct 2006 14:19:15 +0200
z-man wrote:
What's the smoother way to discover via reflection all the classes
implementing a specific interface inside a package?
Not necessarily smoother but possibly most accurate way to achieve that is to instrument your program with you own agent (see java.lang.instrument package specifications on how to do that), and than having Instrumentation instance (passed to the agent's premain() by the JVM) filter the results of getAllLoadedClasses() call on that instance.
piotr
.
- Follow-Ups:
- References:
- Prev by Date: Re: Need help with my logic
- Next by Date: Re: java memory leak in cygwin('s Xwin)?
- Previous by thread: Re: Reflection: discovering the implementations of an interface
- Next by thread: Re: Reflection: discovering the implementations of an interface
- Index(es):