Class WebAppResourcesScanner

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.util.Iterator<java.lang.String>, ResourceFinder

    final class WebAppResourcesScanner
    extends AbstractResourceFinderAdapter
    A scanner that recursively scans resources within a Web application.
    • Constructor Summary

      Constructors 
      Constructor Description
      WebAppResourcesScanner​(javax.servlet.ServletContext sc)
      Scan from a set of web resource paths.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Default implementation of #close() which does nothing.
      boolean hasNext()  
      java.lang.String next()  
      java.io.InputStream open()
      Open current resource.
      private void processPaths​(java.lang.String... paths)  
      void reset()
      Reset the ResourceFinder instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • paths

        private static final java.lang.String[] paths
      • sc

        private final javax.servlet.ServletContext sc
    • Constructor Detail

      • WebAppResourcesScanner

        WebAppResourcesScanner​(javax.servlet.ServletContext sc)
        Scan from a set of web resource paths.

        Parameters:
        sc - ServletContext.
    • Method Detail

      • processPaths

        private void processPaths​(java.lang.String... paths)
      • hasNext

        public boolean hasNext()
      • next

        public java.lang.String next()
      • open

        public java.io.InputStream open()
        Description copied from interface: ResourceFinder
        Open current resource.
        Returns:
        input stream from which current resource can be loaded.
      • reset

        public void reset()
        Description copied from interface: ResourceFinder
        Reset the ResourceFinder instance.

        Upon calling this method the implementing class MUST reset its internal state to the initial state.