Package software.amazon.smithy.docgen
Class DocSymbolProvider.FileExtensionDecorator
java.lang.Object
software.amazon.smithy.docgen.DocSymbolProvider.FileExtensionDecorator
- All Implemented Interfaces:
 SymbolProvider
- Enclosing class:
 - DocSymbolProvider
 
public static final class DocSymbolProvider.FileExtensionDecorator
extends Object
implements SymbolProvider
Adds file extensions to symbol definition files. Used with 
DocFormat
 by default.
 Symbols can set DocSymbolProvider.ENABLE_DEFAULT_FILE_EXTENSION to false to
 disable this on a per-symbol basis.
- 
Constructor Summary
ConstructorsConstructorDescriptionFileExtensionDecorator(SymbolProvider wrapped, String extension) Constructor. - 
Method Summary
Modifier and TypeMethodDescriptiontoMemberName(MemberShape shape) Converts a member shape to a member/property name of a containing data structure.Gets the symbol to define for the given shape. 
- 
Constructor Details
- 
FileExtensionDecorator
Constructor.- Parameters:
 wrapped- The symbol provider to wrap.extension- The file extension to add. This must include any necessary periods.
 
 - 
 - 
Method Details
- 
toSymbol
Description copied from interface:SymbolProviderGets the symbol to define for the given shape.A "symbol" represents the qualified name of a type in a target programming language.
- When given a structure, union, resource, or service shape, this method should provide the namespace and name of the type to generate.
 - When given a simple type like a string, number, or timestamp, this method should return the language-specific type of the shape.
 - When given a member shape, this method should return the language specific type to use as the target of the member.
 - When given a list, set, or map, this method should return the language specific type to use for the shape (e.g., a map shape for a Python code generator might return "dict".
 
- Specified by:
 toSymbolin interfaceSymbolProvider- Parameters:
 shape- Shape to get the class name of.- Returns:
 - Returns the generated class name.
 
 - 
toMemberName
Description copied from interface:SymbolProviderConverts a member shape to a member/property name of a containing data structure.The default implementation will return the member name of the provided shape ID and should be overridden if necessary.
- Specified by:
 toMemberNamein interfaceSymbolProvider- Parameters:
 shape- Shape to convert.- Returns:
 - Returns the converted member name.
 
 
 -