Class ReferencesInterceptor
java.lang.Object
software.amazon.smithy.docgen.interceptors.ReferencesInterceptor
- All Implemented Interfaces:
- CodeInterceptor<ShapeDetailsSection,,- DocWriter> - CodeInterceptor.Appender<ShapeDetailsSection,- DocWriter> 
public final class ReferencesInterceptor
extends Object
implements CodeInterceptor.Appender<ShapeDetailsSection,DocWriter> 
Adds a "see also" to structures / operations that reference resources using
 the references trait.
- 
Nested Class SummaryNested classes/interfaces inherited from interface software.amazon.smithy.utils.CodeInterceptorCodeInterceptor.Appender<S extends CodeSection,W extends AbstractCodeWriter<W>>, CodeInterceptor.Prepender<S extends CodeSection, W extends AbstractCodeWriter<W>> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidappend(DocWriter writer, ShapeDetailsSection section) Writes text after previous content in the section.booleanisIntercepted(ShapeDetailsSection section) Checks if the given section is filtered by this interceptor or not.Get the strongly typedCodeSectionthis interceptor is used to intercept.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.smithy.utils.CodeInterceptor.Appenderwrite
- 
Constructor Details- 
ReferencesInterceptorpublic ReferencesInterceptor()
 
- 
- 
Method Details- 
sectionTypeDescription copied from interface:CodeInterceptorGet the strongly typedCodeSectionthis interceptor is used to intercept.- Specified by:
- sectionTypein interface- CodeInterceptor<ShapeDetailsSection,- DocWriter> 
- Returns:
- The code section to intercept.
 
- 
isInterceptedDescription copied from interface:CodeInterceptorChecks if the given section is filtered by this interceptor or not.In some cases CodeInterceptor.sectionType()might allow filtering a wider array of types than what is actually filtered by an interceptor. The most common example of this is intercepting any type of CodeSection and only filtering based on the result ofCodeSection.sectionName().This method will return trueby default, meaning that any type ofCodeSectionthat is an instance of the class returned fromCodeInterceptor.sectionType()will be intercepted.- Specified by:
- isInterceptedin interface- CodeInterceptor<ShapeDetailsSection,- DocWriter> 
- Parameters:
- section- Section to test if this interceptor is relevant.
- Returns:
- Returns true if the section is intercepted or not.
 
- 
appendDescription copied from interface:CodeInterceptor.AppenderWrites text after previous content in the section.- Specified by:
- appendin interface- CodeInterceptor.Appender<ShapeDetailsSection,- DocWriter> 
- Parameters:
- writer- The code writer to write to.
- section- The section being intercepted.
 
 
-