Hello all,

I am working on a design which involves generating new classes at runtime,
so that afterwards I can create one or more instances which will be
registered as services.  Generating the class files (or byte arrays) goes
fine, introducing them into the environment is less obvious; I need to
somehow persuade some bundle classloader to read in my hand-crafted bytes
and pass them to defineClass().  The best I have been able to come up with
so far is to wrap up the generated class in a bundle fragment and ask the
framework to install this - which seems a little baroque, so I am just
wondering if there is some API I've missed which would do this more
naturally?

If I wanted to modify the original class I could of course use weaving
hooks, but I would really prefer to create a new class.

Thanks,

Chris


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

Reply via email to