Class MappedReservedWords.Builder

java.lang.Object
software.amazon.smithy.codegen.core.MappedReservedWords.Builder
All Implemented Interfaces:
SmithyBuilder<ReservedWords>
Enclosing class:
MappedReservedWords

public static final class MappedReservedWords.Builder extends Object implements SmithyBuilder<ReservedWords>
Builder to create a new MappedReservedWords instance.
  • Method Details

    • put

      public MappedReservedWords.Builder put(String reservedWord, String conversion)
      Add a new reserved words.
      Parameters:
      reservedWord - Reserved word to convert.
      conversion - Word to convert to.
      Returns:
      Returns the builder.
    • putCaseInsensitive

      public MappedReservedWords.Builder putCaseInsensitive(String reservedWord, String conversion)
      Add a new case-insensitive reserved word that converts the given reserved word to the given conversion string.

      Note that the conversion string is used literally. The casing of the original word has no effect on the conversion. Use ReservedWordsBuilder for a case-insensitive reserved words implementation that can take casing into account.

      Parameters:
      reservedWord - Case-insensitive reserved word to convert.
      conversion - Word to convert to.
      Returns:
      Returns the builder.
    • build

      public ReservedWords build()
      Builds the reserved words.
      Specified by:
      build in interface SmithyBuilder<ReservedWords>
      Returns:
      Returns the created reserved words implementation.