Class TraitCodegenSettings


  • public final class TraitCodegenSettings
    extends java.lang.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 Detail

      • 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 java.lang.String packageName()
        Java package name to generate traits into.
        Returns:
        package name
      • smithyNamespace

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

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

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