Examples of ResourceNameIterator


Examples of org.apache.commons.discovery.ResourceNameIterator

     */
    public ResourceNameIterator findResourceNames(final String resourceName) {
        if (log.isDebugEnabled())
            log.debug("find: resourceName='" + resourceName + "'");

        return new ResourceNameIterator() {
            private int idx = 0;
            private ResourceNameIterator iterator = null;
           
            public boolean hasNext() {
                if (iterator == null  ||  !iterator.hasNext()) {
                    iterator = getNextIterator();
                    if (iterator == null) {
                        return false;
                    }
                }
                return iterator.hasNext();
            }
           
            public String nextResourceName() {
                return iterator.nextResourceName();
            }
           
            private ResourceNameIterator getNextIterator() {
                while (idx < size()) {
                    ResourceNameIterator iter =
                        getResourceNameDiscover(idx++).findResourceNames(resourceName);

                    if (iter.hasNext()) {
                        return iter;
                    }
                }
                return null;
            }
View Full Code Here

Examples of org.apache.commons.discovery.ResourceNameIterator

            resources = (String[])baseResource;
        } else {
            resources = null;
        }

        return new ResourceNameIterator() {
            private int idx = 0;
           
            public boolean hasNext() {
                if (resources != null) {
                    while (idx < resources.length  &&  resources[idx] == null) {
View Full Code Here

Examples of org.apache.commons.discovery.ResourceNameIterator

            } else {
                log.debug("find: resourceName='" + resourceName + "', lookup property '" + mappedName + "'");
            }
        }

        return new ResourceNameIterator() {
            private String resource =
                (mappedName == null) ? null : ManagedProperties.getProperty(mappedName);
           
            public boolean hasNext() {
                return resource != null;
View Full Code Here

Examples of org.apache.commons.discovery.ResourceNameIterator

            loaders = ClassLoaders.getAppLoaders(spi.getSPClass(),
                                                 Service.class,
                                                 true);
        }
       
        ResourceNameIterator servicesIter =
            (new DiscoverServiceNames(loaders)).findResourceNames(spi.getSPName());

        final ResourceClassIterator services =
            (new DiscoverClasses(loaders)).findResourceClasses(servicesIter);
       
View Full Code Here

Examples of org.apache.commons.discovery.ResourceNameIterator

     */
    public ResourceNameIterator findResourceNames(final String fileName) {
        if (log.isDebugEnabled())
            log.debug("find: fileName='" + fileName + "'");

        return new ResourceNameIterator() {
            private ResourceIterator files =
                getDiscover().findResources(fileName);

            private int idx = 0;
            private Vector classNames = null;
View Full Code Here

Examples of org.apache.commons.discovery.ResourceNameIterator

     */
    public ResourceNameIterator findResourceNames(final String resourceName) {
        if (log.isDebugEnabled())
            log.debug("find: resourceName='" + resourceName + "'");

        return new ResourceNameIterator() {
            private String resource = System.getProperty(resourceName);
           
            public boolean hasNext() {
                return resource != null;
            }
View Full Code Here

Examples of org.apache.wicket.core.util.resource.locator.ResourceNameIterator

        {
          path = packageName + "/" + path;
        }

        // Iterator over all the combinations
        ResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation);
        while (iter.hasNext())
        {
          String newPath = iter.next();

          Properties props = propertiesFactory.load(clazz, newPath);
          if (props != null)
          {
            // Lookup the value
View Full Code Here

Examples of org.apache.wicket.core.util.resource.locator.ResourceNameIterator

    {
      // Create the base path
      String path = clazz.getName().replace('.', '/');

      // Iterator over all the combinations
      ResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation);
      while (iter.hasNext())
      {
        String newPath = iter.next();

        Properties props = propertiesFactory.load(clazz, newPath);
        if (props != null)
        {
          // Lookup the value
View Full Code Here

Examples of org.apache.wicket.util.resource.locator.ResourceNameIterator

    {
      // Create the base path
      String path = clazz.getName().replace('.', '/');

      // Iterator over all the combinations
      ResourceNameIterator iter = new ResourceNameIterator(path, style, locale, null);
      while (iter.hasNext())
      {
        String newPath = iter.next();

        final Properties props = propertiesFactory.load(clazz, newPath);
        if (props != null)
        {
          // Lookup the value
View Full Code Here

Examples of org.apache.wicket.util.resource.locator.ResourceNameIterator

        {
          path = packageName + "/" + path;
        }

        // Iterator over all the combinations
        ResourceNameIterator iter = newResourceNameIterator(path, locale, style, variation);
        while (iter.hasNext())
        {
          String newPath = iter.next();

          Properties props = propertiesFactory.load(clazz, newPath);
          if (props != null)
          {
            // Lookup the value
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.