public final class TraitDefinition extends AbstractTrait implements 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.
|
boolean |
equals(java.lang.Object other) |
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. |
int |
hashCode() |
boolean |
isStructurallyExclusiveByMember() |
boolean |
isStructurallyExclusiveByTarget() |
TraitDefinition.Builder |
toBuilder()
Take this object and create a builder that contains all of the
current property values of this object.
|
getSourceLocation, setNodeCache, toNode, toShapeId, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitflatMapStream, getIdiomaticTraitName, getIdiomaticTraitName, isSynthetic, makeAbsoluteName, makeAbsoluteNamepublic 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()
ToSmithyBuildertoBuilder in interface 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()
AbstractTraitcreateNode in class AbstractTraitpublic boolean equals(java.lang.Object other)
equals in class AbstractTraitpublic int hashCode()
hashCode in class AbstractTrait