Class Analyzer.ReuseStrategy

    • Constructor Detail

      • ReuseStrategy

        public ReuseStrategy()
        Sole constructor. (For invocation by subclass constructors, typically implicit.)
    • Method Detail

      • getReusableComponents

        public abstract Analyzer.TokenStreamComponents getReusableComponents​(Analyzer analyzer,
                                                                             java.lang.String fieldName)
        Gets the reusable TokenStreamComponents for the field with the given name.
        Parameters:
        analyzer - Analyzer from which to get the reused components. Use getStoredValue(Analyzer) and setStoredValue(Analyzer, Object) to access the data on the Analyzer.
        fieldName - Name of the field whose reusable TokenStreamComponents are to be retrieved
        Returns:
        Reusable TokenStreamComponents for the field, or null if there was no previous components for the field
      • setReusableComponents

        public abstract void setReusableComponents​(Analyzer analyzer,
                                                   java.lang.String fieldName,
                                                   Analyzer.TokenStreamComponents components)
        Stores the given TokenStreamComponents as the reusable components for the field with the give name.
        Parameters:
        fieldName - Name of the field whose TokenStreamComponents are being set
        components - TokenStreamComponents which are to be reused for the field