Package opennlp.tools.util.ext
Class ExtensionLoader
java.lang.Object
opennlp.tools.util.ext.ExtensionLoader
The 
ExtensionLoader is responsible to load extensions to the OpenNLP library.
 Note: Do not use this class, internal use only!
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> TinstantiateExtension(Class<T> clazz, String extensionClassName) Instantiates a user provided extension to OpenNLP.
- 
Method Details- 
instantiateExtensionInstantiates a user provided extension to OpenNLP.The extension is loaded from the class path. Initially, the load is conducted using the public no-arg constructor. If no such constructor is not found, it is checked if the class follows the Singletonpattern: a static field namedINSTANCEthat returns an object of the typeExtensionLoader.- Parameters:
- clazz- A reference to- Class<T>.
- extensionClassName- The (fully-qualified) name of the class by which the extension shall be loaded.
- Returns:
- the instance of the extension class
- Throws:
- ExtensionNotLoadedException- Thrown if the load operation failed.
 
 
-