Class BooleanTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AbstractTrait
-
- software.amazon.smithy.model.traits.BooleanTrait
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,ToShapeId
,Trait
- Direct Known Subclasses:
BoxTrait
,EventHeaderTrait
,EventPayloadTrait
,EventStreamTrait
,HostLabelTrait
,HttpLabelTrait
,HttpPayloadTrait
,IdempotencyTokenTrait
,IdempotentTrait
,PrivateTrait
,ReadonlyTrait
,RequiredTrait
,SensitiveTrait
,UniqueItemsTrait
,XmlAttributeTrait
,XmlFlattenedTrait
public abstract class BooleanTrait extends AbstractTrait
Trait implementation that expects an empty object or a boolean value of true.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BooleanTrait.Provider<T extends BooleanTrait>
Trait provider that expects a boolean value of true.
-
Constructor Summary
Constructors Constructor Description BooleanTrait(ShapeId id, SourceLocation sourceLocation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Node
createNode()
The result of toNode is used for hashCodes and equality.-
Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, toNode, toShapeId, toString
-
-
-
-
Constructor Detail
-
BooleanTrait
public BooleanTrait(ShapeId id, SourceLocation sourceLocation)
-
-
Method Detail
-
createNode
protected final Node createNode()
Description copied from class:AbstractTrait
The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.- Specified by:
createNode
in classAbstractTrait
- Returns:
- Returns the trait as a node.
-
-