Use ClassLoaders.ownsClass(loader, targetClass) to identify which
ClassLoader owns a given class. Basically compare
MyClass.class.getClassLoader() to addon.getClassLoader().
On Fri, Aug 15, 2014 at 12:01 AM, Ondrej Zizka <ozizka(a)redhat.com> wrote:
Hi,
let's say I want to look for a class, but only in given Addon's scope.
I.e. not in it's dependencies.
How would I do that, in an effective way?
addon.getClassLoader().loadClass() would give me (I suppose) transitive
classloaders' results too.
addon.getRepository().getAddonResources(addon.getId()) and traversing
the results seems to be ugly solution.
Anything better?
Thanks,
Ondra
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."