Class TraitContainer.TraitHashMap
java.lang.Object
software.amazon.smithy.model.loader.TraitContainer.TraitHashMap
- All Implemented Interfaces:
TraitContainer
- Enclosing interface:
- TraitContainer
The actual, mutable implementation used to aggregate traits.
-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.model.loader.TraitContainer
TraitContainer.TraitHashMap -
Field Summary
Fields inherited from interface software.amazon.smithy.model.loader.TraitContainer
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionGets all traits applied to the prelude.getTraitsForShape(ShapeId shape) Gets the traits applied to a shape.voidCreate and add a trait.voidAdd a trait.traits()
-
Method Details
-
traits
- Specified by:
traitsin interfaceTraitContainer- Returns:
- Gets all traits in the value map.
-
getTraitsForShape
Description copied from interface:TraitContainerGets the traits applied to a shape.- Specified by:
getTraitsForShapein interfaceTraitContainer- Parameters:
shape- Shape to get the traits of.- Returns:
- Returns the traits of the shape.
-
getTraitsAppliedToPrelude
Description copied from interface:TraitContainerGets all traits applied to the prelude.- Specified by:
getTraitsAppliedToPreludein interfaceTraitContainer- Returns:
- Returns the traits applied to prelude shapes.
-
onTrait
Description copied from interface:TraitContainerAdd a trait.- Specified by:
onTraitin interfaceTraitContainer- Parameters:
target- Shape to add the trait to.value- Trait to add.
-
onTrait
Description copied from interface:TraitContainerCreate and add a trait.- Specified by:
onTraitin interfaceTraitContainer- Parameters:
target- Shape to add the trait to.traitId- Trait shape ID to create.value- The value to assign to the trait.
-