[forge-users] [windup-dev] Resources loading - how to limit to an addon?

Lincoln Baxter, III lincolnbaxter at gmail.com
Mon Aug 18 14:16:21 EDT 2014

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 at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/windup-dev

Lincoln Baxter, III
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-users/attachments/20140818/aec77976/attachment.html 

More information about the forge-users mailing list