Package software.amazon.smithy.build
Interface ProjectionTransformer
- All Known Implementing Classes:
Apply,ChangeStringEnumsToEnumShapes,ChangeTypes,ConfigurableProjectionTransformer,ExcludeMetadata,ExcludeShapesBySelector,ExcludeShapesByTag,ExcludeShapesByTrait,ExcludeTags,ExcludeTraits,ExcludeTraitsByTag,FilterSuppressions,FlattenNamespaces,IncludeMetadata,IncludeNamespaces,IncludeServices,IncludeShapesBySelector,IncludeShapesByTag,IncludeTags,IncludeTraits,IncludeTraitsByTag,RemoveTraitDefinitions,RemoveUnusedShapes,RenameShapes
public interface ProjectionTransformer
Creates a model transformer by name.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Function<String,Optional<ProjectionTransformer>> Creates aProjectionTransformerfactory function using SPI and the current thread's context class loader.static Function<String,Optional<ProjectionTransformer>> createServiceFactory(ClassLoader classLoader) Creates aProjectionTransformerfactory function using SPI.static Function<String,Optional<ProjectionTransformer>> createServiceFactory(Iterable<ProjectionTransformer> transformers) Creates aProjectionTransformerfactory function using the given transformers.getAdditionalProjections(TransformContext context) Allows the composition of projections by returning additional projections to run after the current one.getName()Gets the name of the transformer.transform(TransformContext context) Transforms the given model using the providedTransformContext.
-
Method Details
-
getName
String getName()Gets the name of the transformer.- Returns:
- Returns the name (e.g., "traits").
-
transform
Transforms the given model using the providedTransformContext.- Parameters:
context- Transformation context.- Returns:
- Returns the created transformer.
- Throws:
IllegalArgumentException- if the arguments are invalid.
-
getAdditionalProjections
Allows the composition of projections by returning additional projections to run after the current one.- Parameters:
context- Transformation context.- Returns:
- a collection of named projections to run.
- Throws:
IllegalArgumentException- if the arguments are invalid.
-
createServiceFactory
Creates aProjectionTransformerfactory function using SPI and the current thread's context class loader.- Returns:
- Returns the created factory function.
- See Also:
-
createServiceFactory
static Function<String,Optional<ProjectionTransformer>> createServiceFactory(Iterable<ProjectionTransformer> transformers) Creates aProjectionTransformerfactory function using the given transformers.- Parameters:
transformers- Transformers used to build a factory function.- Returns:
- Returns the created factory.
-
createServiceFactory
static Function<String,Optional<ProjectionTransformer>> createServiceFactory(ClassLoader classLoader) Creates aProjectionTransformerfactory function using SPI.- Parameters:
classLoader- Class loader to use to discover classes.- Returns:
- Returns the created factory function.
-