C
- Smithy CodegenContext
to use in directed methods.S
- Settings object passed to directed methods as part of the context.public interface DirectedCodegen<C extends CodegenContext<S,?>,S>
SmithyIntegration
,
SymbolProvider
, CodegenContext
, SymbolWriter
,
and WriterDelegator
.Modifier and Type | Method and Description |
---|---|
C |
createContext(CreateContextDirective<S> directive)
Creates the codegen context object.
|
SymbolProvider |
createSymbolProvider(CreateSymbolProviderDirective<S> directive)
Create the
SymbolProvider used to map shapes to code symbols. |
default void |
customizeAfterIntegrations(CustomizeDirective<C,S> directive)
Performs any necessary code generation after all shapes are generated,
using the created codegen context object after all integrations have
performed customizations.
|
default void |
customizeBeforeIntegrations(CustomizeDirective<C,S> directive)
Performs any necessary code generation after all shapes are generated,
using the created codegen context object before integrations perform
customizations.
|
void |
generateEnumShape(GenerateEnumDirective<C,S> directive)
Generates the code needed for an enum shape, whether it's a string shape
marked with the enum trait, or a proper enum shape introduced in Smithy
IDL 2.0.
|
void |
generateError(GenerateErrorDirective<C,S> directive)
Generates the code needed for an error structure.
|
default void |
generateResource(GenerateResourceDirective<C,S> directive)
Generates the code needed for a resource shape.
|
void |
generateService(GenerateServiceDirective<C,S> directive)
Generates the code needed for a service shape.
|
void |
generateStructure(GenerateStructureDirective<C,S> directive)
Generates the code needed for a structure shape.
|
void |
generateUnion(GenerateUnionDirective<C,S> directive)
Generates the code needed for a union shape.
|
SymbolProvider createSymbolProvider(CreateSymbolProviderDirective<S> directive)
SymbolProvider
used to map shapes to code symbols.directive
- Directive context data.C createContext(CreateContextDirective<S> directive)
directive
- Directive context data.void generateService(GenerateServiceDirective<C,S> directive)
directive
- Directive to perform.default void generateResource(GenerateResourceDirective<C,S> directive)
directive
- Directive to perform.void generateStructure(GenerateStructureDirective<C,S> directive)
This method should not be invoked for structures marked with the
error
trait.
directive
- Directive to perform.void generateError(GenerateErrorDirective<C,S> directive)
directive
- Directive to perform.void generateUnion(GenerateUnionDirective<C,S> directive)
directive
- Directive to perform.void generateEnumShape(GenerateEnumDirective<C,S> directive)
directive
- Directive to perform.default void customizeBeforeIntegrations(CustomizeDirective<C,S> directive)
directive
- Directive to perform.default void customizeAfterIntegrations(CustomizeDirective<C,S> directive)
This method should be used to do things like:
directive
- Directive to perform.