Class JavadocFormatterInterceptor
java.lang.Object
software.amazon.smithy.traitcodegen.integrations.core.JavadocFormatterInterceptor
- All Implemented Interfaces:
CodeInterceptor<JavaDocSection,
TraitCodegenWriter>
public class JavadocFormatterInterceptor
extends Object
implements CodeInterceptor<JavaDocSection,TraitCodegenWriter>
Formats any populated Javadoc comment sections as documentation comments.
This interceptor will run after all other Javadoc interceptors to ensure it picks up all content added to Jav doc sections. Javadoc sections with no content are discarded.
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.utils.CodeInterceptor
CodeInterceptor.Appender<S extends CodeSection,
W extends AbstractCodeWriter<W>>, CodeInterceptor.Prepender<S extends CodeSection, W extends AbstractCodeWriter<W>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the strongly typedCodeSection
this interceptor is used to intercept.void
write
(TraitCodegenWriter writer, String previousText, JavaDocSection section) Intercepts anAbstractCodeWriter
section.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.smithy.utils.CodeInterceptor
isIntercepted
-
Constructor Details
-
JavadocFormatterInterceptor
public JavadocFormatterInterceptor()
-
-
Method Details
-
sectionType
Description copied from interface:CodeInterceptor
Get the strongly typedCodeSection
this interceptor is used to intercept.- Specified by:
sectionType
in interfaceCodeInterceptor<JavaDocSection,
TraitCodegenWriter> - Returns:
- The code section to intercept.
-
write
Description copied from interface:CodeInterceptor
Intercepts anAbstractCodeWriter
section.- Specified by:
write
in interfaceCodeInterceptor<JavaDocSection,
TraitCodegenWriter> - 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.
-