AbstractClassPathModelFinder (Apache OpenNLP Tools Models 2.5.9 API)
Description: declaration: package: opennlp.tools.models, class: AbstractClassPathModelFinder

# Class AbstractClassPathModelFinder

java.lang.Object
opennlp.tools.models.AbstractClassPathModelFinder

All Implemented Interfaces:
  `ClassPathModelFinder`

Direct Known Subclasses:
  `ClassgraphModelFinder, SimpleClassPathModelFinder`

public abstract class AbstractClassPathModelFinder extends Object implements ClassPathModelFinder
A base implementation of a `ClassPathModelFinder` for the detection of OpenNLP models in the classpath. By default, `AbstractClassPathModelFinder` will scan for JAR files starting with "opennlp-models-*".

This search mask can be adjusted by using the one argument `constructor`. Wildcard search is supported by using asterisk symbol.

See Also:
  - `ClassPathModelFinder`

- ## Field Summary

  ### Fields inherited from interface ClassPathModelFinder

  `OPENNLP_MODEL_JAR_PREFIX`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractClassPathModelFinder()`
  By default, it scans for `ClassPathModelFinder.OPENNLP_MODEL_JAR_PREFIX`.
  `AbstractClassPathModelFinder(String jarModelPrefix)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<ClassPathModelEntry>`
  `findModels(boolean reloadCache)`
  Finds OpenNLP models available within an applications's classpath.

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractClassPathModelFinder

    public AbstractClassPathModelFinder()
    By default, it scans for `ClassPathModelFinder.OPENNLP_MODEL_JAR_PREFIX`.

  - ### AbstractClassPathModelFinder

    public AbstractClassPathModelFinder(String jarModelPrefix)
    Parameters:
      `jarModelPrefix` - The leafnames of the jars that should be canned (e.g. "opennlp.jar"). May contain a wildcard glob ("opennlp-*.jar"). It must not be `null`.

- ## Method Details

  - ### findModels

    public Set<ClassPathModelEntry> findModels(boolean reloadCache)
    Description copied from interface: `ClassPathModelFinder`
    Finds OpenNLP models available within an applications's classpath.
    Specified by:
      `findModels` in interface `ClassPathModelFinder`
    Parameters:
      `reloadCache` - `true`, if the internal cache should explicitly be reloaded, `false` otherwise.
    Returns:
      A `Set` of `model entries`. It might be empty, if none were found.