Class TraitFactory.ServiceFactory
java.lang.Object
software.amazon.smithy.model.traits.TraitFactory.ServiceFactory
- All Implemented Interfaces:
TraitFactory
- Enclosing interface:
- TraitFactory
Default
TraitFactory backed by a map of TraitService providers.
Retains the classloader used to discover the providers (when known) and passes it to
TraitService.createTrait(ShapeId, Node, ClassLoader) so providers can resolve
classloader-sensitive components from the same closure the model is assembled against.
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.model.traits.TraitFactory
TraitFactory.ServiceFactory -
Method Summary
-
Method Details
-
createTrait
Description copied from interface:TraitFactoryCreates and configures a trait using model trait data.- Specified by:
createTraitin interfaceTraitFactory- Parameters:
id- Shape ID of the trait.target- Shape that the trait is applied on.value- The Node value of the trait.- Returns:
- Returns the created trait wrapped in an Optional.
-