org.apache.lucene.analysis

## Class MockBytesAnalyzer

- java.lang.Object
- - org.apache.lucene.analysis.Analyzer
  - - org.apache.lucene.analysis.MockBytesAnalyzer

- All Implemented Interfaces:
    Closeable, AutoCloseable

      public final class MockBytesAnalyzer
      extends Analyzer

  Analyzer for testing that encodes terms as UTF-16 bytes.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.analysis.Analyzer

      `Analyzer.ReuseStrategy, Analyzer.TokenStreamComponents`

  - ### Field Summary

    - ### Fields inherited from class org.apache.lucene.analysis.Analyzer

      `GLOBAL_REUSE_STRATEGY, PER_FIELD_REUSE_STRATEGY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MockBytesAnalyzer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected AttributeFactory` | `attributeFactory(String fieldName)`
    `protected Analyzer.TokenStreamComponents` | `createComponents(String fieldName)`

    - ### Methods inherited from class org.apache.lucene.analysis.Analyzer

      `close, getOffsetGap, getPositionIncrementGap, getReuseStrategy, getVersion, initReader, initReaderForNormalization, normalize, normalize, setVersion, tokenStream, tokenStream`

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

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

- - ### Constructor Detail

    - #### MockBytesAnalyzer

          public MockBytesAnalyzer()

  - ### Method Detail

    - #### createComponents

          protected Analyzer.TokenStreamComponents createComponents(String fieldName)

      Specified by:
        `createComponents` in class `Analyzer`

    - #### attributeFactory

          protected AttributeFactory attributeFactory(String fieldName)

      Overrides:
        `attributeFactory` in class `Analyzer`

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