public final class TraitDefinition extends AbstractTrait implements software.amazon.smithy.utils.ToSmithyBuilder<TraitDefinition>
Modifier and Type | Class and Description |
---|---|
static class |
TraitDefinition.Builder
Builder to create a TraitDefinition.
|
static class |
TraitDefinition.Provider |
static class |
TraitDefinition.StructurallyExclusive
The structural exclusion semantics of the trait.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONFLICTS_KEY |
static ShapeId |
ID |
static java.lang.String |
SELECTOR_KEY |
static java.lang.String |
STRUCTURALLY_EXCLUSIVE_KEY |
Constructor and Description |
---|
TraitDefinition(TraitDefinition.Builder builder) |
Modifier and Type | Method and Description |
---|---|
static TraitDefinition.Builder |
builder() |
protected Node |
createNode()
The result of toNode is used for hashCodes and equality.
|
java.util.List<ShapeId> |
getConflicts()
Gets the trait names that conflict with this trait.
|
Selector |
getSelector()
Gets the valid places in a model that this trait can be applied.
|
java.util.Optional<TraitDefinition.StructurallyExclusive> |
getStructurallyExclusive()
Gets the
structurallyExclusive property of the trait. |
boolean |
isStructurallyExclusiveByMember() |
boolean |
isStructurallyExclusiveByTarget() |
TraitDefinition.Builder |
toBuilder() |
equals, getSourceLocation, hashCode, toNode, toShapeId, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
flatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, makeAbsoluteName, makeAbsoluteName
public static final ShapeId ID
public static final java.lang.String SELECTOR_KEY
public static final java.lang.String STRUCTURALLY_EXCLUSIVE_KEY
public static final java.lang.String CONFLICTS_KEY
public TraitDefinition(TraitDefinition.Builder builder)
public static TraitDefinition.Builder builder()
public TraitDefinition.Builder toBuilder()
toBuilder
in interface software.amazon.smithy.utils.ToSmithyBuilder<TraitDefinition>
public Selector getSelector()
public java.util.List<ShapeId> getConflicts()
public java.util.Optional<TraitDefinition.StructurallyExclusive> getStructurallyExclusive()
structurallyExclusive
property of the trait.structurallyExclusive
property of the trait.public boolean isStructurallyExclusiveByMember()
structurallyExclusive
by member.public boolean isStructurallyExclusiveByTarget()
structurallyExclusive
by target.protected Node createNode()
AbstractTrait
createNode
in class AbstractTrait