code: @Override
     public Enumeration<URL> getResources(final String name) throws IOException
     {
        final ArrayList<Enumeration<URL>> foundResources = new ArrayList<Enumeration<URL>>();
  
        foundResources.add(delegate.getResources(name));
        if (parent != null)
        {
           foundResources.add(parent.getResources(name));
        }
  
        return new Enumeration<URL>()
        {
           private int position = foundResources.size() - 1;
  
           public boolean hasMoreElements()
           {
              while (position >= 0)
              {
                 if (foundResources.get(position).hasMoreElements())
                 {
                    return true;
                 }
                 position--;
              }
              return false;
           }
  
           public URL nextElement()
           {
              while (position >= 0)
              {
                 try
                 {
                    return (foundResources.get(position)).nextElement();
                 }
                 catch (NoSuchElementException e)
                 {
                 }
                 position--;
              }
              throw new NoSuchElementException();
           }
        };
     }
docs: {@inheritDoc}