Class CleanStructureAndUnionMembers
java.lang.Object
software.amazon.smithy.model.transform.plugins.CleanStructureAndUnionMembers
- All Implemented Interfaces:
ModelTransformerPlugin
Cleans up structure, union, enum, and intEnum shapes after shapes are removed.
- Ensures that structure and union shapes are updated to no longer reference any removed members.
- Ensures that structure/union members that reference shapes that have been removed are also removed.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiononRemove
(ModelTransformer transformer, Collection<Shape> removed, Model model) The method that is invoked each time shapes are removed from a model.
-
Constructor Details
-
CleanStructureAndUnionMembers
public CleanStructureAndUnionMembers()
-
-
Method Details
-
onRemove
Description copied from interface:ModelTransformerPlugin
The method that is invoked each time shapes are removed from a model.- Specified by:
onRemove
in interfaceModelTransformerPlugin
- Parameters:
transformer
- Transformer used to replace/remove shapes from the model.removed
- The of shapes that were removed from themodel
.model
- Model that has been altered to removeremoved
.- Returns:
- Returns a transformed version of the passed in model.
-