Interface CodeInterceptor.Appender<S extends CodeSection,​W extends AbstractCodeWriter<W>>

    • Method Detail

      • write

        default void write​(W writer,
                           java.lang.String previousText,
                           S section)
        Description copied from interface: CodeInterceptor
        Intercepts an AbstractCodeWriter section.
        Specified by:
        write in interface CodeInterceptor<S extends CodeSection,​W extends AbstractCodeWriter<W>>
        Parameters:
        writer - Writer used to write content. If no write calls are made, any intercepted text is lost.
        previousText - The previous text that was written. This text needs to be written again in order for it to be kept in the section.
        section - The strongly typed section value.
      • append

        void append​(W writer,
                    S section)
        Writes text after previous content in the section.
        Parameters:
        writer - The code writer to write to.
        section - The section being intercepted.