Class TraitCodegenSettings

java.lang.Object
software.amazon.smithy.traitcodegen.TraitCodegenSettings

public final class TraitCodegenSettings extends Object
Settings for trait code generation. These can be set in the smithy-build.json configuration for this plugin.

The following options are provided:

"packageName" (String)
Sets the package namespace to use for generated Java classes.
"headerLines" (List<String>)
Defines the header comment to include in all output files. Use this setting to add license and/or author information to all generated files. Each entry in the list is generated as a new line in the generated comment.
"excludeTags" (List<String>)
List of Smithy tags to use for filtering out trait shapes from the trait code generation process.
  • Method Details

    • fromNode

      public static TraitCodegenSettings fromNode(ObjectNode node)
      Loads settings from an ObjectNode.
      Parameters:
      node - object node to load settings from
      Returns:
      settings loaded from given node
    • packageName

      public String packageName()
      Java package name to generate traits into.
      Returns:
      package name
    • smithyNamespace

      public String smithyNamespace()
      Smithy namespace to search for traits.
      Returns:
      namespace
    • headerLines

      public List<String> headerLines()
      List of lines added to the top of every generated file as a header.
      Returns:
      header lines as a list
    • excludeTags

      public List<String> excludeTags()
      List of tags to exclude from shape code generation.
      Returns:
      tag list