S
- The type of section to intercept.W
- The type of code writer.public static interface CodeInterceptor.Appender<S extends CodeSection,W extends AbstractCodeWriter<W>> extends CodeInterceptor<S,W>
The previously written text is written before append(AbstractCodeWriter, CodeSection)
is called. The previously written text is only included if it's a non-empty string.
CodeInterceptor.Appender<S extends CodeSection,W extends AbstractCodeWriter<W>>, CodeInterceptor.Prepender<S extends CodeSection,W extends AbstractCodeWriter<W>>
Modifier and Type | Method and Description |
---|---|
void |
append(W writer,
S section)
Writes text after previous content in the section.
|
default void |
write(W writer,
java.lang.String previousText,
S section)
Intercepts an
AbstractCodeWriter section. |
appender, forName, isIntercepted, sectionType
default void write(W writer, java.lang.String previousText, S section)
CodeInterceptor
AbstractCodeWriter
section.write
in interface CodeInterceptor<S extends CodeSection,W extends AbstractCodeWriter<W>>
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.