Class Context


  • public final class Context
    extends java.lang.Object
    Smithy to CloudFormation conversion context object.

    One context is used per CloudFormation resource generated.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      software.amazon.smithy.aws.cloudformation.traits.CfnResource getCfnResource()
      Gets the CfnResource index data for this resource.
      CfnConfig getConfig()
      Gets the configuration object used for the conversion.
      software.amazon.smithy.jsonschema.JsonSchemaConverter getJsonSchemaConverter()
      Gets the JSON schema converter.
      software.amazon.smithy.model.Model getModel()
      Gets the Smithy model being converted.
      java.lang.String getPropertyPointer​(java.lang.String propertyName)
      Gets the JSON pointer string to a specific property.
      software.amazon.smithy.model.shapes.ResourceShape getResource()
      Gets the resource shape being converted.
      software.amazon.smithy.model.shapes.StructureShape getResourceStructure()
      Gets the structure shape that represents the consolidated properties of the resource.
      software.amazon.smithy.model.shapes.ServiceShape getService()
      Gets the service shape containing the resource being converted.
      • Methods inherited from class java.lang.Object

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

      • getModel

        public software.amazon.smithy.model.Model getModel()
        Gets the Smithy model being converted.
        Returns:
        Returns the Smithy model.
      • getService

        public software.amazon.smithy.model.shapes.ServiceShape getService()
        Gets the service shape containing the resource being converted.
        Returns:
        Returns the service shape.
      • getResource

        public software.amazon.smithy.model.shapes.ResourceShape getResource()
        Gets the resource shape being converted.
        Returns:
        Returns the resource shape.
      • getCfnResource

        public software.amazon.smithy.aws.cloudformation.traits.CfnResource getCfnResource()
        Gets the CfnResource index data for this resource.
        Returns:
        Returns the CfnResource index data.
      • getResourceStructure

        public software.amazon.smithy.model.shapes.StructureShape getResourceStructure()
        Gets the structure shape that represents the consolidated properties of the resource.
        Returns:
        Returns the structure shape.
      • getConfig

        public CfnConfig getConfig()
        Gets the configuration object used for the conversion.

        Plugins can query this object for configuration values.

        Returns:
        Returns the configuration object.
      • getJsonSchemaConverter

        public software.amazon.smithy.jsonschema.JsonSchemaConverter getJsonSchemaConverter()
        Gets the JSON schema converter.
        Returns:
        Returns the JSON Schema converter.
      • getPropertyPointer

        public java.lang.String getPropertyPointer​(java.lang.String propertyName)
        Gets the JSON pointer string to a specific property.
        Parameters:
        propertyName - Property name to build a JSON pointer to.
        Returns:
        Returns the JSON pointer to the property.