org.glassfish.jersey.server.internal.scanning
Class ResourceFinderStack

java.lang.Object
  extended by org.glassfish.jersey.server.internal.scanning.ResourceFinderStack
All Implemented Interfaces:
Iterator<String>, ResourceFinder

public class ResourceFinderStack
extends Object
implements ResourceFinder

Stack of ResourceFinder instances. Used to combine various finders into one instance.

Author:
Pavel Bucek (pavel.bucek at oracle.com)

Constructor Summary
ResourceFinderStack()
           
 
Method Summary
 boolean hasNext()
           
 String next()
           
 InputStream open()
          Open current resource.
 void push(ResourceFinder iterator)
           
 void remove()
          

This operation is not supported by ResourceFinder & throws UnsupportedOperationException when invoked.

 void reset()
          Reset the ResourceFinder instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceFinderStack

public ResourceFinderStack()
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<String>

next

public String next()
Specified by:
next in interface Iterator<String>

remove

public void remove()
Description copied from interface: ResourceFinder

This operation is not supported by ResourceFinder & throws UnsupportedOperationException when invoked.

Specified by:
remove in interface Iterator<String>
Specified by:
remove in interface ResourceFinder

open

public InputStream open()
Description copied from interface: ResourceFinder
Open current resource.

Specified by:
open in interface ResourceFinder
Returns:
input stream from which current resource can be loaded.

push

public void push(ResourceFinder iterator)

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.

Specified by:
reset in interface ResourceFinder


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.