No there is no setter.  The added dynamic imports contained in the
List<String> do not go into effect until after all WeavingHooks are called
(just before the class is going to be defined).

What you are doing should work assuming there really is a resolved bundle
in your framework instance that is exporting "my.package.name".  BTW, I
hope "my.package.name" is not literally your package name since I think
using "package" as a package segment is not allowed.  ;-)

Tom




                                                                       
  From:       Felix Mayerhuber <[email protected]>            
                                                                       
  To:         [email protected],                                  
                                                                       
  Date:       06/27/2012 01:54 PM                                      
                                                                       
  Subject:    [osgi-dev] Re: Weaving Hook question                     
                                                                       





Hi,

thanks for the fast responses, but it seems that I do something wrong. I
use this code here:

wovenClass.getDynamicImports().add("my.package.name");

But still I have the problem that the class which lies in the added
package can't be loaded at runtime. Is there somewhere a setter for the
import list?

Kind regards
Felix
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev


<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to