CharacterDefinitionWriter (Lucene 10.5.1 common API)
Description: declaration: package: org.apache.lucene.analysis.morph, class: CharacterDefinitionWriter

Package org.apache.lucene.analysis.morph

# Class CharacterDefinitionWriter<T extends CharacterDefinition>

java.lang.Object
org.apache.lucene.analysis.morph.CharacterDefinitionWriter<T>

public final class CharacterDefinitionWriter<T extends CharacterDefinition> extends Object
Writes character definition file

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CharacterDefinitionWriter(Class<T> implClazz, byte defaultValue, int classCount, CharacterDefinition.LookupCharacterClass lookupCharClass)`
  Constructor for building.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `putCharacterCategory(int codePoint, String characterClassName)`
  Put mapping from unicode code point to character class.
  `void`
  `putInvokeDefinition(String characterClassName, int invoke, int group, int length)`
  `void`
  `write(Path baseDir, String charDefCodecHeader, int charDefCodecVersion)`

  ### Methods inherited from class java.lang.Object

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

- ## Constructor Details

  - ### CharacterDefinitionWriter

    public CharacterDefinitionWriter(Class<T> implClazz, byte defaultValue, int classCount, CharacterDefinition.LookupCharacterClass lookupCharClass)
    Constructor for building. TODO: remove write access

- ## Method Details

  - ### putCharacterCategory

    public void putCharacterCategory(int codePoint, String characterClassName)
    Put mapping from unicode code point to character class.
    Parameters:
      `codePoint` - code point
      `characterClassName` - character class name

  - ### putInvokeDefinition

    public void putInvokeDefinition(String characterClassName, int invoke, int group, int length)

  - ### write

    public void write(Path baseDir, String charDefCodecHeader, int charDefCodecVersion) throws IOException
    Throws:
      `IOException`