## org.apache.lucene.analysis.util
Class CharFilterFactory

    java.lang.Object
      org.apache.lucene.analysis.util.AbstractAnalysisFactory
          org.apache.lucene.analysis.util.CharFilterFactory

Direct Known Subclasses:
  HTMLStripCharFilterFactory, MappingCharFilterFactory, PatternReplaceCharFilterFactory, PersianCharFilterFactory

    public abstract class CharFilterFactory

extends AbstractAnalysisFactory

Abstract parent class for analysis factories that create `CharFilter` instances.

Field Summary

Fields inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory
`args, luceneMatchVersion`

Constructor Summary
`CharFilterFactory()`

Method Summary
`static Set<String>` `availableCharFilters()` returns a list of all available charfilter names
`abstract Reader` `create(Reader input)` Wraps the given Reader with a CharFilter.
`static CharFilterFactory` `forName(String name)` looks up a charfilter by name from context classpath
`static Class<? extends CharFilterFactory>` `lookupClass(String name)` looks up a charfilter class by name from context classpath
`static void` `reloadCharFilters(ClassLoader classloader)` Reloads the factory list from the given `ClassLoader`.

Methods inherited from class org.apache.lucene.analysis.util.AbstractAnalysisFactory
`assureMatchVersion, getArgs, getBoolean, getBoolean, getInt, getInt, getInt, getLines, getLuceneMatchVersion, getOriginalArgs, getPattern, getSnowballWordSet, getWordSet, init, setLuceneMatchVersion, splitFileNames`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CharFilterFactory

    public CharFilterFactory()

Method Detail

### forName

    public static CharFilterFactory forName(String name)

  looks up a charfilter by name from context classpath

### lookupClass

    public static Class<? extends CharFilterFactory> lookupClass(String name)

  looks up a charfilter class by name from context classpath

### availableCharFilters

    public static Set<String> availableCharFilters()

  returns a list of all available charfilter names

### reloadCharFilters

    public static void reloadCharFilters(ClassLoader classloader)

  Reloads the factory list from the given `ClassLoader`. Changes to the factories are visible after the method ends, all iterators (`availableCharFilters()`,...) stay consistent.

  NOTE: Only new factories are added, existing ones are never removed or replaced.

  This method is expensive and should only be called for discovery of new factories on the given classpath/classloader!

### create

    public abstract Reader create(Reader input)

  Wraps the given Reader with a CharFilter.

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