Class JavadocFormatterInterceptor
- java.lang.Object
-
- software.amazon.smithy.traitcodegen.integrations.core.JavadocFormatterInterceptor
-
- All Implemented Interfaces:
CodeInterceptor<JavaDocSection,TraitCodegenWriter>
public class JavadocFormatterInterceptor extends java.lang.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
Constructors Constructor Description JavadocFormatterInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<JavaDocSection>sectionType()Get the strongly typedCodeSectionthis interceptor is used to intercept.voidwrite(TraitCodegenWriter writer, java.lang.String previousText, JavaDocSection section)Intercepts anAbstractCodeWritersection.-
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
-
-
-
-
Method Detail
-
sectionType
public java.lang.Class<JavaDocSection> sectionType()
Description copied from interface:CodeInterceptorGet the strongly typedCodeSectionthis interceptor is used to intercept.- Specified by:
sectionTypein interfaceCodeInterceptor<JavaDocSection,TraitCodegenWriter>- Returns:
- The code section to intercept.
-
write
public void write(TraitCodegenWriter writer, java.lang.String previousText, JavaDocSection section)
Description copied from interface:CodeInterceptorIntercepts anAbstractCodeWritersection.- Specified by:
writein 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.
-
-