You could take a look at this Stackoverflow question: http://stackoverflow.com/questions/5856096/osgi-get-list-of-classes-in-package
The question assumes you know what package you're talking about, and you can find the exported
packages by using BundleWiring.getProvidedWires(BundleRevision.PACKAGE_NAMESPACE).
Angelo
On May 6, 2011, at 3:05 PM, Cristiano Gavião wrote:
> Hi,
>
> I have a no-osgi api that I'm trying to port to osgi. In this api I have a method that
searchs for all classes in classpath that contain one determinated annotation. So I want to
do the same on OSGi.
>
> I've started this challenge by creating one service bundle and I've create fragments
where is the searchable classes. I can find the properties resources from the fragment nicely...
but I can't find a solution for classes investigation. :-s
>
> I've found one service (org.osgi.service.packageadmin.PackageAdmin) that gives me the
exported packages and fragments (despite the fact it is deprecated and is not part of OSGi
4.3 anymore) of a bundle. But the problem is that the ExportedPackages don't gives me any
option to list the classes contained by it.
>
> How could I do that ?
>
> thanks for any help.
>
> regards,
>
> Cristiano
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
|