public interface ResourceFinder extends Iterator<String>, AutoCloseable
ResourceConfig
will use all registered finders to obtain classes
to be used as resource classes and/or providers. Method open()
doesn't
need to be called on all returned resource names, ResourceConfig
can ignore
some of them.
Currently, all resource names ending with ".class" will be accepted and processed (opened).
Extends AutoCloseable
since version 2.19. The close()
method is used to release
allocated/opened resources (such as streams). When a resource finder is closed no other method should be
invoked on it.Modifier and Type | Method and Description |
---|---|
void |
close()
Release allocated/opened resources (such as streams).
|
InputStream |
open()
Open current resource.
|
void |
remove()
This operation is not supported by
ResourceFinder & throws UnsupportedOperationException
when invoked. |
void |
reset()
Reset the
ResourceFinder instance. |
forEachRemaining, hasNext, next
InputStream open()
void close()
close
in interface AutoCloseable
void reset()
ResourceFinder
instance.
Upon calling this method the implementing class MUST reset its internal state to the initial state.void remove()
ResourceFinder
& throws UnsupportedOperationException
when invoked.Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.