Class EndpointBddTrait.Provider
java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait.Provider
software.amazon.smithy.rulesengine.traits.EndpointBddTrait.Provider
- All Implemented Interfaces:
TraitService
- Enclosing class:
- EndpointBddTrait
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateTrait(ShapeId target, Node value) Creates the trait from a node value.createTrait(ShapeId target, Node value, ClassLoader classLoader) Creates the trait from a node value, providing the classloader that was used to discover trait providers.Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait.Provider
getShapeId
-
Constructor Details
-
Provider
public Provider()
-
-
Method Details
-
createTrait
Description copied from interface:TraitServiceCreates the trait from a node value.- Parameters:
target- The shape targeted by the trait.value- The value of the trait.- Returns:
- Returns the created trait.
-
createTrait
Description copied from interface:TraitServiceCreates the trait from a node value, providing the classloader that was used to discover trait providers.Most providers ignore the classloader; the default implementation delegates to
TraitService.createTrait(ShapeId, Node). Providers whose trait value references components discovered through their own SPIs (for example endpoint rule-set functions contributed by anEndpointRuleSetExtension) can override this to resolve those components fromclassLoaderrather than the classloader that loaded the provider. This matters when the model is assembled with a caller-supplied classloader (seeModel.assembler(ClassLoader)) whose closure contains extensions that are not visible to the provider's own classloader.- Parameters:
target- The shape targeted by the trait.value- The value of the trait.classLoader- The classloader used to discover trait providers, or null if unknown.- Returns:
- Returns the created trait.
-