Class EnumRefTextCollectingVisitor.OrdinalRenderer

    • Method Detail

      • render

        public void render​(int referenceOrdinal,
                           EnumeratedReferenceBlock referenceFormat,
                           java.lang.String defaultText,
                           boolean needSeparator)
        Description copied from interface: EnumeratedOrdinalRenderer
        Render individual reference format
        Specified by:
        render in interface EnumeratedOrdinalRenderer
        Parameters:
        referenceOrdinal - ordinal for the reference
        referenceFormat - reference format or null
        defaultText - default text to use if referenceFormat is null or not being used
        needSeparator - true if need to add separator character after output of referenceOrdinal

        Should set current enum ordinal runnable to output the given referenceOrdinal if referenceFormat is not null the runnable is saved before this call and restored after so there is no need to save its value.

        NOTE: if referenceFormat is null and the current runnable is not null then it should be run after output of default text and before output of referenceOrdinal, to make sure that parent compound ordinal formats are output.