Package org.apache.lucene.analysis.util
Interface ResourceLoader
-
- All Known Implementing Classes:
ClasspathResourceLoader
,FilesystemResourceLoader
public interface ResourceLoader
Abstraction for loading resources (streams, files, and classes).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> java.lang.Class<? extends T>
findClass(java.lang.String cname, java.lang.Class<T> expectedType)
Finds class of the name and expected type<T> T
newInstance(java.lang.String cname, java.lang.Class<T> expectedType)
Creates an instance of the name and expected typejava.io.InputStream
openResource(java.lang.String resource)
Opens a named resource
-
-
-
Method Detail
-
openResource
java.io.InputStream openResource(java.lang.String resource) throws java.io.IOException
Opens a named resource- Throws:
java.io.IOException
-
findClass
<T> java.lang.Class<? extends T> findClass(java.lang.String cname, java.lang.Class<T> expectedType)
Finds class of the name and expected type
-
newInstance
<T> T newInstance(java.lang.String cname, java.lang.Class<T> expectedType)
Creates an instance of the name and expected type
-
-