Class TraitDefinition

    • Field Detail

      • ID

        public static final ShapeId ID
    • Method Detail

      • getSelector

        public Selector getSelector()
        Gets the valid places in a model that this trait can be applied.
        Returns:
        Returns the trait selector.
      • getConflicts

        public java.util.List<ShapeId> getConflicts()
        Gets the trait names that conflict with this trait.
        Returns:
        Returns the conflicting trait names.
      • getStructurallyExclusive

        public java.util.Optional<TraitDefinition.StructurallyExclusive> getStructurallyExclusive()
        Gets the structurallyExclusive property of the trait.
        Returns:
        Returns the structurallyExclusive property of the trait.
      • isStructurallyExclusiveByMember

        public boolean isStructurallyExclusiveByMember()
        Returns:
        Returns true if the trait is structurallyExclusive by member.
      • isStructurallyExclusiveByTarget

        public boolean isStructurallyExclusiveByTarget()
        Returns:
        Returns true if the trait is structurallyExclusive by target.
      • createNode

        protected 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 class AbstractTrait
        Returns:
        Returns the trait as a node.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class AbstractTrait