Class CfnConverter


  • public final class CfnConverter
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CfnConverter classLoader​(java.lang.ClassLoader classLoader)
      Sets a ClassLoader to use to discover Smithy2CfnExtension service providers through SPI.
      CfnConverter config​(CfnConfig config)
      Set the CloudFormation configuration settings.
      java.util.List<ResourceSchema> convert​(software.amazon.smithy.model.Model model)
      Converts the annotated resources in the Smithy model to CloudFormation Resource Schemas.
      java.util.Map<java.lang.String,​software.amazon.smithy.model.node.ObjectNode> convertToNodes​(software.amazon.smithy.model.Model model)
      Converts resource shapes annotated with the @cfnResource trait to JSON/Node representations of CloudFormation Resource Schemas using the given Smithy model.
      static CfnConverter create()  
      CfnConfig getConfig()
      Get the CloudFormation configuration settings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getConfig

        public CfnConfig getConfig()
        Get the CloudFormation configuration settings.
        Returns:
        Returns the config object.
      • config

        public CfnConverter config​(CfnConfig config)
        Set the CloudFormation configuration settings.
        Parameters:
        config - Config object to set.
        Returns:
        Returns the converter.
      • classLoader

        public CfnConverter classLoader​(java.lang.ClassLoader classLoader)
        Sets a ClassLoader to use to discover Smithy2CfnExtension service providers through SPI.

        The CfnConverter will use its own ClassLoader by default.

        Parameters:
        classLoader - ClassLoader to use.
        Returns:
        Returns the converter.
      • convert

        public java.util.List<ResourceSchema> convert​(software.amazon.smithy.model.Model model)
        Converts the annotated resources in the Smithy model to CloudFormation Resource Schemas.
        Parameters:
        model - Smithy model containing resources to convert.
        Returns:
        Returns the converted resources.