> I'm using BundleWiring.listResources(path, pattern, option) method to 
> search for classes into a bundle. I'm using pattern = "*.class"
> 
> My problem is that this search is returning inner classes too. like this 

> [com.mypackage.MyClass.class and 
> com.mypackage.MyClass$MyInternal.class]. and I most process only outer 
> classes.
> 
> I couldn't find any doc about how the pattern could be formatted.

As stated in the javadoc[1]:

   Substring matching is supported, as specified in the Filter 
specification, using the wildcard character ("*").

> 
> Could someone tell me if there any way to improve this search to return 
> me only outer classes?
> 

It can't be done with the simple substring matching supported. You will 
need to post-process the returned collection to remove results you don't 
care about.

[1] 
http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleWiring.html#listResources(java.lang.String,%20java.lang.String,%20int)
-- 

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
[email protected]

office: +1 386 848 1781
mobile: +1 386 848 3788

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

Reply via email to