Class TraitCodegenContext
- java.lang.Object
-
- software.amazon.smithy.traitcodegen.TraitCodegenContext
-
- All Implemented Interfaces:
CodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
public final class TraitCodegenContext extends java.lang.Object implements CodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
Contextual information that is made available during most parts of trait code generation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileManifest
fileManifest()
java.util.List<TraitCodegenIntegration>
integrations()
Model
model()
TraitCodegenSettings
settings()
SymbolProvider
symbolProvider()
WriterDelegator<TraitCodegenWriter>
writerDelegator()
Get the WriterDelegator used for generating code.
-
-
-
Method Detail
-
model
public Model model()
- Specified by:
model
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Gets the model being code generated.
-
settings
public TraitCodegenSettings settings()
- Specified by:
settings
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Gets code generation settings.
-
symbolProvider
public SymbolProvider symbolProvider()
- Specified by:
symbolProvider
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Gets the SymbolProvider used for code generation.
-
fileManifest
public FileManifest fileManifest()
- Specified by:
fileManifest
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Gets the FileManifest being written to for code generation.
-
writerDelegator
public WriterDelegator<TraitCodegenWriter> writerDelegator()
Description copied from interface:CodegenContext
Get the WriterDelegator used for generating code.Generates might need other delegators for specific purposes, and it's fine to add more methods for those specific purposes. If an implementation uses a specific subclass of a WriterDelegator, implementations can override this method to return a more specific WriterDelegator type.
- Specified by:
writerDelegator
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Returns the writer delegator used by the generator.
-
integrations
public java.util.List<TraitCodegenIntegration> integrations()
- Specified by:
integrations
in interfaceCodegenContext<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenIntegration>
- Returns:
- Gets the SmithyIntegrations used for code generation.
-
-