Class AnnotationIntegration
- java.lang.Object
-
- software.amazon.smithy.traitcodegen.integrations.annotations.AnnotationIntegration
-
- All Implemented Interfaces:
SmithyIntegration<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenContext>
,TraitCodegenIntegration
public class AnnotationIntegration extends java.lang.Object implements TraitCodegenIntegration
Adds Java annotations to generated Java classes.
-
-
Constructor Summary
Constructors Constructor Description AnnotationIntegration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<? extends CodeInterceptor<? extends CodeSection,TraitCodegenWriter>>
interceptors(TraitCodegenContext codegenContext)
Gets a list ofCodeInterceptor
s to register with theAbstractCodeWriter
s created by the code generator.java.lang.String
name()
Gets the name of the integration.java.util.List<java.lang.String>
runBefore()
Gets the names of integrations that this integration must come before.-
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.codegen.core.SmithyIntegration
configure, customize, decorateSymbolProvider, preprocessModel, priority, runAfter
-
-
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:SmithyIntegration
Gets the name of the integration.This name is referred to when ordering the graph of integrations. The name defaults to the canonical class name if not overridden.
- Specified by:
name
in interfaceSmithyIntegration<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenContext>
- Returns:
- Returns the integration name.
-
runBefore
public java.util.List<java.lang.String> runBefore()
Description copied from interface:SmithyIntegration
Gets the names of integrations that this integration must come before.Dependencies are soft. Dependencies on integration names that cannot be found log a warning and are ignored.
- Specified by:
runBefore
in interfaceSmithyIntegration<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenContext>
- Returns:
- Returns the integration names this must come before.
-
interceptors
public java.util.List<? extends CodeInterceptor<? extends CodeSection,TraitCodegenWriter>> interceptors(TraitCodegenContext codegenContext)
Description copied from interface:SmithyIntegration
Gets a list ofCodeInterceptor
s to register with theAbstractCodeWriter
s created by the code generator.This integration method should be called only after
SmithyIntegration.preprocessModel(software.amazon.smithy.model.Model, S)
andSmithyIntegration.decorateSymbolProvider(software.amazon.smithy.model.Model, S, software.amazon.smithy.codegen.core.SymbolProvider)
.- Specified by:
interceptors
in interfaceSmithyIntegration<TraitCodegenSettings,TraitCodegenWriter,TraitCodegenContext>
- Parameters:
codegenContext
- Code generation context that can be queried when creating interceptors.- Returns:
- Returns the list of
CodeInterceptor
s.
-
-