Package org.apache.lucene.util
Interface ResourceLoader
- All Known Implementing Classes:
ClasspathResourceLoader
,ModuleResourceLoader
public interface ResourceLoader
Abstraction for loading resources (streams, files, and classes).
-
Method Summary
Modifier and TypeMethodDescription<T> Class<? extends T>
Finds class of the name and expected typedefault <T> T
newInstance
(String cname, Class<T> expectedType) Creates an instance of the name and expected typeopenResource
(String resource) Opens a named resource
-
Method Details
-
openResource
Opens a named resource- Throws:
IOException
-
findClass
Finds class of the name and expected type -
newInstance
Creates an instance of the name and expected type
-