Interface ModelTransformerPlugin

All Known Implementing Classes:
CleanBindings, CleanClientDiscoveryTraitTransformer, CleanEndpointTestOperationInput, CleanOperationStructures, CleanResourceReferences, CleanServiceRenames, CleanStructureAndUnionMembers, CleanTraitDefinitions, RemoveMixins, RemoveTraits

public interface ModelTransformerPlugin
Plugin service used with ModelTransformer.

Implementations of this service are found via SPI. Each time a shape is removed from a model, onRemove(software.amazon.smithy.model.transform.ModelTransformer, java.util.Collection<software.amazon.smithy.model.shapes.Shape>, software.amazon.smithy.model.Model) is called and given an opportunity to create and return a newly transformed model.

  • Method Summary

    Modifier and Type
    Method
    Description
    default Model
    onRemove(ModelTransformer transformer, Collection<Shape> removed, Model model)
    The method that is invoked each time shapes are removed from a model.
  • Method Details

    • onRemove

      default Model onRemove(ModelTransformer transformer, Collection<Shape> removed, Model model)
      The method that is invoked each time shapes are removed from a model.
      Parameters:
      transformer - Transformer used to replace/remove shapes from the model.
      removed - The of shapes that were removed from the model.
      model - Model that has been altered to remove removed.
      Returns:
      Returns a transformed version of the passed in model.