Class EffectiveTraitQuery.Builder
- java.lang.Object
-
- software.amazon.smithy.model.traits.EffectiveTraitQuery.Builder
-
- All Implemented Interfaces:
SmithyBuilder<EffectiveTraitQuery>
- Enclosing class:
- EffectiveTraitQuery
public static final class EffectiveTraitQuery.Builder extends java.lang.Object implements SmithyBuilder<EffectiveTraitQuery>
Builds a reusable EffectiveTraitQuery.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EffectiveTraitQuery
build()
Creates an immutable object that is created from the properties that have been set on the builder.EffectiveTraitQuery.Builder
inheritFromContainer(boolean inheritFromContainer)
When testing member shapes, also checks the container of the member for the presence of a trait.EffectiveTraitQuery.Builder
model(Model model)
Sets the required model to query.EffectiveTraitQuery.Builder
traitClass(java.lang.Class<? extends Trait> traitClass)
Sets the required trait being queried.
-
-
-
Method Detail
-
build
public EffectiveTraitQuery build()
Description copied from interface:SmithyBuilder
Creates an immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceSmithyBuilder<EffectiveTraitQuery>
- Returns:
- an instance of T
-
model
public EffectiveTraitQuery.Builder model(Model model)
Sets the required model to query.- Parameters:
model
- Model to query.- Returns:
- Returns the query object builder.
-
traitClass
public EffectiveTraitQuery.Builder traitClass(java.lang.Class<? extends Trait> traitClass)
Sets the required trait being queried.- Parameters:
traitClass
- Trait to detect on shapes.- Returns:
- Returns the query object builder.
-
inheritFromContainer
public EffectiveTraitQuery.Builder inheritFromContainer(boolean inheritFromContainer)
When testing member shapes, also checks the container of the member for the presence of a trait.By default, traits are not inherited from a member's parent container.
- Parameters:
inheritFromContainer
- Set to true to inherit traits from member containers.- Returns:
- Returns the query object builder.
-
-