Class AbstractTraitBuilder<T extends Trait,B extends AbstractTraitBuilder>

java.lang.Object
software.amazon.smithy.model.traits.AbstractTraitBuilder<T,B>
Type Parameters:
T - Trait being built.
B - Builder that is building the trait.
All Implemented Interfaces:
SmithyBuilder<T>
Direct Known Subclasses:
ArnReferenceTrait.Builder, ArnTrait.Builder, AuthDefinitionTrait.Builder, AuthorizersTrait.Builder, AwsProtocolTrait.Builder, AwsQueryErrorTrait.Builder, CfnResourceTrait.Builder, ClientContextParamsTrait.Builder, ClientDiscoveredEndpointTrait.Builder, ClientEndpointDiscoveryTrait.Builder, CognitoUserPoolsTrait.Builder, ContextParamTrait.Builder, CorsTrait.Builder, DefineConditionKeysTrait.Builder, DeprecatedTrait.Builder, EndpointRuleSetTrait.Builder, EndpointTestsTrait.Builder, EndpointTrait.Builder, EnumTrait.Builder, EnumValueTrait.Builder, ExamplesTrait.Builder, ExternalDocumentationTrait.Builder, HttpApiKeyAuthTrait.Builder, HttpChecksumTrait.Builder, HttpTrait.Builder, IamActionTrait.Builder, IamResourceTrait.Builder, IdRefTrait.Builder, IntegrationTrait.Builder, LengthTrait.Builder, MixinTrait.Builder, MockIntegrationTrait.Builder, PaginatedTrait.Builder, PropertyTrait.Builder, ProtocolDefinitionTrait.Builder, RangeTrait.Builder, RecommendedTrait.Builder, ReferencesTrait.Builder, RequestCompressionTrait.Builder, RetryableTrait.Builder, ServiceTrait.Builder, SigV4ATrait.Builder, SigV4Trait.Builder, SpecificationExtensionTrait.Builder, StandardPartitionalEndpointsTrait.Builder, StandardRegionalEndpointsTrait.Builder, StaticContextParamsTrait.Builder, StringListTrait.Builder, TagEnabledTrait.Builder, TaggableTrait.Builder, TraitDefinition.Builder, TraitValidatorsTrait.Builder, WaitableTrait.Builder, XmlNamespaceTrait.Builder

public abstract class AbstractTraitBuilder<T extends Trait,B extends AbstractTraitBuilder> extends Object implements SmithyBuilder<T>
Provides the shared logic that all trait builders need.
  • Constructor Details

    • AbstractTraitBuilder

      public AbstractTraitBuilder()
  • Method Details

    • sourceLocation

      public B sourceLocation(FromSourceLocation sourceLocation)
      Sets the source location of where the trait was defined.
      Parameters:
      sourceLocation - Location of the trait.
      Returns:
      Returns the builder.
    • getSourceLocation

      public SourceLocation getSourceLocation()
      Gets the source location configured for the builder.
      Returns:
      Returns the source location or null if not set.