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

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> Class<? extends T>` | `findClass(String cname, Class<T> expectedType)` Finds class of the name and expected type
    `<T> T` | `newInstance(String cname, Class<T> expectedType)` Creates an instance of the name and expected type
    `InputStream` | `openResource(String resource)` Opens a named resource

- - ### Method Detail

    - #### openResource

          InputStream openResource(String resource)
                                   throws IOException

      Opens a named resource
      Throws:
        `IOException`

    - #### findClass

          <T> Class<? extends T> findClass(String cname,
                                         Class<T> expectedType)

      Finds class of the name and expected type

    - #### newInstance

          <T> T newInstance(String cname,
                          Class<T> expectedType)

      Creates an instance of the name and expected type

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.