Sorry for the ignorance ... I saw this statement in the javadoc, but I
did not understand what that means.
Could you point me to any example of that Substring matching supported?
Searching for Filter specification couldn't help much too
(http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/Filter.html)
Yep, I could resolve the problem using an iterator and remove the ones
that has the "$" character.
thanks,
Cristiano
On 24/04/13 16:01, BJ Hargrave wrote:
> 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)
<http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/wiring/BundleWiring.html#listResources%28java.lang.String,%20java.lang.String,%20int%29>
--
*BJ Hargrave*
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the _OSGi Alliance_ <http://www.osgi.org/>_
[email protected]_ <mailto:[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
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev