Examples of findEntries()


Examples of org.eclipse.osgi.baseadaptor.BaseAdaptor.findEntries()

      datas.add(fragmentClasspath.getBundleData());

    @SuppressWarnings("unchecked")
    List<URL> result = Collections.EMPTY_LIST;
    // now search over all the bundle files
    Enumeration<URL> eURLs = adaptor.findEntries(datas, path, filePattern, options);
    if (eURLs == null)
      return result;
    result = new ArrayList<URL>();
    while (eURLs.hasMoreElements())
      result.add(eURLs.nextElement());
View Full Code Here

Examples of org.eclipse.osgi.framework.adaptor.BundleClassLoader.findEntries()

        return null;
      @SuppressWarnings("unchecked")
      List<URL> result = Collections.EMPTY_LIST;
      BundleClassLoader bcl = getBundleClassLoader();
      if (bcl != null)
        result = bcl.findEntries(path, filePattern, options);
      return Collections.unmodifiableList(result);
    }

    public Collection<String> listResources(String path, String filePattern, int options) {
      if (!hasResourcePermission() || !isInUse())
View Full Code Here

Examples of org.jboss.gravia.runtime.spi.ModuleEntriesProvider.findEntries()

    @Override
    public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse) {
        ModuleEntriesProvider entriesProvider = module.adapt(ModuleEntriesProvider.class);
        Enumeration<URL> result = null;
        if (entriesProvider != null) {
            List<URL> paths = entriesProvider.findEntries(path, filePattern, recurse);
            if (paths.size() > 0) {
                Vector<URL> vector = new Vector<URL>(paths);
                result = vector.elements();
            }
        }
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

        //   all the embedded jars are at the top level, no recursion needed
        //   All the jars are not needed - only the uimaj core one
        //     any other jars will be provided by the launching project's class path
        //     uimaj-core provided because the launcher itself needs uimaj-core classes
        //  Found empirically that recursion is need to find the jar in development mode
        Enumeration<?> jarEnum = bundle.findEntries("/", "uimaj-core*.jar", Platform.inDevelopmentMode());
        while (jarEnum != null && jarEnum.hasMoreElements()) {
          URL element = (URL) jarEnum.nextElement();
          extendedClasspath.add(FileLocator.toFileURL(element).getFile());
        }
      }       
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

        String path = i == -1 ? "/" : icon.substring(0, i);
        String name = i == -1 ? icon : icon.substring(i + 1);

        Bundle b = Platform.getBundle(ext.getContributor().getName());

        Enumeration<URL> en = b.findEntries(path, name, false);
        Image image = null;

        if (en.hasMoreElements())
        {
            try
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

    {
        if (null != langMap)
            return langMap;
        final Map map = new HashMap();
        final Bundle bundle = bundleContext.getBundle();
        final Enumeration e = bundle.findEntries("res/flags", null, false); //$NON-NLS-1$
        while (e != null && e.hasMoreElements())
        {
            final URL img = (URL) e.nextElement();
            final String name = FilenameUtils.getBaseName(img.getFile());
            try
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

    {
        final URL[] descriptors = new URL[]
            { new URL( "file:foo.xml" ) };
        final Enumeration de = new Vector( Arrays.asList( descriptors ) ).elements();
        final Bundle bundle = ( Bundle ) EasyMock.createNiceMock( Bundle.class );
        EasyMock.expect( bundle.findEntries( "/some/location", "foo.xml", false ) ).andReturn( de );

        EasyMock.replay( new Object[]
            { bundle } );
        final URL[] urls = BundleComponentActivator.findDescriptors( bundle, "/some/location/foo.xml" );
        EasyMock.verify( new Object[]
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

                new URL( "file:foo1.xml" ),
                new URL( "file:foo2.xml" )
            };
        final Enumeration de = new Vector( Arrays.asList( urls ) ).elements();
        final Bundle bundle = (Bundle) EasyMock.createNiceMock( Bundle.class );
        EasyMock.expect( bundle.findEntries( path, filePattern, false ) ).andReturn( de );

        EasyMock.replay( new Object[]{ bundle } );
        final URL[] actualUrls = BundleComponentActivator.findDescriptors( bundle, location );
        EasyMock.verify( new Object[]{ bundle } );
View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

     */
    public void test_findDescriptors_withWildcardLocation_nullEnum()
        throws MalformedURLException
    {
        final Bundle bundle = (Bundle) EasyMock.createNiceMock( Bundle.class );
        EasyMock.expect( bundle.findEntries( "/", "*.xml", false ) ).andReturn( null );

        EasyMock.replay( new Object[]{ bundle } );
        final URL[] actualUrls = BundleComponentActivator.findDescriptors( bundle, "*.xml" );
        EasyMock.verify( new Object[]{ bundle } );

View Full Code Here

Examples of org.osgi.framework.Bundle.findEntries()

     */
    public void test_findDescriptors_withWildcardLocation_emptyEnum()
        throws MalformedURLException
    {
        final Bundle bundle = (Bundle) EasyMock.createNiceMock( Bundle.class );
        EasyMock.expect( bundle.findEntries( "/", "*.xml", false ) ).andReturn( new Vector().elements() );

        EasyMock.replay( new Object[]{ bundle } );
        final URL[] actualUrls = BundleComponentActivator.findDescriptors( bundle, "*.xml" );
        EasyMock.verify( new Object[]{ bundle } );

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.