Class AnnotationTrait
- java.lang.Object
-
- software.amazon.smithy.model.traits.AnnotationTrait
-
- All Implemented Interfaces:
FromSourceLocation,ToNode,ToShapeId,Trait
- Direct Known Subclasses:
AwsQueryTrait,BoxTrait,ClientEndpointDiscoveryIdTrait,ControlPlaneTrait,DataPlaneTrait,DisableConditionKeyInferenceTrait,Ec2QueryTrait,EventHeaderTrait,EventPayloadTrait,HostLabelTrait,HttpBasicAuthTrait,HttpBearerAuthTrait,HttpChecksumRequiredTrait,HttpDigestAuthTrait,HttpLabelTrait,HttpPayloadTrait,IdempotencyTokenTrait,IdempotentTrait,MqttJsonTrait,NoReplaceTrait,OptionalAuthTrait,PrivateTrait,ReadonlyTrait,RequiredTrait,RequiresLengthTrait,SensitiveTrait,StreamingTrait,TopicLabelTrait,UniqueItemsTrait,UnsignedPayloadTrait,UnstableTrait,XmlAttributeTrait,XmlFlattenedTrait
public abstract class AnnotationTrait extends java.lang.Object implements Trait
Trait implementation for traits that are an empty object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnnotationTrait.Provider<T extends AnnotationTrait>Trait provider that expects a boolean value of true.
-
Constructor Summary
Constructors Constructor Description AnnotationTrait(ShapeId id, ObjectNode node)
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object other)SourceLocationgetSourceLocation()Gets the source location of a value.inthashCode()NodetoNode()Converts a value to aNode.ShapeIdtoShapeId()Gets the shape ID of the trait.
-
-
-
Constructor Detail
-
AnnotationTrait
public AnnotationTrait(ShapeId id, ObjectNode node)
-
-
Method Detail
-
toShapeId
public final ShapeId toShapeId()
Description copied from interface:TraitGets the shape ID of the trait.
-
toNode
public final Node toNode()
Description copied from interface:ToNodeConverts a value to aNode.
-
getSourceLocation
public final SourceLocation getSourceLocation()
Description copied from interface:FromSourceLocationGets the source location of a value.- Specified by:
getSourceLocationin interfaceFromSourceLocation- Returns:
- Returns the source location of the value.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-