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

public static final class EndpointBddTrait.Provider extends AbstractTrait.Provider
  • Constructor Details

    • Provider

      public Provider()
  • Method Details

    • createTrait

      public Trait createTrait(ShapeId target, Node value)
      Description copied from interface: TraitService
      Creates 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

      public Trait createTrait(ShapeId target, Node value, ClassLoader classLoader)
      Description copied from interface: TraitService
      Creates 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 an EndpointRuleSetExtension) can override this to resolve those components from classLoader rather than the classloader that loaded the provider. This matters when the model is assembled with a caller-supplied classloader (see Model.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.